list of commands that i need to mention in commands.cfg

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
rajivsairam
Posts: 4
Joined: Thu Nov 13, 2014 7:35 am

list of commands that i need to mention in commands.cfg

Post 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.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: list of commands that i need to mention in commands.cfg

Post 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.
Former Nagios employee
rajivsairam
Posts: 4
Joined: Thu Nov 13, 2014 7:35 am

Re: list of commands that i need to mention in commands.cfg

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

Re: list of commands that i need to mention in commands.cfg

Post 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
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.
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: list of commands that i need to mention in commands.cfg

Post 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.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: list of commands that i need to mention in commands.cfg

Post 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.
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.
Locked