Page 7 of 12

Re: check_nrpe

Posted: Wed Dec 16, 2015 1:26 pm
by nebblkshts
NO that did not

Re: check_nrpe

Posted: Wed Dec 16, 2015 2:02 pm
by rkennedy
Did you run the following after making the change?

Code: Select all

pkill -9 nagios
sudo service nagios3 start
What error do you receive when trying to run the command? Can you run the command manually over the CLI?

Re: check_nrpe

Posted: Wed Dec 16, 2015 2:13 pm
by nebblkshts
sudo: $/check_nrpe: command not found

Re: check_nrpe

Posted: Wed Dec 16, 2015 6:49 pm
by Box293
You'll need to execute the command in the location that check_nrpe is in or directly reference it:
For example:

Code: Select all

/usr/local/nagios/libexec/check_nrpe

Re: check_nrpe

Posted: Thu Dec 17, 2015 8:13 am
by nebblkshts
administrator@NETSERVICES:/usr/lib/nagios/plugins$ ls
check_apt check_dummy check_imap check_mysql check_oracle check_simap check_ups
check_bgpstate check_file_age check_ircd check_mysql_query check_overcr check_smtp check_users
check_breeze check_flexlm check_jabber check_nagios check_pgsql check_snmp check_wave
check_by_ssh check_ftp check_ldap check_nntp check_ping check_snmp_printer negate
check_clamd check_host check_ldaps check_nntps check_pop check_spop urlize
check_cluster check_hpjd check_linux_raid check_nrpe check_procs check_ssh utils.pm
check_dhcp check_http check_load check_nt check_radius check_ssmtp utils.sh
check_dig check_icmp check_log check_ntp check_real check_swap
check_disk check_ide_smart check_mailq check_ntp_peer check_rpc check_tcp
check_disk_smb check_ifoperstatus check_mrtg check_ntp_time check_rta_multi check_time
check_dns check_ifstatus check_mrtgtraf check_nwstat check_sensors check_udp
administrator@NETSERVICES:/usr/lib/nagios/plugins$ sudo $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c '$ARG1$' '$ARG2$'
sudo: $/check_nrpe: command not found
administrator@NETSERVICES:/usr/lib/nagios/plugins$

Re: check_nrpe

Posted: Thu Dec 17, 2015 3:31 pm
by hsmith
nebblkshts wrote:administrator@NETSERVICES:/usr/lib/nagios/plugins$ ls
check_apt check_dummy check_imap check_mysql check_oracle check_simap check_ups
check_bgpstate check_file_age check_ircd check_mysql_query check_overcr check_smtp check_users
check_breeze check_flexlm check_jabber check_nagios check_pgsql check_snmp check_wave
check_by_ssh check_ftp check_ldap check_nntp check_ping check_snmp_printer negate
check_clamd check_host check_ldaps check_nntps check_pop check_spop urlize
check_cluster check_hpjd check_linux_raid check_nrpe check_procs check_ssh utils.pm
check_dhcp check_http check_load check_nt check_radius check_ssmtp utils.sh
check_dig check_icmp check_log check_ntp check_real check_swap
check_disk check_ide_smart check_mailq check_ntp_peer check_rpc check_tcp
check_disk_smb check_ifoperstatus check_mrtg check_ntp_time check_rta_multi check_time
check_dns check_ifstatus check_mrtgtraf check_nwstat check_sensors check_udp
administrator@NETSERVICES:/usr/lib/nagios/plugins$ sudo $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c '$ARG1$' '$ARG2$'
sudo: $/check_nrpe: command not found
administrator@NETSERVICES:/usr/lib/nagios/plugins$
/usr/lib/nagios/plugins/check_nrpe is your command. Type the arguments after that.

Re: check_nrpe

Posted: Thu Dec 17, 2015 3:52 pm
by nebblkshts

Code: Select all

sudo /usr/lib/nagios/plugins/check_nrpe  -H '$HOSTADDRESS$' -t 30 -c '$ARG1$' '$ARG2$'
I get: "Invalid host name '$'

Re: check_nrpe

Posted: Thu Dec 17, 2015 3:58 pm
by hsmith
That's what Nagios uses. From the command line, you need to type in in the format of

Code: Select all

/usr/lib/nagios/plugins/check_nrpe -H 172.16.0.1 -t 60
or something similar. Didn't you have a working test from the command line earlier in this post?
nebblkshts wrote:Found it ... "/usr/lib/nagios/plugins"

Ran it and "OK: physical memory: 12.7G|'physical memory %'=79%;80;90 'physical memory'=12.66G;12.71;14.3;0;15.89"

Re: check_nrpe

Posted: Thu Dec 17, 2015 4:05 pm
by nebblkshts
Ok, Sorry did not realize I needed to update that.

Code: Select all

sudo ./check_nrpe  -H LyncFE1 -t 60
I (0,4,1,105 2014-04-28) seem to be doing fine...

Re: check_nrpe

Posted: Thu Dec 17, 2015 4:13 pm
by hsmith
So if you run ./check_nrpe -H LYNCFE2 -c CheckMem -a MaxWarn=80% MaxCrit=90% ShowAll type=physical it works, you stated earlier.

This is your service definition:

Code: Select all

define service {
use infra-trivial-service
host_name LYNCFE2
service_description Memory Usage
check_command check_nrpe!CheckMem!-a MaxWarn=80% MaxCrit=90% ShowAll type=physical
}
This looks good.

This is your check_nrpe command:

Code: Select all

command_line                             $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c '$ARG1$' '$ARG2$'
I can't see a reason this wouldn't be working right now. Everything should be getting passed correctly. Can you please upload a screenshot of the error you are getting in the GUI?