Memory Usage Linux

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.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Memory Usage Linux

Post by slansing »

The above should be correct, it should at least tell you if the command on the other end is incorrectly defined.
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Memory Usage Linux

Post by ofadl »

so any idea of what to do next??
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Memory Usage Linux

Post by abrist »

Just to verify, the remote host's nrpe.cfg contains the command:

Code: Select all

command[check_mem]=/usr/lib/nagios/plugins/check_mem.sh 85 95
And the check that you are attempting from the nagios server is:

Code: Select all

/usr/lib/nagios/plugins/check_nrpe -H content.comtex.com -c check_mem
Correct?
Have you edited any of these files through filezilla/windows text editors?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Memory Usage Linux

Post by ofadl »

ok so, the path in the remote host's nrpe.cfg was defining a different path then the one that was suppsoe to be listed, i changed it this

command[check_mem]=/usr/lib/nagios/plugins/check_mem.sh 85 95

the check im running on then nagios server like you told me the :


/usr/lib/nagios/plugins/check_nrpe -H content.comtex.com -c check_mem

is returning :

OK - Memory usage is 9.700% (199832)

i restarted the nrpe servero n the remote host, and restarted nagios on the nagios server, but im still getting the same error
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Memory Usage Linux

Post by abrist »

ofadl wrote:OK - Memory usage is 9.700% (199832)
Well the check is now working from the cli. Can we see your service check definition and command definition from the nagios server configs one last time?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Memory Usage Linux

Post by ofadl »

service definition located in:

/etc/nagios3/objects/

located in my linux.cfg file is the service defintion:

service definiton:

define service{
use generic-service
host_name content.comtex.com
service_description Memory Usage
check_command check_nrpe!check_mem
}


check_nrpe command is located in

/usr/lib/nagios/plugins/check_nrpe
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Memory Usage Linux

Post by abrist »

Do you have a command definition for check_nrpe on the nagios server, if so, can you post it?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Memory Usage Linux

Post by ofadl »

im not sure, like i stated before, i followed what this guide told me, and did nothing more :

http://www.ericmichaelstone.com/?p=3652
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Memory Usage Linux

Post by ofadl »

i went over the nrpe documentation again, and realized i forgot to define a check_nrpe command definition so i defined one in

/usr/local/nagios/etc/objects and in the commands.cfg file i added

define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}

but its still giving me the same error on nagios website
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Memory Usage Linux

Post by ofadl »

wow this is really confusing haha, so i was just looking around and in my:

/etc/nagios-plugins/config

i found a file for check_nrpe.cfg and in it has these two definitions

# this command runs a program $ARG1$ with arguments $ARG2$
define command {
command_name check_nrpe
command_line /usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$
}

# this command runs a program $ARG1$ with no arguments
define command {
command_name check_nrpe_1arg
command_line /usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}
Locked