Page 1 of 1
list of commands that i need to mention in commands.cfg
Posted: Wed Nov 26, 2014 8:46 am
by rajivsairam
I need list of commands that i need to mention in commands.cfg file for OS monitoring parameters like CPU, users, swap and memory...
Can anyone provide them to me. I am trying to monitor remote system using add-ocheck_by_ssh plugin instead of NRPE add-on.
Re: list of commands that i need to mention in commands.cfg
Posted: Wed Nov 26, 2014 10:40 am
by tmcdonald
Can you be a bit more specific? What OS are you trying to monitor? That will greatly affect what commands need to be run over SSH.
Re: list of commands that i need to mention in commands.cfg
Posted: Wed Nov 26, 2014 11:48 am
by rajivsairam
tmcdonald wrote:Can you be a bit more specific? What OS are you trying to monitor? That will greatly affect what commands need to be run over SSH.
I am trying to monitor "SUSE Linux Enterprise Server 11" on which Hadoop is running. We have monitoring enabled for Hadoop services using nagios over ssh. I would like to monitor OS parameters like disk, CPU usage and memory..etc. I am unable to update commands.cfg file with correct commands for monitoring OS parameters. i am not sure how to mention threshold levels for these parameters.
For example :-
define command {
command_name check_ssh_load
command_line $USER1$/check_by_ssh -H $HOSTADDRESS$ -C "/usr/lib64/nagios/plugins/check_load -w $ARG1$ -c $ARG2$"
}
In the smae way i need commands for other parameters of OS like disk, CPU usage, memory, users.. etc.
Re: list of commands that i need to mention in commands.cfg
Posted: Wed Nov 26, 2014 12:24 pm
by abrist
Well, a default install of nrpe and nagios plugins on the remote host should get you those base checks. Additionally, most core installs will include these base check commands. What is the output of:
Code: Select all
grep "check_" /path/to/commands.cfg | grep command_name
Re: list of commands that i need to mention in commands.cfg
Posted: Wed Nov 26, 2014 12:35 pm
by eloyd
Even better, since not all commands would start with "check_" is to:
Code: Select all
grep "command_name" commands.cfg
or
grep "check_command" services.cfg
Since those are the directives that define the commands to execute.
Re: list of commands that i need to mention in commands.cfg
Posted: Wed Nov 26, 2014 12:40 pm
by abrist
eloyd wrote:Since those are the directives that define the commands to execute.
Yeah, probably a good call. I was trying to eliminate all of the commands that are used more for internal purposes. Either will work I guess.