no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
| — | nrpe [2015/09/24 22:57] (current) – created - external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Nagios Remote Plugin Executor ====== | ||
| + | NRPE can provide stats to a [[nagios]] daemon. | ||
| + | |||
| + | ==== Installation ==== | ||
| + | |||
| + | Install Nagios and NRPE as normal, with the requested plugins. | ||
| + | |||
| + | === Client === | ||
| + | |||
| + | The main Nagios server will request the stats from the remote client. | ||
| + | |||
| + | < | ||
| + | iptables -A INPUT -p tcp -s 173.165.130.129 --dport 5666 -j ACCEPT | ||
| + | </ | ||
| + | |||
| + | === Server === | ||
| + | |||
| + | Create a new config directory for the remote configuration files, like ''/ | ||
| + | |||
| + | You will need three files in the directory. | ||
| + | |||
| + | When you are finished with the files, make sure you tell the Nagios configuration to read them in as well. | ||
| + | |||
| + | < | ||
| + | cfg_dir=/ | ||
| + | </ | ||
| + | |||
| + | == nrpe-command.cfg == | ||
| + | |||
| + | < | ||
| + | define command { | ||
| + | command_name check_nrpe | ||
| + | command_line $USER1$/ | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | == nrpe-hosts.cfg == | ||
| + | |||
| + | < | ||
| + | define host { | ||
| + | use linux-server | ||
| + | host_name gentoo | ||
| + | alias Gentoo Linux Web Server | ||
| + | address 192.168.13.2 | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | == nrpe-services.cfg == | ||
| + | |||
| + | Every service mentioned here must exist on the remote client. | ||
| + | |||
| + | < | ||
| + | define service { | ||
| + | use generic-service | ||
| + | host_name gentoo | ||
| + | service_description Local Users | ||
| + | check_command check_nrpe!check_users | ||
| + | } | ||
| + | |||
| + | define service { | ||
| + | use generic-service | ||
| + | host_name gentoo | ||
| + | service_description System Load | ||
| + | check_command check_nrpe!check_load | ||
| + | } | ||
| + | |||
| + | define service { | ||
| + | use generic-service | ||
| + | host_name gentoo | ||
| + | service_description root hdd | ||
| + | check_command check_nrpe!check_hdd_root | ||
| + | } | ||
| + | |||
| + | define service { | ||
| + | use generic-service | ||
| + | host_name gentoo | ||
| + | service_description var hdd | ||
| + | check_command check_nrpe!check_hdd_var | ||
| + | } | ||
| + | |||
| + | define service { | ||
| + | use generic-service | ||
| + | host_name gentoo | ||
| + | service_description Zombie Processes | ||
| + | check_command check_nrpe!check_zombie_procs | ||
| + | } | ||
| + | |||
| + | define service { | ||
| + | use generic-service | ||
| + | host_name gentoo | ||
| + | service_description Total Processes | ||
| + | check_command check_nrpe!check_total_procs | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | === Commands === | ||
| + | |||
| + | Here are some examples for hadoop: | ||
| + | |||
| + | < | ||
| + | command[check_master]=/ | ||
| + | command[check_rest]=/ | ||
| + | command[check_zookeeper]=/ | ||
| + | </ | ||