define custom service
Posted: Fri Aug 24, 2012 9:59 am
Hello,
I am trying to actively monitor webserver behind the load balancer. The one is listening on default: 5666 and other on 15666 port. I am using nagiosXI. The monitoring on defaul port is running. Currently I am having difficulty to set up the one with port 15666.
via command line: /usr/local/nagios/libexec/check_nrpe -H your.domain.com -p 15666 -t 30 -c check_init_service -a http everything is working, but I am not able to add custom command to listen on 15666.
I have tried to edit the commands.cfg
define command {
command_name check_nrpe15666
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 15666 -t 30 -c $ARG1$ $ARG2$
}
after restart or service re-configuration the commands.cfg will be rewritten to last snapshot or loaded from DB and my custom command is not there anymore. I also modified nagios.cfg, but did not help.
Q1: Can I configure monitoring server to listen/comunicate with to both 5666 and 15666.
Q2: If not, how do I add custom service command?
Q3: What is the approach to monitor webservers behind the loadbalancer?
Thanks.
I am trying to actively monitor webserver behind the load balancer. The one is listening on default: 5666 and other on 15666 port. I am using nagiosXI. The monitoring on defaul port is running. Currently I am having difficulty to set up the one with port 15666.
via command line: /usr/local/nagios/libexec/check_nrpe -H your.domain.com -p 15666 -t 30 -c check_init_service -a http everything is working, but I am not able to add custom command to listen on 15666.
I have tried to edit the commands.cfg
define command {
command_name check_nrpe15666
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 15666 -t 30 -c $ARG1$ $ARG2$
}
after restart or service re-configuration the commands.cfg will be rewritten to last snapshot or loaded from DB and my custom command is not there anymore. I also modified nagios.cfg, but did not help.
Q1: Can I configure monitoring server to listen/comunicate with to both 5666 and 15666.
Q2: If not, how do I add custom service command?
Q3: What is the approach to monitor webservers behind the loadbalancer?
Thanks.