it been a while since I configure nagios
-
- Posts: 68
- Joined: Tue Oct 06, 2015 9:50 pm
it been a while since I configure nagios
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
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
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: it been a while since I configure nagios
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
also the definition in command.cfg is not necessary
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
-
- Posts: 68
- Joined: Tue Oct 06, 2015 9:50 pm
Re: it been a while since I configure nagios
the command show run from the client side under NRPE
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: it been a while since I configure nagios
Did you make the recommended changes to the command I suggested then?
After making the changes, restart nagiosscottwilkerson wrote: It all looks right to me if it is on the client except you should change the following
service.cfg
also the definition in command.cfg is not necessaryCode: Select all
define service { use generic-service service_description FreeSWITCH Call Count check_command check_nrpe!check_freeswitch
-
- Posts: 68
- Joined: Tue Oct 06, 2015 9:50 pm
Re: it been a while since I configure nagios
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
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
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: it been a while since I configure nagios
change this
To this
You already have -q 'show-calls-cout' in the command on NRPE and that's not how you would pass arguments anyways
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H xx.xx.xx.xx -c check_freeswitch -q 'show-calls-cout'
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H xx.xx.xx.xx -c check_freeswitch
-
- Posts: 68
- Joined: Tue Oct 06, 2015 9:50 pm
Re: it been a while since I configure nagios
ok thanks for the feedback how can I pass the augment correctly then .
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: it been a while since I configure nagios
If you had arguments specified in your NRPE file like so
You could then call nrpe like so
And it would be passed to NRPE and this is what would be executed on the remote system
Code: Select all
command[check_freeswitch]=/usr/local/nagios/libexec/check_freeswitch -q show-calls-count $ARG1$
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H xx.xx.xx.xx -c check_freeswitch -a '-vvv'
Code: Select all
/usr/local/nagios/libexec/check_freeswitch -q show-calls-count -vvv