Monitor pfSense v.2 NRPE2

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
AWS
Posts: 63
Joined: Fri May 13, 2011 4:33 pm
Location: Vancouver, WA

Monitor pfSense v.2 NRPE2

Post 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:
Image

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
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Monitor pfSense v.2 NRPE2

Post 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>
Be sure to check out our Knowledgebase for helpful articles and solutions!
AWS
Posts: 63
Joined: Fri May 13, 2011 4:33 pm
Location: Vancouver, WA

Re: Monitor pfSense v.2 NRPE2

Post by AWS »

It reads:

Code: Select all

NRPE v2.12
Thanks!

AWS
AWS
Posts: 63
Joined: Fri May 13, 2011 4:33 pm
Location: Vancouver, WA

Re: Monitor pfSense v.2 NRPE2

Post 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
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Monitor pfSense v.2 NRPE2

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
AWS
Posts: 63
Joined: Fri May 13, 2011 4:33 pm
Location: Vancouver, WA

Re: Monitor pfSense v.2 NRPE2

Post 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
yancy
Posts: 523
Joined: Thu Oct 06, 2011 10:12 am

Re: Monitor pfSense v.2 NRPE2

Post 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 /
AWS
Posts: 63
Joined: Fri May 13, 2011 4:33 pm
Location: Vancouver, WA

Re: Monitor pfSense v.2 NRPE2

Post 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
AWS
Posts: 63
Joined: Fri May 13, 2011 4:33 pm
Location: Vancouver, WA

Re: Monitor pfSense v.2 NRPE2

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Monitor pfSense v.2 NRPE2

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked