@jimp:
Not sure about that - I think if you install nrpe2 it should show the command paths in the package settings.
oops. Didn't know that pfSense was already installed to the system and had NRPEv2 option in the web GUI. …Services --> NRPEv2
For googlers:
1 - Created plugin -
#!/bin/sh
real_rtt=`cut -f7 -d '|' /tmp/apinger.status | sed s/..$//`
rtt=`cut -f7 -d '|' /tmp/apinger.status | sed s/......$//`
isp=`cut -f3 -d '|' /tmp/apinger.status`
ispIP=`cut -f1 -d '|' /tmp/apinger.status`
if [ $rtt -lt 50 ]
then
echo "Normal - $isp RTT OK for $ispIP : $real_rtt ms"
stateid=0
elif [ $rtt -gt 50 ] && [ $rtt -lt 100 ]
then
echo "Warning - $isp RTT Increasing for $ispIP : $real_rtt ms"
stateid=1
elif [ $rtt -gt 100 ]
then
echo "Alert - $isp RTT Critical for $ispIP : $real_rtt ms"
stateid=2
fi
exit $stateid
2 - SCPed plugin to /usr/local/libexec/nagios directory
3 - pfSense web GUI –> Services --> NRPEv2
4 - Create new entry with check_pfsense_gateway_rtt as name and select the same name from plugin drop down menu:
[attachment image 1]
5 - add entry to /etc/nagios/services.cfg
define service{
use basic-service
service_description pfSense
servicegroups local
host_name pfsensegw1
check_command check_nrpe!check_pfsense_gateway_rtt
}
6 - add hostgroup entry to /etc/nagios/hosts.cfg for the pfsense
define host{
use basic-host
host_name pfsensegw1
alias pfsensegw1
address 192.168.1.1
hostgroups firewalls,pfsense
}
7 - add entry to /etc/nagios/commands.cfg
# pfSense
define command{
command_name check_pfsense_gateway_rtt
command_line $USER1$/check_pfsense_gateway_rtt -H $HOSTADDRESS$
}
8 - service nagios reload
9 - open nagios and check to see if service appears under your host. In my case "pfsensegw1"
[attachment image 2]
pfsense-1.png
pfsense-1.png_thumb
pfsense-2.png
pfsense-2.png_thumb