About project:
- I have 2 virtual machines on vmware and their operating system is ubuntu 13.04.
-First virtual machine will be sensu-server, Second virtual machine will be sensu-client.
-They will send messages to each other via rabbitmq message system bus.
···
-I have installed sensu with all components to both of virtual machines.
-I
have configured two machines to connect to rabbitmq but I am not sure is that right? I sent my config files below. Where is incorrect?
-I have only enabled sensu-client(command: /etc/init.d/sensu-client restart) on client-machine.
-I have enabled all components of server virtual machine except client.(server,api,dashboard).
My files of client machine:
/etc/sensu/----> config.json
/etc/sensu/conf.d----->client.json
/etc/rabbitmq/----->rabbitmq.config
My files of server machine
/etc/sensu/----->config.json
/etc/sensu/conf.d---->check_cron.json
/etc/rabbitmq/----->rabbitmq.config
/etc/sensu/plugins------>check_procs.rb
just like http://docs.sensuapp.org/0.9/adding_a_check.html
inet address of server machine is: 192.168.159.129
config file of client machine
{
“rabbitmq”: {
“ssl”: {
“private_key_file”: “/etc/sensu/ssl/client_key.pem”,
“cert_chain_file”: “/etc/sensu/ssl/client_cert.pem”
},
"port": 5671,
"host": "[192.168.159.129](http://192.168.159.129)",
"user": "sensu",
"password": "mypass",
"vhost": "/sensu"
}
}
client.json in client machine
{
“client”: {
"name": "sensu-server.dom.tld",
"address": "[192.168.159.129](http://192.168.159.129)",
"subscriptions": [ "test", "webservers" ]
}
}
config file of server machine
{
“rabbitmq”: {
“ssl”: {
“private_key_file”: “/etc/sensu/ssl/client_key.pem”,
"cert_chain_file": "/etc/sensu/ssl/client_cert.pem"
},
"port": 5671,
"host": "localhost",
"user": "sensu",
"password": "mypass",
"vhost": "/sensu"
},
"redis": {
"host": "localhost",
"port": 6379
},
"api": {
"host": "localhost",
"port": 4567
},
"dashboard": {
"host": "localhost",
"port": 8080,
"user": "admin",
"password": "secret"
},
"handlers": {
"default": {
"type": "pipe",
"command": "true"
}
}
}
check_cron.json in server machine
{
“checks”: {
"cron_check": {
"handlers": ["default"],
"command": "/etc/sensu/plugins/check-procs.rb -p crond -C 1 ",
"interval": 60,
"subscribers": [ "webservers" ]
}
}
}
I got this error message in client’s sensu-client.log file.
/opt/sensu/embedded/lib/ruby/
gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:664: in
connect_server': unable to resolve server address (EventMachine::ConnectionError) from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:664:in
bind_connect’
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:640:in `connect’
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amq-client-0.9.12/lib/amq/client/async/adapters/event_machine.rb:45: in
connect' from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-0.9.10/lib/amqp/client.rb:39:in
connect’
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/amqp-0.9.10/lib/amqp/connection.rb:215:in `connect’
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.10.0/lib/sensu/rabbitmq.rb:34:in `connect'
from /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-0.10.0/lib/sensu/rabbitmq.rb:67:in `connect'
What’s wrong? How can i solve this?