Page 1 of 1
it been a while since I configure nagios
Posted: Sat Jun 23, 2018 11:09 am
by spyder13337
I know it be a while since I use nagios but I am not sure it config properly perhaps you can give me a quick look over
is this correct
Serverside :
nrpe.cfg
command[check_freeswitch]=/usr/local/nagios/libexec/check_freeswitch -q show-calls-count
command.cfg
'check_freeswtich' command definition
define command{
command_name check_freeswitch
command_line $USER1$/check_freeswitch -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$
service.cfg
define service {
use generic-service
service_description FreeSWITCH Call Count
check_command check_freeswitch! -q show-calls-count
Client :
nope.cfg
command[check_freeswitch]=/usr/local/nagios/libexec/check_freeswitch -q show-calls-count
Re: it been a while since I configure nagios
Posted: Mon Jun 25, 2018 8:43 am
by scottwilkerson
Does check_freeswitch connect directly from the nagios server or are you installing it on the client with the NRPE configs you showed?
It all looks right to me if it is on the client except you should change the following
service.cfg
Code: Select all
define service {
use generic-service
service_description FreeSWITCH Call Count
check_command check_nrpe!check_freeswitch
also the definition in command.cfg is not necessary
Re: it been a while since I configure nagios
Posted: Wed Jun 27, 2018 10:17 pm
by spyder13337
the command show run from the client side under NRPE
Re: it been a while since I configure nagios
Posted: Thu Jun 28, 2018 7:10 am
by scottwilkerson
Did you make the recommended changes to the command I suggested then?
scottwilkerson wrote:
It all looks right to me if it is on the client except you should change the following
service.cfg
Code: Select all
define service {
use generic-service
service_description FreeSWITCH Call Count
check_command check_nrpe!check_freeswitch
also the definition in command.cfg is not necessary
After making the changes, restart nagios
Re: it been a while since I configure nagios
Posted: Thu Jun 28, 2018 10:11 pm
by spyder13337
yes I did and restart both nrpe and nagios
result still the same if I run the command on client it get the expected result if I run it from
this is the common I run from nagios server to test (I get invalid option -q )
/usr/local/nagios/libexec/check_nrpe -H xx.xx.xx.xx -c check_freeswitch -q 'show-calls-cout'
on. client side I run
/usr/local/nagios/libexec/check_freeswitch -q show-calls-count
FREESWITCH OK - Result of check is: 25 total. | show-calls-count=25;;
these are the correct value that it should return
Re: it been a while since I configure nagios
Posted: Fri Jun 29, 2018 7:49 am
by scottwilkerson
change this
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H xx.xx.xx.xx -c check_freeswitch -q 'show-calls-cout'
To this
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H xx.xx.xx.xx -c check_freeswitch
You already have
-q 'show-calls-cout' in the command on NRPE and that's not how you would pass arguments anyways
Re: it been a while since I configure nagios
Posted: Fri Jun 29, 2018 8:15 am
by spyder13337
ok thanks for the feedback how can I pass the augment correctly then .
Re: it been a while since I configure nagios
Posted: Fri Jun 29, 2018 8:33 am
by scottwilkerson
If you had arguments specified in your NRPE file like so
Code: Select all
command[check_freeswitch]=/usr/local/nagios/libexec/check_freeswitch -q show-calls-count $ARG1$
You could then call nrpe like so
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H xx.xx.xx.xx -c check_freeswitch -a '-vvv'
And it would be passed to NRPE and this is what would be executed on the remote system
Code: Select all
/usr/local/nagios/libexec/check_freeswitch -q show-calls-count -vvv