Uchiwa throwing "Error with Sensu API Sensu"
I've got Uchiwa on-screen but it is flashing the error I mentioned.
Tailing the sensu-api log doesn't reveal much:
{"timestamp":"2014-10-15T04:02:44.553226-0500","level":"warn","message":"loading config file","file":"/etc/sensu/conf.d/client.json"}
{"timestamp":"2014-10-15T04:02:44.553292-0500","level":"warn","message":"loading config file","file":"/etc/sensu/conf.d/redis.json"}
{"timestamp":"2014-10-15T04:02:44.553386-0500","level":"warn","message":"config file applied changes","file":"/etc/sensu/conf.d/redis.json","changes":{"redis":[null,{"host":"localhost","port":6379}]}}
{"timestamp":"2014-10-15T04:02:44.553472-0500","level":"warn","message":"loading config file","file":"/etc/sensu/conf.d/rabbitmq.json"}
{"timestamp":"2014-10-15T04:02:44.553582-0500","level":"warn","message":"config file applied changes","file":"/etc/sensu/conf.d/rabbitmq.json","changes":{"rabbitmq":[null,{"ssl":{"cert_chain_file":"/etc/sensu/ssl/cert.pem","private_key_file":"/etc/sensu/ssl/key.pem"},"host":"localhost","port":5671,"vhost":"/sensu","user":"sensu","password":"REDACTED"}]}}
{"timestamp":"2014-10-15T04:02:44.553662-0500","level":"warn","message":"loading config file","file":"/etc/sensu/conf.d/api.json"}
{"timestamp":"2014-10-15T04:02:44.553755-0500","level":"warn","message":"config file applied changes","file":"/etc/sensu/conf.d/api.json","changes":{"api":[null,{"host":"localhost","port":4567,"user":"sensu","password":"REDACTED"}]}}
{"timestamp":"2014-10-15T04:02:52.336757-0500","level":"info","message":"GET /info","remote_address":"127.0.0.1","user_agent":null,"request_method":"GET","request_uri":"/info","request_body":""}
at least, not to me.
The api config is:
[root@ws00 sensu]# cat conf.d/api.json
{
"api": {
"host": "localhost",
"port": 4567,
"user": "sensu",
"password": "REDACTED"
}
}
Next, there's the output of the health checks they talked about on their github (https://github.com/sensu/uchiwa/blob/master/README.md):
/health
{"uchiwa":"ok","sensu":{"Sensu":{}}}
/health/sensu
{"sensu":{"Sensu":{}}}
/health/uchiwa
{"uchiwa":"ok"}
The clincher?
service sensu-api status
reports it is running happily along, no worries.
At any rate, Google doesn't return anything for "Error with Sensu API Sensu" so I hope you folks can help!
If a look at other configs would be handy, let me know.
Solution 1:
Another possibility is the location of your uchiwa.json file.
I had a similar issue and didn't know what was going on but it seemed to have issues when I had the uchiwa.json file created in /etc/sensu/conf.d but at the same time the default configuration created an uchiwa.json file in /etc/sensu. For some reason uchiwa wants the file to be in /etc/sensu and for now I am happy with that configuration as it finally has the api working correctly. Good luck to you.