Page 1 of 2
Monitor pfSense v.2 NRPE2
Posted: Wed Jan 18, 2012 3:52 pm
by AWS
Hello.
CentOS 5
32-bit
Manual Install of XI
Transparent proxy in place, no SSL
I'm running a pfSense 2.0.1 system. An add-on within the system is NRPE2 monitoring for Nagios. Out of the box it has some pre-built checks. I setup monitoring within my Nagios server but all I get to work is the basic ping check.
Here is the out of the box settings within pfS:
I setup a new config based off of "other" for monitoring a Unix machine. I change my values in Nagios while setting up to match the "extra options" setup on the pfS side.
Can anyone give me some ideas what I'm doing wrong? What "more details" do I need to explain or show to make better sense of this issue?
Thanks
AWS
Re: Monitor pfSense v.2 NRPE2
Posted: Wed Jan 18, 2012 4:59 pm
by lmiltchev
What is the output of the following command, ran from the command line on the Nagios server?
Code: Select all
# /usr/local/nagios/libexec/check_nrpe -H <your_target_machine_IP_address>
Re: Monitor pfSense v.2 NRPE2
Posted: Wed Jan 18, 2012 6:18 pm
by AWS
Re: Monitor pfSense v.2 NRPE2
Posted: Wed Jan 18, 2012 6:29 pm
by AWS
The command within Nagios I am using for checking disk /var/run is:
Code: Select all
check_nrpe!check_disk!-a '-w 20% -c 10% -p /var/run'
Which appears to be the same settings as the screen shot above. Yes?
AWS
Re: Monitor pfSense v.2 NRPE2
Posted: Thu Jan 19, 2012 1:33 pm
by lmiltchev
OK, try running these commands from the Nagios server in the command line:
Code: Select all
# ./check_nrpe -H <your_target_machine_IP_address> -t 30 -c check_disk -a '-w 20% -c 10% -p /'
and
Code: Select all
# ./check_nrpe -H <your_target_machine_IP_address> -t 30 -c check_disk -a '-w 20% -c 10% -p /var/run'
Can you post the output of these commands?
Re: Monitor pfSense v.2 NRPE2
Posted: Thu Jan 19, 2012 3:30 pm
by AWS
Thanks for the help.
Results are as follows:
Code: Select all
[root@nagios ~]# ./check_nrpe -H 10.1.1.254 -t 30 -c check_disk -a '-w 20% -c 10% -p /'
-bash: ./check_nrpe: No such file or directory
[root@nagios ~]#
"No such file or directory" for both commands.
AWS
Re: Monitor pfSense v.2 NRPE2
Posted: Thu Jan 19, 2012 3:58 pm
by yancy
Are you in the correct directory?
Try:
/usr/local/nagios/libexec/check_nrpe -H 10.1.1.254 -t 30 -c check_disk -a '-w 20% -c 10% -p /
Re: Monitor pfSense v.2 NRPE2
Posted: Thu Jan 19, 2012 4:08 pm
by AWS
Thanks for the location of the check_nrpe command. I was looking for it...
Results:
Code: Select all
[root@nagios ~]# /usr/local/nagios/libexec/check_nrpe -H 10.1.1.254 -t 30 -c check_disk -a '-w 20% -c 10% -p /'
CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
[root@nagios ~]#
I did verify that the daemon is running on pfS.
Now I'm trying to view/find the logs on the pfSense side for NRPE.
Thanks for your patience. I make no claims to being good at anything in the Unix world.
AWS
Re: Monitor pfSense v.2 NRPE2
Posted: Thu Jan 19, 2012 4:18 pm
by AWS
Could it be an SSL issue? When I run:
Code: Select all
[2.0.1-RELEASE][[email protected]]/usr/local/libexec/nagios(12): ./check_nrpe2 -H 10.1.1.254 -t 30 -c check_disk -a '-w 20% -c 10% -p /'
CHECK_NRPE: Error - Could not complete SSL handshake.
Then if I try to my Nagios server the same:
Code: Select all
[2.0.1-RELEASE][[email protected]]/usr/local/libexec/nagios(13): ./check_nrpe2 -H 10.1.1.4 -t 30 -c check_disk -a '-w 20% -c 10% -p /'
Connection refused by host
Is my pfS (10.1.1.254) trying to SSL communicate with my Nagios (10.1.1.4) box and Nagios isn't configured for such? Is that what these messages are telling me?
Thanks
AWS
Re: Monitor pfSense v.2 NRPE2
Posted: Thu Jan 19, 2012 4:36 pm
by scottwilkerson
AWS wrote:Could it be an SSL issue? When I run:
Code: Select all
[2.0.1-RELEASE][[email protected]]/usr/local/libexec/nagios(12): ./check_nrpe2 -H 10.1.1.254 -t 30 -c check_disk -a '-w 20% -c 10% -p /'
CHECK_NRPE: Error - Could not complete SSL handshake.
Then if I try to my Nagios server the same:
Code: Select all
[2.0.1-RELEASE][[email protected]]/usr/local/libexec/nagios(13): ./check_nrpe2 -H 10.1.1.4 -t 30 -c check_disk -a '-w 20% -c 10% -p /'
Connection refused by host
Is my pfS (10.1.1.254) trying to SSL communicate with my Nagios (10.1.1.4) box and Nagios isn't configured for such? Is that what these messages are telling me?
Thanks
AWS
Ok, you are making the connection the wrong way. From the Nagios machine you did it correct here:
Code: Select all
[root@nagios ~]# /usr/local/nagios/libexec/check_nrpe -H 10.1.1.254 -t 30 -c check_disk -a '-w 20% -c 10% -p /'
CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
[root@nagios ~]#
but there was an error, that error was likeny that your pfs doesn't have a check_disk command...
Try this from the Nagios XI console
Code: Select all
cd /usr/local/nagios/libexec/
/check_nrpe -H 10.1.1.254 -c check_load