Memory Usage Linux

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

Re: Memory Usage Linux

Postby slansing » Thu Jun 13, 2013 4:19 pm

The above should be correct, it should at least tell you if the command on the other end is incorrectly defined.
slansing
 
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Memory Usage Linux

Postby ofadl » Thu Jun 13, 2013 5:56 pm

so any idea of what to do next??
ofadl
 
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Memory Usage Linux

Postby abrist » Fri Jun 14, 2013 12:18 pm

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.
abrist
Red Shirt
 
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Memory Usage Linux

Postby ofadl » Fri Jun 14, 2013 12:43 pm

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
ofadl
 
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Memory Usage Linux

Postby abrist » Fri Jun 14, 2013 12:58 pm

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.
abrist
Red Shirt
 
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Memory Usage Linux

Postby ofadl » Fri Jun 14, 2013 2:15 pm

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
ofadl
 
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Memory Usage Linux

Postby abrist » Mon Jun 17, 2013 1:02 pm

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.
abrist
Red Shirt
 
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Memory Usage Linux

Postby ofadl » Tue Jun 18, 2013 8:42 am

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

Postby ofadl » Tue Jun 18, 2013 8:51 am

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

Postby ofadl » Tue Jun 18, 2013 9:21 am

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$
}
ofadl
 
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

PreviousNext

Return to Community Support

Who is online

Users browsing this forum: daniel.donath and 34 guests