Nagios 4 : Add Monitoring Target Item2026/03/27 |
|
It's possible to add monitoring Target Items. There are many RPM packages for them. |
|
| [1] | Many plugins are provided with RPM packages like follows. |
|
# use EPEL repo [root@dlp ~]# dnf --enablerepo=epel search nagios-plugins-
nagios-plugins-all.x86_64 : Nagios Plugins - All plugins
nagios-plugins-apt.x86_64 : Nagios Plugin - check_apt
nagios-plugins-bacula.x86_64 : Nagios Plugin - check_bacula
nagios-plugins-breeze.x86_64 : Nagios Plugin - check_breeze
nagios-plugins-by_ssh.x86_64 : Nagios Plugin - check_by_ssh
nagios-plugins-check-updates.x86_64 : A Nagios plugin to check if Red Hat or
: Fedora system is up-to-date
nagios-plugins-cluster.x86_64 : Nagios Plugin - check_cluster
nagios-plugins-dhcp.x86_64 : Nagios Plugin - check_dhcp
nagios-plugins-dig.x86_64 : Nagios Plugin - check_dig
nagios-plugins-disk.x86_64 : Nagios Plugin - check_disk
nagios-plugins-disk_smb.x86_64 : Nagios Plugin - check_disk_smb
nagios-plugins-dns.x86_64 : Nagios Plugin - check_dns
.....
.....
|
| [2] | For example, add [check_ntp] plugin to monitor time difference between the System time and NTP Server. |
|
[root@dlp ~]#
dnf --enablerepo=epel -y install nagios-plugins-ntp
[root@dlp ~]#
vi /etc/nagios/objects/commands.cfg # add follows to last line
define command {
command_name check_ntp_time
command_line $USER1$/check_ntp_time -H $ARG1$ -w $ARG2$ -c $ARG3$
}
[root@dlp ~]#
vi /etc/nagios/objects/localhost.cfg # add to the last line # Warning with 1 sec time difference, Critical with 2 sec difference
define service {
use local-service
host_name localhost
service_description NTP_TIME
check_command check_ntp_time!ntp.nict.jp!1!2
notifications_enabled 1
}
systemctl reload nagios |
| [3] | It's possible to view the status for a new plugin on the admin site. |
|
| Sponsored Link |
|
|