CentOS Stream 9
Sponsored Link

Nagios 4 : Add Monitoring Target Item2022/08/10

 
It's possible to add monitoring Target Items. There are many RPM packages for them.
Or it's possible to create a plugin by yourself.
And also there are many plugins provided by community below.
⇒ http://exchange.nagios.org/
[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-breeze.x86_64 : Nagios Plugin - check_breeze
nagios-plugins-by_ssh.x86_64 : Nagios Plugin - check_by_ssh
nagios-plugins-cluster.x86_64 : Nagios Plugin - check_cluster
.....
.....
nagios-plugins-time.x86_64 : Nagios Plugin - check_time
nagios-plugins-ups.x86_64 : Nagios Plugin - check_ups
nagios-plugins-uptime.x86_64 : Nagios Plugin - check_uptime
nagios-plugins-users.x86_64 : Nagios Plugin - check_users
nagios-plugins-wave.x86_64 : Nagios Plugin - check_wave
[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 the end

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 end
# 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
}

[root@dlp ~]#
systemctl restart nagios

[3] It's possible to view the status for a new plugin on the admin site.
Matched Content