Merge branch 'master' of git+ssh://db.debian.org/git/dsa-nagios
authorMartin Zobel-Helas <zobel@debian.org>
Sat, 12 Nov 2011 16:36:43 +0000 (17:36 +0100)
committerMartin Zobel-Helas <zobel@debian.org>
Sat, 12 Nov 2011 16:36:43 +0000 (17:36 +0100)
* 'master' of git+ssh://db.debian.org/git/dsa-nagios:
  rsyncd-hosts updates
  Let's monitor rsync on rsyncd-hosts
  wolkenstein on squeeze
  klecker is down for now
  add jenkins
  local build of samhain is working, I think
  We need to look for two locations, not two directives
  Fix a bashism
  test with == is a bashism
  last 2, and get IPs right
  add armhf hosts
  eder has a /srv
  add eder, eysler
  Get rid of gw-telefonica
  remove locke and lamb, take 2
  remove locke and lamb

Conflicts:
config/nagios-master.cfg

config/nagios-master.cfg
dsa-nagios-checks/checks/dsa-check-config
dsa-nagios-checks/debian/changelog
dsa-nagios-checks/share/weak-ssh-keys-check

index 6e0f276..e7c85b0 100644 (file)
@@ -133,10 +133,6 @@ servers:
     parents: gw-ubc
     hostgroups: routing-infrastructure
     contacts: holger
-  gw-telefonica:
-    address: 195.71.99.193
-    parents: gw-ubc
-    hostgroups: routing-infrastructure
   gw-cst:
     address: 213.157.2.23
     parents: gw-ubc
@@ -225,7 +221,7 @@ servers:
   mundy:
     address: 192.25.206.62
     parents: gw-HP-ftc
-    hostgroups: computers, buildd, hassrvfs, sw-raid, acpid-hosts, squeeze, brokensamhain
+    hostgroups: computers, buildd, hassrvfs, sw-raid, acpid-hosts, squeeze
   paer:
     address: 192.25.206.11
     parents: gw-HP-ftc
@@ -233,11 +229,11 @@ servers:
   merulo:
     address: 192.25.206.58
     parents: gw-HP-ftc
-    hostgroups: computers, porterbox, hasusrfs, squeeze, brokensamhain
+    hostgroups: computers, porterbox, hasusrfs, squeeze
   alkman:
     address: 192.25.206.63
     parents: gw-HP-ftc
-    hostgroups: computers, buildd, acpid-hosts, squeeze, brokensamhain
+    hostgroups: computers, buildd, acpid-hosts, squeeze
 
   sperger:
     address: 82.195.75.34
@@ -303,10 +299,10 @@ servers:
     address: 82.195.75.92
     parents: unger
     hostgroups: computers, service, hasbootfs, kvmdomains, squeeze
-  lamb:
-    address: 82.195.75.101
-    parents: unger
-    hostgroups: computers, service, hasbootfs, kvmdomains, squeeze, hasvicepa, bosserver
+#  lamb:
+#    address: 82.195.75.101
+#    parents: unger
+#    hostgroups: computers, service, hasbootfs, kvmdomains, squeeze, hasvicepa, bosserver
 
   master:
     address: 70.103.162.29
@@ -321,7 +317,7 @@ servers:
   ries:
     address: 128.148.34.103
     parents: gw-brown.edu
-    hostgroups: computers, service, dl385, rsyncd-hosts, acpid-hosts, xinetd-hosts, hassrvfs, squeeze, postgres90-hosts
+    hostgroups: computers, service, dl385, acpid-hosts, xinetd-hosts, hassrvfs, squeeze, postgres90-hosts
 
   franck:
     address: 128.148.34.3
@@ -463,7 +459,7 @@ servers:
   caballero:
     address: 193.201.200.200
     parents: gw-blackcat
-    hostgroups: computers, buildd, sw-raid, squeeze, brokensamhain
+    hostgroups: computers, buildd, sw-raid, squeeze
 
   pescetti:
     address: 217.114.76.85
@@ -527,7 +523,7 @@ servers:
   wolkenstein:
     address: 206.12.19.116
     parents: dijkstra
-    hostgroups: computers, hasbootfs, hassrvfs, kvmdomains, service, xinetd-hosts, rsyncd-hosts, apache2-hosts, lenny
+    hostgroups: computers, hasbootfs, hassrvfs, kvmdomains, service, xinetd-hosts, rsyncd-hosts, apache2-hosts, squeeze
   brahms:
     address: 206.12.19.115
     parents: dijkstra
@@ -612,10 +608,10 @@ servers:
     address: 206.12.19.119
     parents: tchaikovsky
     hostgroups: computers, service, hasbootfs, kvmdomains, squeeze
-  locke:
-    address: 206.12.19.120
-    parents: tchaikovsky
-    hostgroups: computers, service, hasbootfs, kvmdomains, squeeze, hasvicepa
+#  locke:
+#    address: 206.12.19.120
+#    parents: tchaikovsky
+#    hostgroups: computers, service, hasbootfs, kvmdomains, squeeze, hasvicepa
   lotti:
     address: 206.12.19.121
     parents: tchaikovsky
@@ -660,6 +656,10 @@ servers:
     address: 206.12.19.132
     parents: traetta
     hostgroups: computers, service, hasbootfs, kvmdomains, squeeze, hassrvfs
+  jenkins:
+    address: 206.12.19.133
+    parents: salieri
+    hostgroups: computers, service, hasbootfs, kvmdomains, squeeze
 
   lebrun:
     address: 193.198.184.10
@@ -693,7 +693,7 @@ servers:
   zandonai:
     address: 80.245.147.46
     parents: gw-zivit
-    hostgroups: computers, buildd, hassrvfs, squeeze, brokensamhain
+    hostgroups: computers, buildd, hassrvfs, squeeze
 
   goedel:
     address: 213.188.99.214
@@ -792,6 +792,14 @@ servers:
     parents: gw-sil
     hostgroups: computers, acpid-hosts, service, apache2-hosts, squeeze, megactl
     # which raid?
+  eder:
+    address: 86.59.118.151
+    parents: gw-sil
+    hostgroups: computers, porterbox, squeeze, hassrvfs
+  eysler:
+    address: 86.59.118.152
+    parents: gw-sil
+    hostgroups: computers, buildd, squeeze
 
   abel:
     address: 217.140.96.56
@@ -817,6 +825,30 @@ servers:
     address: 217.140.96.61
     parents: gw-arm
     hostgroups: computers, hasbootfs, hassrvfs, squeeze
+  harris:
+    address: 217.140.96.66
+    parents: gw-arm
+    hostgroups: computers, hasbootfs, hassrvfs, squeeze
+  hartmann:
+    address: 217.140.96.67
+    parents: gw-arm
+    hostgroups: computers, hasbootfs, hassrvfs, squeeze
+  hasse:
+    address: 217.140.96.68
+    parents: gw-arm
+    hostgroups: computers, hasbootfs, hassrvfs, squeeze
+  hebden:
+    address: 217.140.96.69
+    parents: gw-arm
+    hostgroups: computers, hasbootfs, hassrvfs, squeeze
+  henze:
+    address: 217.140.96.70
+    parents: gw-arm
+    hostgroups: computers, hasbootfs, hassrvfs, squeeze
+  hoiby:
+    address: 217.140.96.71
+    parents: gw-arm
+    hostgroups: computers, hasbootfs, hassrvfs, squeeze
 
   poulenc:
     address: 144.32.168.77
@@ -1031,9 +1063,9 @@ hostgroups:
   hasusrfs:
     alias: hosts with a /usr filesystem
     private: 1
-  hasvicepa:
-    alias: hosts with a /vicepa
-    private: 1
+#  hasvicepa:
+#    alias: hosts with a /vicepa
+#    private: 1
 
   incomingmailrelayed:
     alias: incoming mail needs to go through a mail relay
@@ -1238,11 +1270,11 @@ services:
     servicegroups: diskspace
     nrpe: "/usr/lib/nagios/plugins/check_disk 80 90 /srv/fossology.debian.net"
     hosts: vivaldi
-  -
-    name: disk usage on /vicepa
-    servicegroups: diskspace
-    nrpe: "/usr/lib/nagios/plugins/check_disk 90 95 /vicepa"
-    hostgroups: hasvicepa
+#  -
+#    name: disk usage on /vicepa
+#    servicegroups: diskspace
+#    nrpe: "/usr/lib/nagios/plugins/check_disk 90 95 /vicepa"
+#    hostgroups: hasvicepa
   -
     name: disk usage on /var/lib/postgresql/9.0/dak
     servicegroups: diskspace
@@ -1294,27 +1326,27 @@ services:
     retry_check_interval: 5
 
  ####
-  - name: afs - space
-    hostgroups: bosserver
-    nrpe: "/usr/lib/nagios/plugins/dsa-check-afs-space -H localhost"
-    normal_check_interval: 60
-    max_check_attempts: 2
-    retry_check_interval: 5
-
-  - name: afs - bos
-    hostgroups: bosserver
-    nrpe: "/usr/lib/nagios/plugins/dsa-check-afs-bos -H localhost"
-    normal_check_interval: 60
-    max_check_attempts: 2
-    retry_check_interval: 5
-
-  - name: afs - waiting connections
-    hostgroups: bosserver
-    nrpe: "/usr/lib/nagios/plugins/dsa-check-afs-rxdebug -H localhost"
-    normal_check_interval: 60
-    max_check_attempts: 2
-    retry_check_interval: 5
-
+#  - name: afs - space
+#    hostgroups: bosserver
+#    nrpe: "/usr/lib/nagios/plugins/dsa-check-afs-space -H localhost"
+#    normal_check_interval: 60
+#    max_check_attempts: 2
+#    retry_check_interval: 5
+#
+#  - name: afs - bos
+#    hostgroups: bosserver
+#    nrpe: "/usr/lib/nagios/plugins/dsa-check-afs-bos -H localhost"
+#    normal_check_interval: 60
+#    max_check_attempts: 2
+#    retry_check_interval: 5
+#
+#  - name: afs - waiting connections
+#    hostgroups: bosserver
+#    nrpe: "/usr/lib/nagios/plugins/dsa-check-afs-rxdebug -H localhost"
+#    normal_check_interval: 60
+#    max_check_attempts: 2
+#    retry_check_interval: 5
+#
   #- name: afs - udebug
   #  hostgroups: bosserver
   #  nrpe: "/usr/lib/nagios/plugins/dsa-check-afs-udebug -H localhost"
@@ -2015,11 +2047,11 @@ services:
     hostgroups: computers
     excludehostgroups: acpid-hosts, kvmdomains
  ###
-  -
-    name: process - bosserver
-    nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u root -C bosserver -a '/usr/sbin/bosserver'"
-    hostgroups: bosserver
-
+#  -
+#    name: process - bosserver
+#    nrpe: "/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1: -u root -C bosserver -a '/usr/sbin/bosserver'"
+#    hostgroups: bosserver
+#
  ###
   -
     name: process - inetd
@@ -2042,17 +2074,22 @@ services:
     hosts: draghi
     depends: process - xinetd
  ###
-#  -
-#    name: network service - rsync
-#    check: check_tcp!873
-#    hostgroups: rsyncd-hosts
-#    depends: process - xinetd
-#
+  -
+    name: network service - rsync
+    check: check_tcp!873
+    hostgroups: rsyncd-hosts
+    depends: process - xinetd
+    excludehosts: merikanto, rietz
   -
     name: network service - rsync
     check: check_tcp!873
     hosts: rietz2
     depends: rietz:process - xinetd
+  -
+    name: network service - rsync
+    check: check_tcp!873
+    hosts: merikanto2
+    depends: merikanto:process - xinetd
   #-
   #  name: network service - rsync
   #  check: check_tcp!873
index 0d62402..2341d07 100755 (executable)
@@ -9,13 +9,13 @@ set -e
 err=0
 
 log() {
-       if [ "$0" == "ok" ] && [ "$err" == 0 ]; then
+       if [ "$0" = "ok" ] && [ "$err" = 0 ]; then
                err=0
-       elif [ "$1" == "warn" ] && [ "$err" -lt 1 ]; then
+       elif [ "$1" = "warn" ] && [ "$err" -lt 1 ]; then
                err=1
-       elif [ "$1" == "critical" ] && [ "$err" -lt 2 ]; then
+       elif [ "$1" = "critical" ] && [ "$err" -lt 2 ]; then
                err=2
-       elif [ "$1" == "unknown" ] && [ "$err" == 0 ]; then
+       elif [ "$1" = "unknown" ] && [ "$err" = 0 ]; then
                err=3
        fi
        if [ "`eval echo \\$$1`" = "" ]; then
index 14bc791..aff0879 100644 (file)
@@ -7,12 +7,14 @@ dsa-nagios-checks (9X) Xnstable; urgency=low
   * dsa-check-backuppg:
     - ignore regular files in pg backup's root directory if they are still
       fresh.
+  * dsa-check-config:
+    - fix a bashism.
 
   [ Stephen Gran ]
   * Add event_handler to restart services
   * Add dsa-check-raid-megactl for awkward PeRC controllers
 
- -- Stephen Gran <sgran@debian.org>  Sat, 30 Jul 2011 13:30:07 +0100
+ -- Peter Palfrader <weasel@debian.org>  Mon, 10 Oct 2011 23:33:36 +0200
 
 dsa-nagios-checks (89) unstable; urgency=low
 
index a9bd752..d6d4f8c 100755 (executable)
@@ -309,23 +309,26 @@ sub from_debianorg_places () {
 
     my @ak = grep { /^AuthorizedKeysFile\s/i } @lines;
     my @ak2 = grep { /^AuthorizedKeysFile2\s/i } @lines;
+    my @ak_files;
 
-    if (scalar @ak != 1) {
-       print $fh "UNKNOWN\n";
-       print $fh "There is more than one AuthorizedKeysFile definition in sshd_config\n";
-       exit
+    for my $line ((@ak, @ak2)) {
+           my @file_locations = split /\s+/, $line;
+           shift @file_locations;
+           push @ak_files, @file_locations;
     }
-    if (scalar @ak2 != 1) {
+
+    if (scalar @ak_files != 2) {
        print $fh "UNKNOWN\n";
-       print $fh "There is more than one AuthorizedKeysFile2 definition in sshd_config\n";
+       print $fh "There should be two locations for User AuthorizedKeysFile defined in sshd_config\n";
        exit
     }
-    unless ($ak[0] =~ m#^((?i)AuthorizedKeysFile)\s+/etc/ssh/userkeys/%u$# ) {
+
+    unless (grep { m#^/etc/ssh/userkeys/%u$# } @ak_files) {
        print $fh "UNKNOWN\n";
        print $fh "The AuthorizedKeysFile definition has an unexpected value.  Should be /etc/ssh/userkeys/%u\n";
        exit
     }
-    unless ($ak2[0] =~ m#^((?i)AuthorizedKeysFile2)\s+/var/lib/misc/userkeys/%u$# ) {
+    unless (grep { m#^/var/lib/misc/userkeys/%u$# } @ak_files) {
        print $fh "UNKNOWN\n";
        print $fh "The AuthorizedKeysFile2 definition has an unexpected value.  Should be /var/lib/misc/userkeys/%u\n";
        exit