check_nrpe

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
nebblkshts
Posts: 58
Joined: Tue Dec 08, 2015 7:35 am

Re: check_nrpe

Post by nebblkshts »

NO that did not
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: check_nrpe

Post 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?
Former Nagios Employee
nebblkshts
Posts: 58
Joined: Tue Dec 08, 2015 7:35 am

Re: check_nrpe

Post by nebblkshts »

sudo: $/check_nrpe: command not found
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: check_nrpe

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
nebblkshts
Posts: 58
Joined: Tue Dec 08, 2015 7:35 am

Re: check_nrpe

Post 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$
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: check_nrpe

Post 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.
Former Nagios Employee.
me.
nebblkshts
Posts: 58
Joined: Tue Dec 08, 2015 7:35 am

Re: check_nrpe

Post by nebblkshts »

Code: Select all

sudo /usr/lib/nagios/plugins/check_nrpe  -H '$HOSTADDRESS$' -t 30 -c '$ARG1$' '$ARG2$'
I get: "Invalid host name '$'
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: check_nrpe

Post 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"
Former Nagios Employee.
me.
nebblkshts
Posts: 58
Joined: Tue Dec 08, 2015 7:35 am

Re: check_nrpe

Post 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...
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: check_nrpe

Post 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?
Former Nagios Employee.
me.
Locked