File: check_apt.cmd

package info (click to toggle)
nagios-plugins-contrib 4.20120702
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 3,128 kB
  • sloc: perl: 23,621; sh: 3,668; lex: 550; makefile: 368; php: 333; python: 301; ruby: 96; awk: 81
file content (24 lines) | stat: -rw-r--r-- 1,045 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# check_multi command file implementing a
# check_apt replacement
#
# example nrpe.cfg config:
# command[check_apt]=/usr/lib/nagios/plugins/check_multi -f /etc/check_multi/check_apt.cmd
#
# requirements:
#  - moreutils
#  - the following sudo permissions:
#       nagios  ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/check_libs
#       nagios  ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/check_running_kernel
#  - a cronjob running update-apt-status:
#       @hourly  root [ -x /usr/lib/nagios/cronjobs/update-apt-status ] && /usr/lib/nagios/cronjobs/update-apt-status 2>&1 | logger -t update-apt-status



command[ packages ]		= mispipe "/usr/lib/nagios/plugins/check_statusfile /var/cache/nagios_status/apt"  "sed -n '1p;\$p' | paste -s -d ''"
command[ libs ]			= mispipe "sudo /usr/lib/nagios/plugins/check_libs" "sed 's, ([0-9, ]*),,g'"
command[ running_kernel ]	= sudo /usr/lib/nagios/plugins/check_running_kernel


state   [ CRITICAL ] = COUNT(CRITICAL) > 0
state   [ WARNING ] = COUNT(WARNING) > 0
state   [ UNKNOWN ] = COUNT(UNKNOWN) > 0