Hello,
I’m having trouble getting the Campfire handler to work.
Sensu: 0.12
Ruby: embedded
/etc/sensu/conf.d/campfire.json
{
“campfire”: {
"room": "Alerts",
"room_id" : "999999"
"account": "myaccount",
"token": "my campfire token"
}
}
/etc/sensu/conf.d/handler_campfire.json
{
“handlers”: {
“campfire”: {
“type”: “pipe”,
"command": "/etc/sensu/handlers/campfire.rb"
}
}
}
In /var/log/sensu/sensu-server.log I see
{“timestamp”:“2014-02-10T01:52:51.329483+0000”,“level”:“info”,“message”:“handler output”,“handler”:{“type”:“pipe”,“command”:"/etc/sensu/handlers/campfire.rb",“name”:“campfire”},“output”:"/etc/sensu/handlers/campfire.rb:35:in room': undefined method
’ for nil:NilClass (NoMethodError)\n"}
{“timestamp”:“2014-02-10T01:52:51.329723+0000”,“level”:“info”,“message”:“handler output”,“handler”:{“type”:“pipe”,“command”:"/etc/sensu/handlers/campfire.rb",“name”:“campfire”},“output”:"\tfrom /etc/sensu/handlers/campfire.rb:52:in `block in handle’\n"}
{“timestamp”:“2014-02-10T01:52:51.329835+0000”,“level”:“info”,“message”:“handler output”,“handler”:{“type”:“pipe”,“command”:"/etc/sensu/handlers/campfire.rb",“name”:“campfire”},“output”:"\tfrom /opt/sensu/embedded/lib/ruby/2.0.0/timeout.rb:66:in `timeout’\n"}
{“timestamp”:“2014-02-10T01:52:51.329938+0000”,“level”:“info”,“message”:“handler output”,“handler”:{“type”:“pipe”,“command”:"/etc/sensu/handlers/campfire.rb",“name”:“campfire”},“output”:"\tfrom /opt/sensu/embedded/lib/ruby/2.0.0/timeout.rb:97:in `timeout’\n"}
{“timestamp”:“2014-02-10T01:52:51.330031+0000”,“level”:“info”,“message”:“handler output”,“handler”:{“type”:“pipe”,“command”:"/etc/sensu/handlers/campfire.rb",“name”:“campfire”},“output”:"\tfrom /etc/sensu/handlers/campfire.rb:51:in `handle’\n"}
{“timestamp”:“2014-02-10T01:52:51.330126+0000”,“level”:“info”,“message”:“handler output”,“handler”:{“type”:“pipe”,“command”:"/etc/sensu/handlers/campfire.rb",“name”:“campfire”},“output”:"\tfrom /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-plugin-0.2.2/lib/sensu-handler.rb:41:in `block in class:Handler’\n"}
If I try /opt/sensu/embedded/bin/ruby /etc/sensu/handlers/campfire.rb I get nothing.
I’ve got the mailer.rb handler working. But after a few hours I’ve not gotten any further with campfire.
Any ideas?
thanks,
Luke