We have deployed sensu-server, sensu-api, rabbitmq and redis on a single instance. There are a handful of basic checks, cpu, memory and storage for 7 instances. In addition a check for crons on all 7 instances. A check for httpd on 4 of the instances, and a check for tomcat on 3 of the instances. sensu-client is running on all 7 instances (ofcourse). In addition on the sensu server we are also running the client to monitor the cpu, memory and storage of the sensu instance itself. What we’re seeing is 100% CPU usage. We are just using a custom email handler which is running the command:
handler_email.json
{
“handlers”: {
“email”: {
“type”: “pipe”,
“command”: “mail -r sensu-alerts@mycorporation.com -s ‘sensu alert’ bukhari.irfan@gmail.com”
}
}
}
api.json
{
“api”: {
“host”: “127.0.0.1”,
“bind”: “0.0.0.0”,
“port”: 4567
}
}
client.json
{
“client”: {
“name”: “sensu-server2”,
“address”: “127.0.0.1”,
“environment”: “sensu”,
“subscriptions”: [ “hardware”],
“keepalive”:
{
“handler”: “email”,
“thresholds”: {
“warning”: 250,
“critical”: 300
}
},
“socket”: {
“bind”: “127.0.0.1”,
“port”: 3030
}
}
}
rabbitmq.json
{
“rabbitmq”: {
“host”: “127.0.0.1”,
“port”: 5672,
“vhost”: “/sensu”,
“user”: “sensu”,
“password”: “secret”
}
}
transport,json
{
“transport”: {
“name”: “rabbitmq”,
“reconnect_on_error”: true
}
}
redis.json
{
“redis”: {
“host”: “127.0.0.1”,
“port”: 6379,
“reconnect_on_error”: true,
“db”: 0,
“auto_reconnect”: true
}
}
example of the checks
check_cpu_linux.json
{
“checks”: {
“check_cpu”: {
“handlers”: [“email”],
“command”: "/opt/sensu/embedded/bin/check-cpu.rb -w 80 -c 90 ",
“interval”: 600,
“occurrences”: 5,
“subscribers”: [ “hardware” ]
}
}
}
Can some one please help me with this or point me in the direction as to why this is happening. It would be a big help. Thanks