Memory Usage Linux
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Memory Usage Linux
The above should be correct, it should at least tell you if the command on the other end is incorrectly defined.
Re: Memory Usage Linux
so any idea of what to do next??
Re: Memory Usage Linux
Just to verify, the remote host's nrpe.cfg contains the command:
And the check that you are attempting from the nagios server is:
Correct?
Have you edited any of these files through filezilla/windows text editors?
Code: Select all
command[check_mem]=/usr/lib/nagios/plugins/check_mem.sh 85 95
Code: Select all
/usr/lib/nagios/plugins/check_nrpe -H content.comtex.com -c check_mem
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.
"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.
Re: Memory Usage Linux
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
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
Re: Memory Usage Linux
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?ofadl wrote:OK - Memory usage is 9.700% (199832)
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.
"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.
Re: Memory Usage Linux
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
/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
Re: Memory Usage Linux
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.
"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.
Re: Memory Usage Linux
im not sure, like i stated before, i followed what this guide told me, and did nothing more :
http://www.ericmichaelstone.com/?p=3652
http://www.ericmichaelstone.com/?p=3652
Re: Memory Usage Linux
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
/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
Re: Memory Usage Linux
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$
}
/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$
}