Deploy Nagios Plugins

nagios core | nagios plugins | nagios ssh

Introduction

those scripts will be used by the nagios agents, but also on the main server (which monitors itself).

install

debian

apt install nagios-plugins nagios-plugins-contrib

slackware

sbopkg -r

we use /bin/bash instead of /sbin/nologin because we need a user shell for check_by_ssh

groupadd -g 213 nagios
useradd -u 213 -g nagios -d /usr/libexec/nagios -s /bin/bash nagios

sbopkg -i nagios-plugins

from source

see nagios plugins source

custom nagios plugins

that one did not work so I went for my own

cd /usr/local/libexec/
wget https://pub.nethence.com/bin/backup/check_temp.ksh.txt
mv check_temp.ksh.txt check_temp.ksh
chmod +x check_temp.ksh

SSH setup

see nagios ssh

Ready to go

updatedb
locate check_load

# debian
...

# slackware
ls -lF /usr/libexec/nagios/check_load

Acceptance

su - nagios

/usr/libexec/nagios/check_load -w 5.0,4.0,3.0 -c 10.0,6.0,4.0
/usr/libexec/nagios/check_sensors
/usr/local/libexec/check_temp.ksh

Resources

https://packages.debian.org/stable/net/nagios-plugins

https://packages.debian.org/source/nagios-plugins

https://packages.debian.org/bookworm/monitoring-plugins

https://slackbuilds.org/repository/15.0/system/nagios-plugins/

community fork

https://packages.debian.org/bookworm/monitoring-plugins

https://packages.debian.org/bookworm/monitoring-plugins-basic

https://packages.debian.org/bookworm/monitoring-plugins-standard

sensors

http://nagios-plugins.org/doc/man/check_sensors.html

https://exchange.nagios.org/directory/Plugins/System-Metrics/Environmental/check_sensors/details

https://exchange.nagios.org/directory/Plugins/Operating-Systems/Linux/check_temp/details

https://github.com/jackbenny/check_temp/blob/master/check_temp.sh

https://exchange.nagios.org/directory/Plugins/System-Metrics/Environmental


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2024 Pierre-Philipp Braun