If you wan’t the check to run on machine Y and check the rabbitmq service which runs on machine X, you have to point the check to use the IP or hostname of machine X with the “-v” parameter.
I am assuming you are using this check - read the code to see the options you can configure.
However, I don’t think you have any use for the rabbitmq alive check on any of these machines. What is the failure that you want to detect? RabbitMQ going down on X? In that case, sensu clients on either X or Y won’t be able to report results so your check result won’t get to the sensu server to be processed. You will not get any alerts, so that’s why I’m saying the check is useless.
To monitor rabbitmq you need some external mechanism (non-sensu). Any TCP monitor would likely do the job, or monitor the process presence locally, etc.
If you are really worried about rabbitmq going down, you can also setup a rabbitmq HA cluster.
On Friday, October 27, 2017 at 7:38:57 AM UTC+2, praka...@firstfuel.com wrote:
Let me explain my architecture. I have two amazon ec2 instances X & Y where X is server and Y is client respectively.
When I run the rabbitmq check at the Y machine or if I simply run the rabbitmq.rb check at Y machine it throws-
CheckRabbitMQAlive CRITICAL: Failed to open TCP connection to localhost:15672 (Connection refused - connect(2) for “localhost” port 15672).
Now if I go through the concept of sensu-server and client, I think we do not require rabbitmq installation at the Y machine, we just need to put the rabbitmq.json file where all the credentials and configurations of X machine will be present.
So if the check runs at Y machine or I run the ruby file directly it will throw the error.
My question is whether the check will be present on Y machine or not ?
At X machine for self monitoring rabbitmq check is present and everything is fine.