check_pop on nagios monitor server and NRPE host
Posted: Wed Jun 12, 2019 2:57 pm
Hello, I'm new to Nagios, however, I've been able to get much much accomplished. I have been stumped on the monitoring of POP3S mail server using Nagios Core 4.3.2.
On Nagios Monitor Server ---
commands.cfg
# 'check_pop' command definition
define command{
command_name check_pop
command_line $USER1$/check_pop -H $HOSTADDRESS$ -p $ARG1$ -w $ARG2$ -c $ARG3$ -d $ARG4$ -t $ARG5$ -S
}
localhost.cfg
define service{
use local-service ; Name of service template to use
host_name localhost
service_description POP3s
check_command check_pop!3.159.212.217!995!15!30!10!60!
notifications_enabled 0
}
services.cfg
define service{
use generic-service
host_name alphprdfuse1i
service_description POP3s
check_command check_nrpe!check_pop
}
ON NRPE Server
nrpe.cfg
command[check_pop]=/usr/local/nagios/libexec/check_pop -H 3.159.212.217 -p 995 -w 5 -c 10 -d 10 -t 15 -S
ERRORS
on NRPE server
CHECK_NRPE STATE CRITICAL: Socket timeout after 10 seconds.
on Nagios local system monitor
check_pop: Port must be a positive integer
I'm thinking on the NRPE server it is using the server address instead of the exchange server address. And on the Nagios host monitor server it is my command definition check_pop!3.159.212.217!995!15!30!10!60!
HOWEVER,
ON BOTH SERVERS WHEN I EXECUTE THIS STATEMENT IT WORKS
/usr/local/nagios/libexec/check_pop -H 3.159.212.217 -p 995 -w 15 -c 30 -d 10 -t 60 -S
POP OK - 0.082 second response time on 3.159.212.217 port 995 [+OK The Microsoft Exchange POP3 service is ready.]|time=0.081917s;15.000000;30.000000;0.000000;60.000000
WHAT am I doing wrong and do not understand? thank you so much!
I have tried this on the NRPE server
./check_nrpe -H localhost -c check_pop -H 3.159.212.217 -p 995 -w 15 -c 30 -d 10 -t 60 -S
returned this... so does this mean I have to have an nagios nrpe daemon running the exchange server?
if yes, how can I get around this?
Note:
This plugin requires that you have the NRPE daemon running on the remote host.
You must also have configured the daemon to associate a specific plugin command
with the [command] option you are specifying here. Upon receipt of the
[command] argument, the NRPE daemon will run the appropriate plugin command and
send the plugin output and return code back to *this* plugin. This allows you
to execute plugins on remote hosts and 'fake' the results to make Nagios think
the plugin is being run locally.
On Nagios Monitor Server ---
commands.cfg
# 'check_pop' command definition
define command{
command_name check_pop
command_line $USER1$/check_pop -H $HOSTADDRESS$ -p $ARG1$ -w $ARG2$ -c $ARG3$ -d $ARG4$ -t $ARG5$ -S
}
localhost.cfg
define service{
use local-service ; Name of service template to use
host_name localhost
service_description POP3s
check_command check_pop!3.159.212.217!995!15!30!10!60!
notifications_enabled 0
}
services.cfg
define service{
use generic-service
host_name alphprdfuse1i
service_description POP3s
check_command check_nrpe!check_pop
}
ON NRPE Server
nrpe.cfg
command[check_pop]=/usr/local/nagios/libexec/check_pop -H 3.159.212.217 -p 995 -w 5 -c 10 -d 10 -t 15 -S
ERRORS
on NRPE server
CHECK_NRPE STATE CRITICAL: Socket timeout after 10 seconds.
on Nagios local system monitor
check_pop: Port must be a positive integer
I'm thinking on the NRPE server it is using the server address instead of the exchange server address. And on the Nagios host monitor server it is my command definition check_pop!3.159.212.217!995!15!30!10!60!
HOWEVER,
ON BOTH SERVERS WHEN I EXECUTE THIS STATEMENT IT WORKS
/usr/local/nagios/libexec/check_pop -H 3.159.212.217 -p 995 -w 15 -c 30 -d 10 -t 60 -S
POP OK - 0.082 second response time on 3.159.212.217 port 995 [+OK The Microsoft Exchange POP3 service is ready.]|time=0.081917s;15.000000;30.000000;0.000000;60.000000
WHAT am I doing wrong and do not understand? thank you so much!
I have tried this on the NRPE server
./check_nrpe -H localhost -c check_pop -H 3.159.212.217 -p 995 -w 15 -c 30 -d 10 -t 60 -S
returned this... so does this mean I have to have an nagios nrpe daemon running the exchange server?
if yes, how can I get around this?
Note:
This plugin requires that you have the NRPE daemon running on the remote host.
You must also have configured the daemon to associate a specific plugin command
with the [command] option you are specifying here. Upon receipt of the
[command] argument, the NRPE daemon will run the appropriate plugin command and
send the plugin output and return code back to *this* plugin. This allows you
to execute plugins on remote hosts and 'fake' the results to make Nagios think
the plugin is being run locally.