Http output to ScienceLogic API


(Scot) #1

Hi all,

Trying to integrate a 3rd party API and Logstash 6.2.1
I can do a simple post and create a message in the system but having trouble replicating this in the logstash http output.

This works from the command line to create my alert in ScienceLogic.
curl -i -k -H "Content-Type:application/json" -u "${username}:${password}" -X POST $address -d '{"aligned_resource":"/device/5013","message":"TESTING LogStash"}'

How could I represent that in a LS config

I have looked through this forum, release notes and GitHub.
Seems https on self signed certs is still unsupported so I am using http.


(Scot) #2

Shouldn't this always add 2 fields ?
input {
beats {
port => 5044
}
}

filter {
mutate {
add_field => { "aligned_resource" => "/device/5013" }
add_field => { "message" => "LOGSTASH" }
}
}

output{
file {
path => "/opt/logstash/%{host}.json"
}


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.