Skip to content

Instantly share code, notes, and snippets.

@discarn8
Last active March 21, 2022 04:52
Show Gist options
  • Save discarn8/34186809ebd6f948e66683554e31d4f0 to your computer and use it in GitHub Desktop.
Save discarn8/34186809ebd6f948e66683554e31d4f0 to your computer and use it in GitHub Desktop.
Nagios Check Hardware
/usr/lib/nagios/plugins/check_hw
------------------------------------------------------
#!/bin/sh
HW=$(cat /proc/device-tree/model | tr '\0' '\n')
echo $HW
exit 0
------------------------------------------------------
/etc/nagios/nrpe.cfg | egrep -v '#|^$'
------------------------------------------------------
command[check_users]=/usr/lib/nagios/plugins/check_users -w 3 -c 4
command[check_load]=/usr/lib/nagios/plugins/check_load -r -w 1.95,1.90,1.80 -c 2.10,2.00,1.90
command[check_hda1]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /
command[check_zombie_procs]=/usr/lib/nagios/plugins/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w 250 -c 300
command[check_apt]=/usr/lib/nagios/plugins/check_apt
command[check_ntp]=/usr/lib/nagios/plugins/check_ntp_time -H 1.1.1.1 -w 2 -c 5
command[checknfs]=sudo -u root /usr/lib/nagios/plugins/check_nfs.sh
command[check_hw]=sudo -u root /usr/lib/nagios/plugins/check_hw
command[check_os]=sudo -u root /usr/lib/nagios/plugins/check_os
command[check_rasp_temp]=sudo -u root /usr/lib/nagios/plugins/check_rasp_temp -w 145 -c 165
command[check_throttled]=sudo -u root /usr/lib/nagios/plugins/check_throttled
command[check_v]=sudo -u root /usr/lib/nagios/plugins/check_voltage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment