Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
tutorial:adm:server_monitoring [2019/03/25 10:28] fiserp [Implementation] |
tutorial:adm:server_monitoring [2019/03/25 11:27] fiserp [Implementation] |
||
---|---|---|---|
Line 36: | Line 36: | ||
* All probes are located in their default installation location ''/ | * All probes are located in their default installation location ''/ | ||
* We use one external probe check\_mem which can be downloaded here: [[https:// | * We use one external probe check\_mem which can be downloaded here: [[https:// | ||
- | <code bash> | + | <file bash check_mem> |
#!/bin/bash | #!/bin/bash | ||
Line 79: | Line 79: | ||
exit | exit | ||
fi | fi | ||
- | </code> | + | </file> |
**Deployment** | **Deployment** | ||
- | First, install | + | First, install necessary packages: |
< | < | ||
yum install nrpe nagios-plugins-nrpe nagios-plugins-swap nagios-plugins-disk nagios-plugins-load nagios-plugins-procs nagios-plugins-ntp nagios-plugins-http nagios-plugins-pgsql | yum install nrpe nagios-plugins-nrpe nagios-plugins-swap nagios-plugins-disk nagios-plugins-load nagios-plugins-procs nagios-plugins-ntp nagios-plugins-http nagios-plugins-pgsql | ||
</ | </ | ||
- | If you use SELinux, we need to permit the check_disk plugin access to the /// | + | If you use SELinux, we need to permit the check_disk plugin access to the '' |
< | < | ||
yum install policycoreutils-python | yum install policycoreutils-python | ||
semanage permissive -a nagios_checkdisk_plugin_t | semanage permissive -a nagios_checkdisk_plugin_t | ||
</ | </ | ||
- | Edit the /// | + | Edit the '' |
< | < | ||
allowed_hosts=127.0.0.1, | allowed_hosts=127.0.0.1, | ||
</ | </ | ||
- | Create a configuration of system checks in the file /// | + | Create a configuration of system checks in the file '' |
- | <code> | + | <file txt checks.cfg> |
command[check_swap]=/ | command[check_swap]=/ | ||
command[check_disk]=/ | command[check_disk]=/ | ||
Line 109: | Line 109: | ||
command[check_httpd_cert]=/ | command[check_httpd_cert]=/ | ||
command[check_postgres]=/ | command[check_postgres]=/ | ||
- | </code> | + | </file> |
- | Add the //check_mem// script to the /// | + | Add the '' |
< | < | ||
cp check_mem / | cp check_mem / | ||
chmod 755 / | chmod 755 / | ||
</ | </ | ||
- | Create the MONITORING_USER in the PostgreSQL. | + | Create the '' |
< | < | ||
create user monitoring password ' | create user monitoring password ' | ||
Line 124: | Line 124: | ||
systemctl enable nrpe | systemctl enable nrpe | ||
</ | </ | ||
- | To test the probes, you can use //check_nrpe// plugin: | + | To test the probes, you can use '' |
< | < | ||
/ | / | ||
Line 133: | Line 133: | ||
This is a sample configuration for the Nagios server. It is meant more as an inspiration, | This is a sample configuration for the Nagios server. It is meant more as an inspiration, | ||
- | Configure the check_nrpe command (you probably already have this in your Nagios configuration): | + | Configure the '' |
< | < | ||
define command{ | define command{ |