Re: Plugins and command clarification on 3.2.1 [Solved]
Posted: Mon May 21, 2012 4:19 am
Hello,
I tried and followed to many tutorials and advices between Nagios 3.2.1 and Nagios 3.4.1 (not to add shiken
I want to stick with Nagios 3.2.1 for the moment but i'm totally confused on how plugins and command work now.
Nagios 3.2.1 LOCALHOST
1/ Plugins should be installed on my nagios monitoring server in /usr/lib/nagios/plugins
2/ Commands should be set somewhere... but where ?
My /etc/nagios3/commands.cfg is quite empty.
On the other hand if i look at my Nagios frontend i have several commands working fine (Current Load, Current Users, Disk Space, HTTP, SSH, Total Processes) and -> configuration -> commands show plenty of commands. They work for localhost and remote host. (? remote host need them here ?)
Now let's check it out.
I can see a "check_swap" plugins in "/usr/lib/nagios/plugins/check_swap"
But in my "configuration -> commands" i don't see it and setting it gives an error on "service nagios3 reload".
However i don't have a "/usr/lib/nagios/plugins/check_swap_statd_level" but i have it in "configuration -> commands" and it work just fine if i set it (see below).
3/ Define the service in /etc/nagios3/conf.d/localhost.cfg
?? What am i missing ?
Nagios 3.2.1 REMOTE SERVER
1/ Plugins should be installed on my nagios monitoring server in "/usr/lib/nagios/plugins"
2/ "/etc/nagios/nrpe.cfg" is the only file i have to edit on my remote server.
I have to set the "allowed_hosts".
And at the bottom of the files, the commands.
I have successfully set hardcoded commands (they were uncommented by default i use them naturally) etc...
3/ Define the service back on my nagios monitoring server in /etc/nagios3/conf.d/remote_server.cfg
And it work.
How does it sound ?
I tried and followed to many tutorials and advices between Nagios 3.2.1 and Nagios 3.4.1 (not to add shiken
I want to stick with Nagios 3.2.1 for the moment but i'm totally confused on how plugins and command work now.
Nagios 3.2.1 LOCALHOST
1/ Plugins should be installed on my nagios monitoring server in /usr/lib/nagios/plugins
2/ Commands should be set somewhere... but where ?
My /etc/nagios3/commands.cfg is quite empty.
On the other hand if i look at my Nagios frontend i have several commands working fine (Current Load, Current Users, Disk Space, HTTP, SSH, Total Processes) and -> configuration -> commands show plenty of commands. They work for localhost and remote host. (? remote host need them here ?)
Now let's check it out.
I can see a "check_swap" plugins in "/usr/lib/nagios/plugins/check_swap"
But in my "configuration -> commands" i don't see it and setting it gives an error on "service nagios3 reload".
However i don't have a "/usr/lib/nagios/plugins/check_swap_statd_level" but i have it in "configuration -> commands" and it work just fine if i set it (see below).
3/ Define the service in /etc/nagios3/conf.d/localhost.cfg
Code: Select all
define service{
use generic-service
host_name localhost
service_description Current Swap
check_command check_swap_statd_level!20!10
}Nagios 3.2.1 REMOTE SERVER
1/ Plugins should be installed on my nagios monitoring server in "/usr/lib/nagios/plugins"
2/ "/etc/nagios/nrpe.cfg" is the only file i have to edit on my remote server.
I have to set the "allowed_hosts".
And at the bottom of the files, the commands.
I have successfully set hardcoded commands (they were uncommented by default i use them naturally)
Code: Select all
command[check_swap]=/usr/lib/nagios/plugins/check_swap -w 20 -c 103/ Define the service back on my nagios monitoring server in /etc/nagios3/conf.d/remote_server.cfg
Code: Select all
define service{
use generic-service
host_name remote_server
service_description Swap Memory
check_command check_nrpe_1arg!check_swap
}
How does it sound ?