Question

I'm trying to send a subset of messages to Flowdock as output from Logstash. Unfortunately, due to this issue I get essentially nothing back about why my messages aren't making it. Stripping down to a basic example, I see the problem even if I change my output config to the following:

output {
  http {
    http_method => "post"
    url => "https://api.flowdock.com/v1/messages/team_inbox/API_TOKEN"
    format => "message"
    content_type => "application/json"
    message => "{\"source\":\"logstash\",\"from_address\":\"me@example.com\", \"subject\":\"Log Message\", \"content\":\"test\"}"
  }
}

I know, though, that output is generally working because if I add the following to output I see log messages written to the file:

file {
  path => "/mnt/test.log"
}

I also know that the http message I'm sending to Flowdock should work since

curl -X POST https://api.flowdock.com/v1/messages/team_inbox/API_TOKEN -d "{\"source\":\"logstash\",\"from_address\":\"me@example.com\",\"subject\":\"Log Message\",\"content\":\"test\"}" -H "Content-Type: application/json"

results in a message being posted to the team inbox.

Are there any ways to work around this issue to determine why my output from logstash is failing?

Was it helpful?

Solution

I would start debugging the issue by first sending the requests from Logstash to a service that just outputs the received request, for example RequestBin.

Something like:

output {
  http {
    http_method => "post"
    url => "http://requestb.in/<created_id>"
    format => "message"
    content_type => "application/json"
    message => "{\"source\":\"logstash\",\"from_address\":\"me@example.com\",\"subject\":\"Log Message\", \"content\":\"test\"}"
  }
}

After you've made sure that the request Logstash is making is correct, take that request (preferably the exact data) and try to send it to Flowdock using curl or some other means.

At this point you should be able to tell why the request fails in either end and notify the party accordingly (i.e. open a ticket to https://logstash.jira.com/secure/Dashboard.jspa or send an email to support@flowdock.com).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top