]> Frank Brehm's Git Trees - config/ns3/etc.git/commitdiff
committing changes in /etc after apt run
authorFrank Brehm <frank@brehm-online.com>
Tue, 10 Oct 2017 21:34:10 +0000 (23:34 +0200)
committerFrank Brehm <frank@brehm-online.com>
Tue, 10 Oct 2017 21:34:10 +0000 (23:34 +0200)
Package changes:
+icinga2 2.6.0-2 amd64
+icinga2-bin 2.6.0-2 amd64
+icinga2-common 2.6.0-2 all
+libboost-atomic1.62.0 1.62.0+dfsg-4 amd64
+libboost-chrono1.62.0 1.62.0+dfsg-4 amd64
+libboost-date-time1.62.0 1.62.0+dfsg-4 amd64
+libboost-program-options1.62.0 1.62.0+dfsg-4 amd64
+libboost-regex1.62.0 1.62.0+dfsg-4 amd64
+libboost-thread1.62.0 1.62.0+dfsg-4 amd64
+libicinga2 2.6.0-2 amd64
+libyajl2 2.1.0-2+b3 amd64
+monitoring-plugins-basic 2.2-3 amd64
+monitoring-plugins-common 2.2-3 amd64
+monitoring-plugins-standard 2.2-3 amd64
+vim-icinga2 2.6.0-2 all

93 files changed:
.etckeeper
default/icinga2 [new file with mode: 0644]
group
group-
gshadow
gshadow-
icinga2/conf.d/app.conf [new file with mode: 0644]
icinga2/conf.d/apt.conf [new file with mode: 0644]
icinga2/conf.d/commands.conf [new file with mode: 0644]
icinga2/conf.d/downtimes.conf [new file with mode: 0644]
icinga2/conf.d/groups.conf [new file with mode: 0644]
icinga2/conf.d/hosts.conf [new file with mode: 0644]
icinga2/conf.d/notifications.conf [new file with mode: 0644]
icinga2/conf.d/satellite.conf [new file with mode: 0644]
icinga2/conf.d/services.conf [new file with mode: 0644]
icinga2/conf.d/templates.conf [new file with mode: 0644]
icinga2/conf.d/timeperiods.conf [new file with mode: 0644]
icinga2/conf.d/users.conf [new file with mode: 0644]
icinga2/constants.conf [new file with mode: 0644]
icinga2/features-available/api.conf [new file with mode: 0644]
icinga2/features-available/checker.conf [new file with mode: 0644]
icinga2/features-available/command.conf [new file with mode: 0644]
icinga2/features-available/compatlog.conf [new file with mode: 0644]
icinga2/features-available/debuglog.conf [new file with mode: 0644]
icinga2/features-available/gelf.conf [new file with mode: 0644]
icinga2/features-available/graphite.conf [new file with mode: 0644]
icinga2/features-available/influxdb.conf [new file with mode: 0644]
icinga2/features-available/livestatus.conf [new file with mode: 0644]
icinga2/features-available/mainlog.conf [new file with mode: 0644]
icinga2/features-available/notification.conf [new file with mode: 0644]
icinga2/features-available/opentsdb.conf [new file with mode: 0644]
icinga2/features-available/perfdata.conf [new file with mode: 0644]
icinga2/features-available/statusdata.conf [new file with mode: 0644]
icinga2/features-available/syslog.conf [new file with mode: 0644]
icinga2/features-enabled/checker.conf [new symlink]
icinga2/features-enabled/mainlog.conf [new symlink]
icinga2/features-enabled/notification.conf [new symlink]
icinga2/icinga2.conf [new file with mode: 0644]
icinga2/init.conf [new file with mode: 0644]
icinga2/repository.d/README [new file with mode: 0644]
icinga2/scripts/mail-host-notification.sh [new file with mode: 0755]
icinga2/scripts/mail-service-notification.sh [new file with mode: 0755]
icinga2/zones.conf [new file with mode: 0644]
icinga2/zones.d/README [new file with mode: 0644]
init.d/icinga2 [new file with mode: 0755]
logrotate.d/icinga2 [new file with mode: 0644]
nagios-plugins/config/apt.cfg [new file with mode: 0644]
nagios-plugins/config/breeze.cfg [new file with mode: 0644]
nagios-plugins/config/dhcp.cfg [new file with mode: 0644]
nagios-plugins/config/disk-smb.cfg [new file with mode: 0644]
nagios-plugins/config/disk.cfg [new file with mode: 0644]
nagios-plugins/config/dns.cfg [new file with mode: 0644]
nagios-plugins/config/dummy.cfg [new file with mode: 0644]
nagios-plugins/config/flexlm.cfg [new file with mode: 0644]
nagios-plugins/config/fping.cfg [new file with mode: 0644]
nagios-plugins/config/ftp.cfg [new file with mode: 0644]
nagios-plugins/config/games.cfg [new file with mode: 0644]
nagios-plugins/config/hppjd.cfg [new file with mode: 0644]
nagios-plugins/config/http.cfg [new file with mode: 0644]
nagios-plugins/config/ifstatus.cfg [new file with mode: 0644]
nagios-plugins/config/ldap.cfg [new file with mode: 0644]
nagios-plugins/config/load.cfg [new file with mode: 0644]
nagios-plugins/config/mail.cfg [new file with mode: 0644]
nagios-plugins/config/mailq.cfg [new file with mode: 0644]
nagios-plugins/config/mrtg.cfg [new file with mode: 0644]
nagios-plugins/config/mysql.cfg [new file with mode: 0644]
nagios-plugins/config/netware.cfg [new file with mode: 0644]
nagios-plugins/config/news.cfg [new file with mode: 0644]
nagios-plugins/config/nt.cfg [new file with mode: 0644]
nagios-plugins/config/ntp.cfg [new file with mode: 0644]
nagios-plugins/config/pgsql.cfg [new file with mode: 0644]
nagios-plugins/config/ping.cfg [new file with mode: 0644]
nagios-plugins/config/procs.cfg [new file with mode: 0644]
nagios-plugins/config/radius.cfg [new file with mode: 0644]
nagios-plugins/config/real.cfg [new file with mode: 0644]
nagios-plugins/config/rpc-nfs.cfg [new file with mode: 0644]
nagios-plugins/config/snmp.cfg [new file with mode: 0644]
nagios-plugins/config/ssh.cfg [new file with mode: 0644]
nagios-plugins/config/tcp_udp.cfg [new file with mode: 0644]
nagios-plugins/config/telnet.cfg [new file with mode: 0644]
nagios-plugins/config/users.cfg [new file with mode: 0644]
passwd
passwd-
rc0.d/K01icinga2 [new symlink]
rc1.d/K01icinga2 [new symlink]
rc2.d/S03icinga2 [new symlink]
rc3.d/S03icinga2 [new symlink]
rc4.d/S03icinga2 [new symlink]
rc5.d/S03icinga2 [new symlink]
rc6.d/K01icinga2 [new symlink]
shadow
shadow-
systemd/system/multi-user.target.wants/icinga2.service [new symlink]

index 2ec797406b79d7d8861854870222c8ea6120e4dd..dffebd13415ba162def88e9912266ea62b41e045 100755 (executable)
@@ -9,6 +9,7 @@ mkdir -p './ca-certificates/update.d'
 mkdir -p './dbus-1/session.d'
 mkdir -p './dpkg/dpkg.cfg.d'
 mkdir -p './fail2ban/fail2ban.d'
+mkdir -p './icinga2/pki'
 mkdir -p './initramfs-tools/hooks'
 mkdir -p './initramfs-tools/scripts/init-bottom'
 mkdir -p './initramfs-tools/scripts/init-premount'
@@ -436,6 +437,7 @@ maybe chmod 0644 'default/grub.ucf-dist'
 maybe chmod 0644 'default/halt'
 maybe chmod 0644 'default/haveged'
 maybe chmod 0644 'default/hwclock'
+maybe chmod 0644 'default/icinga2'
 maybe chmod 0644 'default/keyboard'
 maybe chmod 0644 'default/locale'
 maybe chmod 0644 'default/locale.bak'
@@ -749,6 +751,53 @@ maybe chmod 0644 'hostname'
 maybe chmod 0644 'hosts'
 maybe chmod 0644 'hosts.allow'
 maybe chmod 0644 'hosts.deny'
+maybe chown 'nagios' 'icinga2'
+maybe chgrp 'nagios' 'icinga2'
+maybe chmod 0750 'icinga2'
+maybe chmod 0755 'icinga2/conf.d'
+maybe chmod 0644 'icinga2/conf.d/app.conf'
+maybe chmod 0644 'icinga2/conf.d/apt.conf'
+maybe chmod 0644 'icinga2/conf.d/commands.conf'
+maybe chmod 0644 'icinga2/conf.d/downtimes.conf'
+maybe chmod 0644 'icinga2/conf.d/groups.conf'
+maybe chmod 0644 'icinga2/conf.d/hosts.conf'
+maybe chmod 0644 'icinga2/conf.d/notifications.conf'
+maybe chmod 0644 'icinga2/conf.d/satellite.conf'
+maybe chmod 0644 'icinga2/conf.d/services.conf'
+maybe chmod 0644 'icinga2/conf.d/templates.conf'
+maybe chmod 0644 'icinga2/conf.d/timeperiods.conf'
+maybe chmod 0644 'icinga2/conf.d/users.conf'
+maybe chmod 0644 'icinga2/constants.conf'
+maybe chmod 0755 'icinga2/features-available'
+maybe chmod 0644 'icinga2/features-available/api.conf'
+maybe chmod 0644 'icinga2/features-available/checker.conf'
+maybe chmod 0644 'icinga2/features-available/command.conf'
+maybe chmod 0644 'icinga2/features-available/compatlog.conf'
+maybe chmod 0644 'icinga2/features-available/debuglog.conf'
+maybe chmod 0644 'icinga2/features-available/gelf.conf'
+maybe chmod 0644 'icinga2/features-available/graphite.conf'
+maybe chmod 0644 'icinga2/features-available/influxdb.conf'
+maybe chmod 0644 'icinga2/features-available/livestatus.conf'
+maybe chmod 0644 'icinga2/features-available/mainlog.conf'
+maybe chmod 0644 'icinga2/features-available/notification.conf'
+maybe chmod 0644 'icinga2/features-available/opentsdb.conf'
+maybe chmod 0644 'icinga2/features-available/perfdata.conf'
+maybe chmod 0644 'icinga2/features-available/statusdata.conf'
+maybe chmod 0644 'icinga2/features-available/syslog.conf'
+maybe chmod 0755 'icinga2/features-enabled'
+maybe chmod 0644 'icinga2/icinga2.conf'
+maybe chmod 0644 'icinga2/init.conf'
+maybe chown 'nagios' 'icinga2/pki'
+maybe chgrp 'nagios' 'icinga2/pki'
+maybe chmod 0700 'icinga2/pki'
+maybe chmod 0755 'icinga2/repository.d'
+maybe chmod 0644 'icinga2/repository.d/README'
+maybe chmod 0755 'icinga2/scripts'
+maybe chmod 0755 'icinga2/scripts/mail-host-notification.sh'
+maybe chmod 0755 'icinga2/scripts/mail-service-notification.sh'
+maybe chmod 0644 'icinga2/zones.conf'
+maybe chmod 0755 'icinga2/zones.d'
+maybe chmod 0644 'icinga2/zones.d/README'
 maybe chmod 0755 'init'
 maybe chmod 0755 'init.d'
 maybe chmod 0644 'init.d/README'
@@ -774,6 +823,7 @@ maybe chmod 0755 'init.d/halt'
 maybe chmod 0755 'init.d/haveged'
 maybe chmod 0755 'init.d/hostname.sh'
 maybe chmod 0755 'init.d/hwclock.sh'
+maybe chmod 0755 'init.d/icinga2'
 maybe chmod 0755 'init.d/keyboard-setup.sh'
 maybe chmod 0755 'init.d/killprocs'
 maybe chmod 0755 'init.d/kmod'
@@ -1054,6 +1104,7 @@ maybe chmod 0644 'logrotate.d/chrony'
 maybe chmod 0644 'logrotate.d/chrony.dpkg-dist'
 maybe chmod 0644 'logrotate.d/dpkg'
 maybe chmod 0644 'logrotate.d/fail2ban'
+maybe chmod 0644 'logrotate.d/icinga2'
 maybe chmod 0644 'logrotate.d/rsyslog'
 maybe chmod 0644 'logrotate.d/salt-common'
 maybe chmod 0644 'logrotate.d/ulogd2'
@@ -1099,6 +1150,43 @@ maybe chmod 0755 'mysql/conf.d'
 maybe chmod 0644 'mysql/conf.d/mysql.cnf'
 maybe chmod 0644 'mysql/conf.d/mysqldump.cnf'
 maybe chmod 0644 'mysql/my.cnf.fallback'
+maybe chmod 0755 'nagios-plugins'
+maybe chmod 0755 'nagios-plugins/config'
+maybe chmod 0644 'nagios-plugins/config/apt.cfg'
+maybe chmod 0644 'nagios-plugins/config/breeze.cfg'
+maybe chmod 0644 'nagios-plugins/config/dhcp.cfg'
+maybe chmod 0644 'nagios-plugins/config/disk-smb.cfg'
+maybe chmod 0644 'nagios-plugins/config/disk.cfg'
+maybe chmod 0644 'nagios-plugins/config/dns.cfg'
+maybe chmod 0644 'nagios-plugins/config/dummy.cfg'
+maybe chmod 0644 'nagios-plugins/config/flexlm.cfg'
+maybe chmod 0644 'nagios-plugins/config/fping.cfg'
+maybe chmod 0644 'nagios-plugins/config/ftp.cfg'
+maybe chmod 0644 'nagios-plugins/config/games.cfg'
+maybe chmod 0644 'nagios-plugins/config/hppjd.cfg'
+maybe chmod 0644 'nagios-plugins/config/http.cfg'
+maybe chmod 0644 'nagios-plugins/config/ifstatus.cfg'
+maybe chmod 0644 'nagios-plugins/config/ldap.cfg'
+maybe chmod 0644 'nagios-plugins/config/load.cfg'
+maybe chmod 0644 'nagios-plugins/config/mail.cfg'
+maybe chmod 0644 'nagios-plugins/config/mailq.cfg'
+maybe chmod 0644 'nagios-plugins/config/mrtg.cfg'
+maybe chmod 0644 'nagios-plugins/config/mysql.cfg'
+maybe chmod 0644 'nagios-plugins/config/netware.cfg'
+maybe chmod 0644 'nagios-plugins/config/news.cfg'
+maybe chmod 0644 'nagios-plugins/config/nt.cfg'
+maybe chmod 0644 'nagios-plugins/config/ntp.cfg'
+maybe chmod 0644 'nagios-plugins/config/pgsql.cfg'
+maybe chmod 0644 'nagios-plugins/config/ping.cfg'
+maybe chmod 0644 'nagios-plugins/config/procs.cfg'
+maybe chmod 0644 'nagios-plugins/config/radius.cfg'
+maybe chmod 0644 'nagios-plugins/config/real.cfg'
+maybe chmod 0644 'nagios-plugins/config/rpc-nfs.cfg'
+maybe chmod 0644 'nagios-plugins/config/snmp.cfg'
+maybe chmod 0644 'nagios-plugins/config/ssh.cfg'
+maybe chmod 0644 'nagios-plugins/config/tcp_udp.cfg'
+maybe chmod 0644 'nagios-plugins/config/telnet.cfg'
+maybe chmod 0644 'nagios-plugins/config/users.cfg'
 maybe chmod 0644 'nail.rc'
 maybe chmod 0644 'nanorc'
 maybe chmod 0755 'network'
diff --git a/default/icinga2 b/default/icinga2
new file mode 100644 (file)
index 0000000..c452408
--- /dev/null
@@ -0,0 +1,3 @@
+# default settings for icinga2's initscript
+
+#DAEMON_ARGS="-e /var/log/icinga2/icinga2.err"
diff --git a/group b/group
index e8ef826e5df550d78d12c7e3ecb91628a93ee37c..71d40e54458cbfc0f83a134447d7809a92fefbf9 100644 (file)
--- a/group
+++ b/group
@@ -56,3 +56,4 @@ ulog:x:115:
 openldap:x:116:
 messagebus:x:117:
 _chrony:x:118:
+nagios:x:119:
diff --git a/group- b/group-
index 2aca5a0fe1a84209dc2b55ef766d7f67c1cbc539..e8ef826e5df550d78d12c7e3ecb91628a93ee37c 100644 (file)
--- a/group-
+++ b/group-
@@ -55,3 +55,4 @@ git-commiters:x:222:frank,doris,patrick
 ulog:x:115:
 openldap:x:116:
 messagebus:x:117:
+_chrony:x:118:
diff --git a/gshadow b/gshadow
index 43c3c6c7b820276da08f620a31e2367933c09020..3421e4a8b770ed60cf8285bc22d3a8fb086208bc 100644 (file)
--- a/gshadow
+++ b/gshadow
@@ -56,3 +56,4 @@ ulog:!::
 openldap:!::
 messagebus:!::
 _chrony:!::
+nagios:!::
index 26cc91af4f6108e65d88e80815c25cd2bf3f4668..43c3c6c7b820276da08f620a31e2367933c09020 100644 (file)
--- a/gshadow-
+++ b/gshadow-
@@ -55,3 +55,4 @@ git-commiters:!::frank,doris,patrick
 ulog:!::
 openldap:!::
 messagebus:!::
+_chrony:!::
diff --git a/icinga2/conf.d/app.conf b/icinga2/conf.d/app.conf
new file mode 100644 (file)
index 0000000..3e4be0d
--- /dev/null
@@ -0,0 +1 @@
+object IcingaApplication "app" { }
diff --git a/icinga2/conf.d/apt.conf b/icinga2/conf.d/apt.conf
new file mode 100644 (file)
index 0000000..b2c77a0
--- /dev/null
@@ -0,0 +1,7 @@
+apply Service "apt" {
+  import "generic-service"
+
+  check_command = "apt"
+
+  assign where host.name == NodeName
+}
diff --git a/icinga2/conf.d/commands.conf b/icinga2/conf.d/commands.conf
new file mode 100644 (file)
index 0000000..e97b087
--- /dev/null
@@ -0,0 +1,38 @@
+/* Command objects */
+
+object NotificationCommand "mail-host-notification" {
+  command = [ SysconfDir + "/icinga2/scripts/mail-host-notification.sh" ]
+
+  env = {
+    NOTIFICATIONTYPE = "$notification.type$"
+    HOSTALIAS = "$host.display_name$"
+    HOSTADDRESS = "$address$"
+    HOSTSTATE = "$host.state$"
+    LONGDATETIME = "$icinga.long_date_time$"
+    HOSTOUTPUT = "$host.output$"
+    NOTIFICATIONAUTHORNAME = "$notification.author$"
+    NOTIFICATIONCOMMENT = "$notification.comment$"
+    HOSTDISPLAYNAME = "$host.display_name$"
+    USEREMAIL = "$user.email$"
+  }
+}
+
+object NotificationCommand "mail-service-notification" {
+  command = [ SysconfDir + "/icinga2/scripts/mail-service-notification.sh" ]
+
+  env = {
+    NOTIFICATIONTYPE = "$notification.type$"
+    SERVICEDESC = "$service.name$"
+    HOSTALIAS = "$host.display_name$"
+    HOSTADDRESS = "$address$"
+    SERVICESTATE = "$service.state$"
+    LONGDATETIME = "$icinga.long_date_time$"
+    SERVICEOUTPUT = "$service.output$"
+    NOTIFICATIONAUTHORNAME = "$notification.author$"
+    NOTIFICATIONCOMMENT = "$notification.comment$"
+    HOSTDISPLAYNAME = "$host.display_name$"
+    SERVICEDISPLAYNAME = "$service.display_name$"
+    USEREMAIL = "$user.email$"
+  }
+}
+
diff --git a/icinga2/conf.d/downtimes.conf b/icinga2/conf.d/downtimes.conf
new file mode 100644 (file)
index 0000000..0bed647
--- /dev/null
@@ -0,0 +1,20 @@
+/**
+ * The example downtime apply rule.
+ */
+
+apply ScheduledDowntime "backup-downtime" to Service {
+  author = "icingaadmin"
+  comment = "Scheduled downtime for backup"
+
+  ranges = {
+    monday = service.vars.backup_downtime
+    tuesday = service.vars.backup_downtime
+    wednesday = service.vars.backup_downtime
+    thursday = service.vars.backup_downtime
+    friday = service.vars.backup_downtime
+    saturday = service.vars.backup_downtime
+    sunday = service.vars.backup_downtime
+  }
+
+  assign where service.vars.backup_downtime != ""
+}
diff --git a/icinga2/conf.d/groups.conf b/icinga2/conf.d/groups.conf
new file mode 100644 (file)
index 0000000..e6004a3
--- /dev/null
@@ -0,0 +1,37 @@
+/**
+ * Host group examples.
+ */
+
+object HostGroup "linux-servers" {
+  display_name = "Linux Servers"
+
+  assign where host.vars.os == "Linux"
+}
+
+object HostGroup "windows-servers" {
+  display_name = "Windows Servers"
+
+  assign where host.vars.os == "Windows"
+}
+
+/**
+ * Service group examples.
+ */
+
+object ServiceGroup "ping" {
+  display_name = "Ping Checks"
+
+  assign where match("ping*", service.name)
+}
+
+object ServiceGroup "http" {
+  display_name = "HTTP Checks"
+
+  assign where match("http*", service.check_command)
+}
+
+object ServiceGroup "disk" {
+  display_name = "Disk Checks"
+
+  assign where match("disk*", service.check_command)
+}
diff --git a/icinga2/conf.d/hosts.conf b/icinga2/conf.d/hosts.conf
new file mode 100644 (file)
index 0000000..5ff1f9b
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Host definitions with object attributes
+ * used for apply rules for Service, Notification,
+ * Dependency and ScheduledDowntime objects.
+ *
+ * Tip: Use `icinga2 object list --type Host` to
+ * list all host objects after running
+ * configuration validation (`icinga2 daemon -C`).
+ */
+
+/*
+ * This is an example host based on your
+ * local host's FQDN. Specify the NodeName
+ * constant in `constants.conf` or use your
+ * own description, e.g. "db-host-1".
+ */
+
+object Host NodeName {
+  /* Import the default host template defined in `templates.conf`. */
+  import "generic-host"
+
+  /* Specify the address attributes for checks e.g. `ssh` or `http`. */
+  address = "127.0.0.1"
+  address6 = "::1"
+
+  /* Set custom attribute `os` for hostgroup assignment in `groups.conf`. */
+  vars.os = "Linux"
+
+  /* Define http vhost attributes for service apply rules in `services.conf`. */
+  vars.http_vhosts["http"] = {
+    http_uri = "/"
+  }
+  /* Uncomment if you've sucessfully installed Icinga Web 2. */
+  //vars.http_vhosts["Icinga Web 2"] = {
+  //  http_uri = "/icingaweb2"
+  //}
+
+  /* Define disks and attributes for service apply rules in `services.conf`. */
+  vars.disks["disk"] = {
+    /* No parameters. */
+  }
+  vars.disks["disk /"] = {
+    disk_partitions = "/"
+  }
+
+  /* Define notification mail attributes for notification apply rules in `notifications.conf`. */
+  vars.notification["mail"] = {
+    /* The UserGroup `icingaadmins` is defined in `users.conf`. */
+    groups = [ "icingaadmins" ]
+  }
+}
+
diff --git a/icinga2/conf.d/notifications.conf b/icinga2/conf.d/notifications.conf
new file mode 100644 (file)
index 0000000..73f0f5f
--- /dev/null
@@ -0,0 +1,27 @@
+/**
+ * The example notification apply rules.
+ *
+ * Only applied if host/service objects have
+ * the custom attribute `notification` defined
+ * and containing `mail` as key.
+ *
+ * Check `hosts.conf` for an example.
+ */
+
+apply Notification "mail-icingaadmin" to Host {
+  import "mail-host-notification"
+
+  user_groups = host.vars.notification.mail.groups
+  users = host.vars.notification.mail.users
+
+  assign where host.vars.notification.mail
+}
+
+apply Notification "mail-icingaadmin" to Service {
+  import "mail-service-notification"
+
+  user_groups = host.vars.notification.mail.groups
+  users = host.vars.notification.mail.users
+
+  assign where host.vars.notification.mail
+}
diff --git a/icinga2/conf.d/satellite.conf b/icinga2/conf.d/satellite.conf
new file mode 100644 (file)
index 0000000..4a6b97a
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Host and Service templates for the Agent Setup.
+ */
+
+
+/**
+ * Provides settings for satellite hosts managed by 'icinga2 repository'.
+ * Define your global attributes here, for example custom
+ * attributes used for notifications, etc.
+ */
+template Host "satellite-host" {
+  vars.notification["mail"] = {
+    groups = [ "icingaadmins" ]
+  }
+}
+
+/**
+ * Provides settings for satellite services managed by 'icinga2 repository'.
+ * Define your global satellite attributes here, for example custom
+ * attributes used for notifications, etc.
+ */
+template Service "satellite-service" {
+  vars.notification["mail"] = {
+    groups = [ "icingaadmins" ]
+  }
+}
+
+
+apply Dependency "satellite-host" to Host {
+  parent_host_name = host.zone
+
+  assign where host.zone != "" && "satellite-host" in host.templates
+}
diff --git a/icinga2/conf.d/services.conf b/icinga2/conf.d/services.conf
new file mode 100644 (file)
index 0000000..416915b
--- /dev/null
@@ -0,0 +1,117 @@
+/*
+ * Service apply rules.
+ *
+ * The CheckCommand objects `ping4`, `ping6`, etc
+ * are provided by the plugin check command templates.
+ * Check the documentation for details.
+ *
+ * Tip: Use `icinga2 object list --type Service` to
+ * list all service objects after running
+ * configuration validation (`icinga2 daemon -C`).
+ */
+
+/*
+ * This is an example host based on your
+ * local host's FQDN. Specify the NodeName
+ * constant in `constants.conf` or use your
+ * own description, e.g. "db-host-1".
+ */
+
+/*
+ * These are generic `ping4` and `ping6`
+ * checks applied to all hosts having the
+ * `address` resp. `address6` attribute
+ * defined.
+ */
+apply Service "ping4" {
+  import "generic-service"
+
+  check_command = "ping4"
+
+  assign where host.address
+}
+
+apply Service "ping6" {
+  import "generic-service"
+
+  check_command = "ping6"
+
+  assign where host.address6
+}
+
+/*
+ * Apply the `ssh` service to all hosts
+ * with the `address` attribute defined and
+ * the custom attribute `os` set to `Linux`.
+ */
+apply Service "ssh" {
+  import "generic-service"
+
+  check_command = "ssh"
+
+  assign where (host.address || host.address6) && host.vars.os == "Linux"
+}
+
+
+
+apply Service for (http_vhost => config in host.vars.http_vhosts) {
+  import "generic-service"
+
+  check_command = "http"
+
+  vars += config
+}
+
+apply Service for (disk => config in host.vars.disks) {
+  import "generic-service"
+
+  check_command = "disk"
+
+  vars += config
+}
+
+apply Service "icinga" {
+  import "generic-service"
+
+  check_command = "icinga"
+
+  assign where host.name == NodeName
+}
+
+apply Service "load" {
+  import "generic-service"
+
+  check_command = "load"
+
+  /* Used by the ScheduledDowntime apply rule in `downtimes.conf`. */
+  vars.backup_downtime = "02:00-03:00"
+
+  assign where host.name == NodeName
+}
+
+apply Service "procs" {
+  import "generic-service"
+
+  check_command = "procs"
+
+  assign where host.name == NodeName
+}
+
+apply Service "swap" {
+  import "generic-service"
+
+  check_command = "swap"
+
+  assign where host.name == NodeName
+}
+
+apply Service "users" {
+  import "generic-service"
+
+  check_command = "users"
+
+  assign where host.name == NodeName
+}
+
+
+
diff --git a/icinga2/conf.d/templates.conf b/icinga2/conf.d/templates.conf
new file mode 100644 (file)
index 0000000..3588f7f
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Generic template examples.
+ */
+
+
+/**
+ * Provides default settings for hosts. By convention
+ * all hosts should import this template.
+ *
+ * The CheckCommand object `hostalive` is provided by
+ * the plugin check command templates.
+ * Check the documentation for details.
+ */
+template Host "generic-host" {
+  max_check_attempts = 3
+  check_interval = 1m
+  retry_interval = 30s
+
+  check_command = "hostalive"
+}
+
+/**
+ * Provides default settings for services. By convention
+ * all services should import this template.
+ */
+template Service "generic-service" {
+  max_check_attempts = 5
+  check_interval = 1m
+  retry_interval = 30s
+}
+
+/**
+ * Provides default settings for users. By convention
+ * all users should inherit from this template.
+ */
+
+template User "generic-user" {
+
+}
+
+/**
+ * Provides default settings for host notifications.
+ * By convention all host notifications should import
+ * this template.
+ */
+template Notification "mail-host-notification" {
+  command = "mail-host-notification"
+
+  states = [ Up, Down ]
+  types = [ Problem, Acknowledgement, Recovery, Custom,
+            FlappingStart, FlappingEnd,
+            DowntimeStart, DowntimeEnd, DowntimeRemoved ]
+
+  period = "24x7"
+}
+
+/**
+ * Provides default settings for service notifications.
+ * By convention all service notifications should import
+ * this template.
+ */
+template Notification "mail-service-notification" {
+  command = "mail-service-notification"
+
+  states = [ OK, Warning, Critical, Unknown ]
+  types = [ Problem, Acknowledgement, Recovery, Custom,
+            FlappingStart, FlappingEnd,
+            DowntimeStart, DowntimeEnd, DowntimeRemoved ]
+
+  period = "24x7"
+}
+
diff --git a/icinga2/conf.d/timeperiods.conf b/icinga2/conf.d/timeperiods.conf
new file mode 100644 (file)
index 0000000..21fac52
--- /dev/null
@@ -0,0 +1,43 @@
+/**
+ * Sample timeperiods for Icinga 2 requiring
+ * 'legacy-timeperiod' template from the Icinga
+ * Template Library (ITL).
+ * Check the documentation for details.
+ */
+
+object TimePeriod "24x7" {
+  import "legacy-timeperiod"
+
+  display_name = "Icinga 2 24x7 TimePeriod"
+  ranges = {
+    "monday"   = "00:00-24:00"
+    "tuesday"  = "00:00-24:00"
+    "wednesday" = "00:00-24:00"
+    "thursday"         = "00:00-24:00"
+    "friday"   = "00:00-24:00"
+    "saturday"         = "00:00-24:00"
+    "sunday"   = "00:00-24:00"
+  }
+}
+
+object TimePeriod "9to5" {
+  import "legacy-timeperiod"
+
+  display_name = "Icinga 2 9to5 TimePeriod"
+  ranges = {
+    "monday"   = "09:00-17:00"
+    "tuesday"  = "09:00-17:00"
+    "wednesday" = "09:00-17:00"
+    "thursday"         = "09:00-17:00"
+    "friday"   = "09:00-17:00"
+  }
+}
+
+object TimePeriod "never" {
+  import "legacy-timeperiod"
+
+  display_name = "Icinga 2 never TimePeriod"
+  ranges = {
+  }
+}
+
diff --git a/icinga2/conf.d/users.conf b/icinga2/conf.d/users.conf
new file mode 100644 (file)
index 0000000..aa31e27
--- /dev/null
@@ -0,0 +1,17 @@
+/**
+ * The example user 'icingaadmin' and the example
+ * group 'icingaadmins'.
+ */
+
+object User "icingaadmin" {
+  import "generic-user"
+
+  display_name = "Icinga 2 Admin"
+  groups = [ "icingaadmins" ]
+
+  email = "root@localhost"
+}
+
+object UserGroup "icingaadmins" {
+  display_name = "Icinga 2 Admin Group"
+}
diff --git a/icinga2/constants.conf b/icinga2/constants.conf
new file mode 100644 (file)
index 0000000..29232d6
--- /dev/null
@@ -0,0 +1,28 @@
+/**
+ * This file defines global constants which can be used in
+ * the other configuration files.
+ */
+
+/* The directory which contains the plugins from the Monitoring Plugins project. */
+const PluginDir = "/usr/lib/nagios/plugins"
+
+/* The directory which contains the Manubulon plugins.
+ * Check the documentation, chapter "SNMP Manubulon Plugin Check Commands", for details.
+ */
+const ManubulonPluginDir = "/usr/lib/nagios/plugins"
+
+/* The directory which you use to store additional plugins which ITL provides user contributed command definitions for.
+ * Check the documentation, chapter "Plugins Contribution", for details.
+ */
+const PluginContribDir = "/usr/lib/nagios/plugins"
+
+/* Our local instance name. By default this is the server's hostname as returned by `hostname --fqdn`.
+ * This should be the common name from the API certificate.
+ */
+//const NodeName = "localhost"
+
+/* Our local zone name. */
+const ZoneName = NodeName
+
+/* Secret key for remote node tickets */
+const TicketSalt = ""
diff --git a/icinga2/features-available/api.conf b/icinga2/features-available/api.conf
new file mode 100644 (file)
index 0000000..0136de0
--- /dev/null
@@ -0,0 +1,11 @@
+/**
+ * The API listener is used for distributed monitoring setups.
+ */
+
+object ApiListener "api" {
+  cert_path = SysconfDir + "/icinga2/pki/" + NodeName + ".crt"
+  key_path = SysconfDir + "/icinga2/pki/" + NodeName + ".key"
+  ca_path = SysconfDir + "/icinga2/pki/ca.crt"
+
+  ticket_salt = TicketSalt
+}
diff --git a/icinga2/features-available/checker.conf b/icinga2/features-available/checker.conf
new file mode 100644 (file)
index 0000000..1139e62
--- /dev/null
@@ -0,0 +1,7 @@
+/**
+ * The checker component takes care of executing service checks.
+ */
+
+library "checker"
+
+object CheckerComponent "checker" { }
diff --git a/icinga2/features-available/command.conf b/icinga2/features-available/command.conf
new file mode 100644 (file)
index 0000000..3583056
--- /dev/null
@@ -0,0 +1,9 @@
+/**
+ * The ExternalCommandListener implements support for the external
+ * commands pipe.
+ */
+
+library "compat"
+
+object ExternalCommandListener "command" { }
+
diff --git a/icinga2/features-available/compatlog.conf b/icinga2/features-available/compatlog.conf
new file mode 100644 (file)
index 0000000..58c5df7
--- /dev/null
@@ -0,0 +1,9 @@
+/**
+ * The CompatLogger type is responsible for writing log files in a format
+ * that is compatible with Icinga 1.x.
+ */
+
+library "compat"
+
+object CompatLogger "compatlog" { }
+
diff --git a/icinga2/features-available/debuglog.conf b/icinga2/features-available/debuglog.conf
new file mode 100644 (file)
index 0000000..6e8e581
--- /dev/null
@@ -0,0 +1,11 @@
+/**
+ * The FileLogger type writes log information to a log file.
+ * Unlike the mainlog feature this sets up a logger
+ * with severity "debug".
+ */
+
+object FileLogger "debug-file" {
+  severity = "debug"
+  path = LocalStateDir + "/log/icinga2/debug.log"
+}
+
diff --git a/icinga2/features-available/gelf.conf b/icinga2/features-available/gelf.conf
new file mode 100644 (file)
index 0000000..2db44ef
--- /dev/null
@@ -0,0 +1,12 @@
+/**
+ * The GelfWriter type writes event log entries
+ * to a GELF tcp socket provided by Graylog,
+ * Logstash or any other receiver.
+ */
+
+library "perfdata"
+
+object GelfWriter "gelf" {
+  //host = "127.0.0.1"
+  //port = 12201
+}
diff --git a/icinga2/features-available/graphite.conf b/icinga2/features-available/graphite.conf
new file mode 100644 (file)
index 0000000..f2e59d9
--- /dev/null
@@ -0,0 +1,11 @@
+/**
+ * The GraphiteWriter type writes check result metrics and
+ * performance data to a graphite tcp socket.
+ */
+
+library "perfdata"
+
+object GraphiteWriter "graphite" {
+  //host = "127.0.0.1"
+  //port = 2003
+}
diff --git a/icinga2/features-available/influxdb.conf b/icinga2/features-available/influxdb.conf
new file mode 100644 (file)
index 0000000..058568b
--- /dev/null
@@ -0,0 +1,25 @@
+/**
+ * The InfluxdbWriter type writes check result metrics and
+ * performance data to an InfluxDB HTTP API
+ */
+
+library "perfdata"
+
+object InfluxdbWriter "influxdb" {
+  //host = "127.0.0.1"
+  //port = 8086
+  //database = "icinga2"
+  //host_template = {
+  //  measurement = "$host.check_command$"
+  //  tags = {
+  //    hostname = "$host.name$"
+  //  }
+  //}
+  //service_template = {
+  //  measurement = "$service.check_command$"
+  //  tags = {
+  //    hostname = "$host.name$"
+  //    service = "$service.name$"
+  //  }
+  //}
+}
diff --git a/icinga2/features-available/livestatus.conf b/icinga2/features-available/livestatus.conf
new file mode 100644 (file)
index 0000000..45d44d6
--- /dev/null
@@ -0,0 +1,8 @@
+/**
+ *  The livestatus library implements the livestatus query protocol.
+ */
+
+library "livestatus"
+
+object LivestatusListener "livestatus" { }
+
diff --git a/icinga2/features-available/mainlog.conf b/icinga2/features-available/mainlog.conf
new file mode 100644 (file)
index 0000000..ded9a7c
--- /dev/null
@@ -0,0 +1,9 @@
+/**
+ * The FileLogger type writes log information to a file.
+ */
+
+object FileLogger "main-log" {
+  severity = "information"
+  path = LocalStateDir + "/log/icinga2/icinga2.log"
+}
+
diff --git a/icinga2/features-available/notification.conf b/icinga2/features-available/notification.conf
new file mode 100644 (file)
index 0000000..aa22f60
--- /dev/null
@@ -0,0 +1,7 @@
+/**
+ * The notification component takes care of executing service checks.
+ */
+
+library "notification"
+
+object NotificationComponent "notification" { }
diff --git a/icinga2/features-available/opentsdb.conf b/icinga2/features-available/opentsdb.conf
new file mode 100644 (file)
index 0000000..fcb547d
--- /dev/null
@@ -0,0 +1,11 @@
+/**
+ * The OpenTsdbWriter type writes check result metrics and
+ * performance data to a OpenTSDB tcp socket.
+ */
+
+library "perfdata"
+
+object OpenTsdbWriter "opentsdb" {
+  //host = "127.0.0.1"
+  //port = 4242
+}
diff --git a/icinga2/features-available/perfdata.conf b/icinga2/features-available/perfdata.conf
new file mode 100644 (file)
index 0000000..356431f
--- /dev/null
@@ -0,0 +1,8 @@
+/**
+ * The PerfdataWriter type writes performance data files and rotates
+ * them in a regular interval.
+ */
+
+library "perfdata"
+
+object PerfdataWriter "perfdata" { }
diff --git a/icinga2/features-available/statusdata.conf b/icinga2/features-available/statusdata.conf
new file mode 100644 (file)
index 0000000..af02aa5
--- /dev/null
@@ -0,0 +1,10 @@
+/**
+ * The StatusDataWriter type periodically updates the status.dat and objects.cache
+ * files. These are used by the Icinga 1.x CGIs to display the state of
+ * hosts and services.
+ */
+
+library "compat"
+
+object StatusDataWriter "status" { }
+
diff --git a/icinga2/features-available/syslog.conf b/icinga2/features-available/syslog.conf
new file mode 100644 (file)
index 0000000..3b794b4
--- /dev/null
@@ -0,0 +1,8 @@
+/**
+ * The SyslogLogger type writes log information to syslog.
+ */
+
+object SyslogLogger "syslog" {
+    severity = "warning"
+}
+
diff --git a/icinga2/features-enabled/checker.conf b/icinga2/features-enabled/checker.conf
new file mode 120000 (symlink)
index 0000000..d51cf79
--- /dev/null
@@ -0,0 +1 @@
+../features-available/checker.conf
\ No newline at end of file
diff --git a/icinga2/features-enabled/mainlog.conf b/icinga2/features-enabled/mainlog.conf
new file mode 120000 (symlink)
index 0000000..6bda4a5
--- /dev/null
@@ -0,0 +1 @@
+../features-available/mainlog.conf
\ No newline at end of file
diff --git a/icinga2/features-enabled/notification.conf b/icinga2/features-enabled/notification.conf
new file mode 120000 (symlink)
index 0000000..c31d3b4
--- /dev/null
@@ -0,0 +1 @@
+../features-available/notification.conf
\ No newline at end of file
diff --git a/icinga2/icinga2.conf b/icinga2/icinga2.conf
new file mode 100644 (file)
index 0000000..a809b96
--- /dev/null
@@ -0,0 +1,63 @@
+/**
+ * Icinga 2 configuration file
+ * - this is where you define settings for the Icinga application including
+ * which hosts/services to check.
+ *
+ * For an overview of all available configuration options please refer
+ * to the documentation that is distributed as part of Icinga 2.
+ */
+
+/**
+ * The constants.conf defines global constants.
+ */
+include "constants.conf"
+
+/**
+ * The zones.conf defines zones for a cluster setup.
+ * Not required for single instance setups.
+ */
+include "zones.conf"
+
+/**
+ * The Icinga Template Library (ITL) provides a number of useful templates
+ * and command definitions.
+ * Common monitoring plugin command definitions are included separately.
+ */
+include <itl>
+include <plugins>
+include <plugins-contrib>
+include <manubulon>
+
+/**
+ * This includes the Icinga 2 Windows plugins. These command definitions
+ * are required on a master node when a client is used as command endpoint.
+ */
+include <windows-plugins>
+
+/**
+ * This includes the NSClient++ check commands. These command definitions
+ * are required on a master node when a client is used as command endpoint.
+ */
+include <nscp>
+
+/**
+ * The features-available directory contains a number of configuration
+ * files for features which can be enabled and disabled using the
+ * icinga2 feature enable / icinga2 feature disable CLI commands.
+ * These commands work by creating and removing symbolic links in
+ * the features-enabled directory.
+ */
+include "features-enabled/*.conf"
+
+/**
+ * The repository.d directory contains all configuration objects
+ * managed by the 'icinga2 repository' CLI commands.
+ */
+include_recursive "repository.d"
+
+/**
+ * Although in theory you could define all your objects in this file
+ * the preferred way is to create separate directories and files in the conf.d
+ * directory. Each of these files must have the file extension ".conf".
+ */
+include_recursive "conf.d"
diff --git a/icinga2/init.conf b/icinga2/init.conf
new file mode 100644 (file)
index 0000000..16a9041
--- /dev/null
@@ -0,0 +1,7 @@
+/**
+ * This file is read by Icinga 2 before the main
+ * configuration file (icinga2.conf) is processed.
+ */
+
+const RunAsUser = "nagios"
+const RunAsGroup = "nagios"
diff --git a/icinga2/repository.d/README b/icinga2/repository.d/README
new file mode 100644 (file)
index 0000000..a5da082
--- /dev/null
@@ -0,0 +1,3 @@
+This directory contains configuration files managed by 'icinga2 repository'
+cli commands. Please run 'icinga2 repository --help' to see all available
+options.
diff --git a/icinga2/scripts/mail-host-notification.sh b/icinga2/scripts/mail-host-notification.sh
new file mode 100755 (executable)
index 0000000..e1ac716
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh
+template=`cat <<TEMPLATE
+***** Icinga  *****
+
+Notification Type: $NOTIFICATIONTYPE
+
+Host: $HOSTALIAS
+Address: $HOSTADDRESS
+State: $HOSTSTATE
+
+Date/Time: $LONGDATETIME
+
+Additional Info: $HOSTOUTPUT
+
+Comment: [$NOTIFICATIONAUTHORNAME] $NOTIFICATIONCOMMENT
+TEMPLATE
+`
+
+/usr/bin/printf "%b" "$template" | mail -s "$NOTIFICATIONTYPE - $HOSTDISPLAYNAME is $HOSTSTATE" $USEREMAIL
+
diff --git a/icinga2/scripts/mail-service-notification.sh b/icinga2/scripts/mail-service-notification.sh
new file mode 100755 (executable)
index 0000000..8574036
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/sh
+template=`cat <<TEMPLATE
+***** Icinga  *****
+
+Notification Type: $NOTIFICATIONTYPE
+
+Service: $SERVICEDESC
+Host: $HOSTALIAS
+Address: $HOSTADDRESS
+State: $SERVICESTATE
+
+Date/Time: $LONGDATETIME
+
+Additional Info: $SERVICEOUTPUT
+
+Comment: [$NOTIFICATIONAUTHORNAME] $NOTIFICATIONCOMMENT
+TEMPLATE
+`
+
+/usr/bin/printf "%b" "$template" | mail -s "$NOTIFICATIONTYPE - $HOSTDISPLAYNAME - $SERVICEDISPLAYNAME is $SERVICESTATE" $USEREMAIL
+
diff --git a/icinga2/zones.conf b/icinga2/zones.conf
new file mode 100644 (file)
index 0000000..9c76de7
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * Endpoint and Zone configuration for a cluster setup
+ * This local example requires `NodeName` defined in
+ * constants.conf.
+ */
+
+object Endpoint NodeName {
+  host = NodeName
+}
+
+object Zone ZoneName {
+  endpoints = [ NodeName ]
+}
+
+/*
+ * Defines a global zone containing templates,
+ * etc. synced to all nodes, if they accept
+ * configuration. All remote nodes need
+ * this zone configured too.
+ */
+
+/*
+object Zone "global-templates" {
+  global = true
+}
+*/
+
+/*
+ * Read the documentation on how to configure
+ * a cluster setup with multiple zones.
+ */
+
+/*
+object Endpoint "master.example.org" {
+  host = "master.example.org"
+}
+
+object Endpoint "satellite.example.org" {
+  host = "satellite.example.org"
+}
+
+object Zone "master" {
+  endpoints = [ "master.example.org" ]
+}
+
+object Zone "satellite" {
+  parent = "master"
+  endpoints = [ "satellite.example.org" ]
+}
+*/
+
diff --git a/icinga2/zones.d/README b/icinga2/zones.d/README
new file mode 100644 (file)
index 0000000..ceff6bd
--- /dev/null
@@ -0,0 +1,2 @@
+This directory contains configuration files for cluster zones. If you're not
+running a cluster you can safely ignore this directory.
diff --git a/init.d/icinga2 b/init.d/icinga2
new file mode 100755 (executable)
index 0000000..4ee354c
--- /dev/null
@@ -0,0 +1,239 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides:          icinga2
+# Required-Start:    $remote_fs $syslog
+# Required-Stop:     $remote_fs $syslog
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: icinga2 host/service/network monitoring and management system
+# Description:       icinga2 is a monitoring and management system for hosts, services and networks.
+### END INIT INFO
+
+# Author: Alexander Wirt <formorer@debian.org>
+#         Markus Frosch <markus@lazyfrosch.de>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="icinga2 monitoring daemon"
+NAME=icinga2
+DAEMON=/usr/sbin/icinga2
+DAEMON_CONFIG="/etc/icinga2/icinga2.conf"
+DAEMON_USER=nagios
+DAEMON_GROUP=nagios
+DAEMON_CMDGROUP=www-data
+DAEMON_ARGS="-e /var/log/icinga2/icinga2.err"
+STARTUP_LOG="/var/log/icinga2/startup.log"
+PIDFILE=/var/run/icinga2/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Block/ignore SIGPIPE inside Icinga2
+# Workaround for a known bug in 2.6.0
+# see https://dev.icinga.com/issues/13567#note-19
+trap '' 13 # SIGPIPE
+
+# Exit if the package is not installed
+[ -x "$DAEMON" ] || exit 0
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
+# and status_of_proc is working.
+. /lib/lsb/init-functions
+
+# check run directory
+check_run () {
+  test -d '/var/run/icinga2' || mkdir /var/run/icinga2
+  test -d '/var/run/icinga2/cmd' || mkdir /var/run/icinga2/cmd
+
+  chown "$DAEMON_USER":"$DAEMON_GROUP" /var/run/icinga2
+  chmod 0755 /var/run/icinga2
+
+  chown "$DAEMON_USER":"$DAEMON_CMDGROUP" /var/run/icinga2/cmd
+  chmod 2710 /var/run/icinga2/cmd
+}
+
+check_config () {
+  $DAEMON daemon --validate
+}
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+  check_run
+  # Return
+  #   0 if daemon has been started
+  #   1 if daemon was already running
+  #   2 if daemon could not be started
+  start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
+    || return 1
+  start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
+    daemon -d $DAEMON_ARGS \
+    || return 2
+  # Add code here, if necessary, that waits for the process to be ready
+  # to handle requests from services started subsequently which depend
+  # on this one.  As a last resort, sleep for some time.
+}
+
+#
+# Function that starts the daemon/service in foreground for debugging
+#
+do_foreground()
+{
+  start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test \
+    || return 1
+  start-stop-daemon --start --pidfile $PIDFILE --exec $DAEMON -- \
+    daemon $DAEMON_ARGS \
+    || return 2
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+  # Return
+  #   0 if daemon has been stopped
+  #   1 if daemon was already stopped
+  #   2 if daemon could not be stopped
+  #   other if a failure occurred
+  start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
+  RETVAL="$?"
+  [ "$RETVAL" = 2 ] && return 2
+  # Wait for children to finish too if this is a daemon that forks
+  # and if the daemon is only ever run from this initscript.
+  # If the above conditions are not satisfied then add some other code
+  # that waits for the process to drop all resources that could be
+  # needed by services started subsequently.  A last resort is to
+  # sleep for some time.
+  start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
+  [ "$?" = 2 ] && return 2
+  # Many daemons don't delete their pidfiles when they exit.
+  rm -f $PIDFILE
+  return "$RETVAL"
+}
+
+#
+# Function that sends a SIGHUP to the daemon/service
+#
+do_reload() {
+  #
+  # If the daemon can reload its configuration without
+  # restarting (for example, when it is sent a SIGHUP),
+  # then implement that here.
+  #
+  start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
+  return 0
+}
+
+do_check_config () {
+  DOEXITONOK="$1"
+  log_begin_msg "checking Icinga2 configuration"
+  if ! check_config >$STARTUP_LOG 2>&1; then
+    echo
+    [ -n "$DOEXITONOK" ] && cat $STARTUP_LOG
+    log_failure_msg "checking Icinga2 configuration. Check '$STARTUP_LOG' for details."
+    exit 1
+  else
+    log_end_msg 0
+    [ -n "$DOEXITONOK" ] && exit 0
+  fi
+}
+
+case "$1" in
+  start)
+    do_check_config
+    log_daemon_msg "Starting $DESC" "$NAME"
+    do_start
+    case "$?" in
+      0|1) log_end_msg 0 ;;
+      2) log_end_msg 1 ;;
+    esac
+    ;;
+  foreground)
+    do_check_config
+    log_action_msg "Starting $DESC in foreground"
+    status=0
+    trap 'status=2;' INT # handle intr here
+    for i in 1 2; do
+      do_foreground || status="$?"
+      case "$status" in
+        0)
+          log_success_msg "$NAME ended graceful"
+          break
+          ;;
+        1)
+          if [ "$i" -eq 1 ]; then
+            log_warning_msg "$NAME already running!"
+            log_begin_msg "Do you want to stop $NAME before going foreground? [y/N] "
+            read -r question
+            if [ "$question" = "y" ] || [ "$question" = "yes" ]; then
+              do_stop
+              continue
+            fi
+          fi
+          log_failure_msg "$NAME already running! Please stop before starting in foreground!"
+          break
+          ;;
+        2)
+          log_failure_msg "$NAME ended"
+          break
+          ;;
+      esac
+    done
+    exit $status
+    ;;
+  stop)
+    log_daemon_msg "Stopping $DESC" "$NAME"
+    do_stop
+    case "$?" in
+      0|1) log_end_msg 0 ;;
+      2) log_end_msg 1 ;;
+    esac
+    ;;
+  status)
+    status_of_proc -p "$PIDFILE" "$DAEMON" "$NAME" && exit 0 || exit $?
+    ;;
+  reload|force-reload)
+    do_check_config
+    status_of_proc -p "$PIDFILE" "$DAEMON" "$NAME" || exit $?
+    log_daemon_msg "Reloading $DESC" "$NAME"
+    do_reload
+    log_end_msg $?
+    ;;
+  restart)
+    do_check_config
+    log_daemon_msg "Restarting $DESC" "$NAME"
+    do_stop
+    case "$?" in
+      0|1)
+        do_start
+        case "$?" in
+          0) log_end_msg 0 ;;
+          1) log_end_msg 1 ;; # Old process is still running
+          *) log_end_msg 1 ;; # Failed to start
+        esac
+        ;;
+      *)
+        # Failed to stop
+        log_end_msg 1
+        ;;
+    esac
+  ;;
+  checkconfig)
+    do_check_config 1
+    ;;
+  *)
+    echo "Usage: $SCRIPTNAME {start|stop|status|reload|force-reload|restart|checkconfig|foreground}" >&2
+    exit 3
+    ;;
+esac
+
+# vi: ts=2 sw=2 expandtab :
+:
diff --git a/logrotate.d/icinga2 b/logrotate.d/icinga2
new file mode 100644 (file)
index 0000000..867502d
--- /dev/null
@@ -0,0 +1,24 @@
+/var/log/icinga2/icinga2.log /var/log/icinga2/debug.log {
+       daily
+       rotate 7
+       compress
+       delaycompress
+       missingok
+       notifempty
+       create 644 nagios nagios
+       postrotate
+               /bin/kill -USR1 $(cat /run/icinga2/icinga2.pid 2> /dev/null) 2> /dev/null || true
+       endscript
+}
+
+/var/log/icinga2/error.log {
+       daily
+       rotate 90
+       compress
+       delaycompress
+       missingok
+       notifempty
+       create 644 nagios nagios
+       # TODO: figure out how to get Icinga to re-open this log file
+}
+
diff --git a/nagios-plugins/config/apt.cfg b/nagios-plugins/config/apt.cfg
new file mode 100644 (file)
index 0000000..d3ceb7c
--- /dev/null
@@ -0,0 +1,12 @@
+# 'check_apt' command definition
+define command{
+       command_name    check_apt
+       command_line    /usr/lib/nagios/plugins/check_apt
+       }
+
+# 'check_apt_distupgrade' command definition
+define command{
+       command_name    check_apt_distupgrade
+       command_line    /usr/lib/nagios/plugins/check_apt -d
+       }
+
diff --git a/nagios-plugins/config/breeze.cfg b/nagios-plugins/config/breeze.cfg
new file mode 100644 (file)
index 0000000..2e89650
--- /dev/null
@@ -0,0 +1,5 @@
+# 'check_breeze' command definition
+define command {
+       command_name    check_breeze
+       command_line    /usr/lib/nagios/plugins/check_breeze -H '$HOSTADDRESS$' -w '$ARG1$' -c '$ARG2$'
+}
diff --git a/nagios-plugins/config/dhcp.cfg b/nagios-plugins/config/dhcp.cfg
new file mode 100644 (file)
index 0000000..a6c0c02
--- /dev/null
@@ -0,0 +1,15 @@
+# note: these plugins require root privilege.  see README.Debian for
+# more information on how it is recommended that you do this.
+
+# 'check_dhcp' command definition
+define command{
+       command_name    check_dhcp
+       command_line    /usr/lib/nagios/plugins/check_dhcp -s '$HOSTADDRESS$' '$ARG1$'
+       }
+
+# 'check_dhcp_interface' command definition
+define command{
+       command_name    check_dhcp_interface
+       command_line    /usr/lib/nagios/plugins/check_dhcp -s '$HOSTADDRESS$' -i '$ARG1$' '$ARG2$'
+       }
+
diff --git a/nagios-plugins/config/disk-smb.cfg b/nagios-plugins/config/disk-smb.cfg
new file mode 100644 (file)
index 0000000..d3cee35
--- /dev/null
@@ -0,0 +1,54 @@
+# 'check_disk_smb' command definition
+define command{
+       command_name    check_disk_smb
+       command_line    /usr/lib/nagios/plugins/check_disk_smb -H '$ARG1$' -s '$ARG2$'
+       }
+
+
+# 'check_disk_smb_workgroup' command definition
+define command{
+       command_name    check_disk_smb_workgroup
+       command_line    /usr/lib/nagios/plugins/check_disk_smb -H '$ARG1$' -s '$ARG2$' -W '$ARG3$'
+       }
+
+
+# 'check_disk_smb_host' command definition
+define command{
+       command_name    check_disk_smb_host
+       command_line    /usr/lib/nagios/plugins/check_disk_smb -a '$HOSTADDRESS$' -H '$ARG1$' -s '$ARG2$'
+       }
+
+
+# 'check_disk_smb_workgroup_host' command definition
+define command{
+       command_name    check_disk_smb_workgroup_host
+       command_line    /usr/lib/nagios/plugins/check_disk_smb -a '$HOSTADDRESS$' -H '$ARG1$' -s '$ARG2$' -W '$ARG3$'
+       }
+
+
+# 'check_disk_smb_user' command definition
+define command{
+       command_name    check_disk_smb_user
+       command_line    /usr/lib/nagios/plugins/check_disk_smb -H '$ARG1$' -s '$ARG2$' -u '$ARG3$' -p '$ARG4$' -w '$ARG5$' -c '$ARG6$'
+       }
+
+
+# 'check_disk_smb_workgroup_user' command definition
+define command{
+       command_name    check_disk_smb_workgroup_user
+       command_line    /usr/lib/nagios/plugins/check_disk_smb -H '$ARG1$' -s '$ARG2$' -W '$ARG3$' -u '$ARG4$' -p '$ARG5$'
+       }
+
+
+# 'check_disk_smb_host_user' command definition
+define command{
+       command_name    check_disk_smb_host_user
+       command_line    /usr/lib/nagios/plugins/check_disk_smb -a '$HOSTADDRESS$' -H '$ARG1$' -s '$ARG2$' -u '$ARG3$' -p '$ARG4$'
+       }
+
+
+# 'check_disk_smb_workgroup_host_user' command definition
+define command{
+       command_name    check_disk_smb_workgroup_host_user
+       command_line    /usr/lib/nagios/plugins/check_disk_smb -a '$HOSTADDRESS$' -H '$ARG1$' -s '$ARG2$' -W '$ARG3$' -u '$ARG4$' -p '$ARG5$'
+       }
diff --git a/nagios-plugins/config/disk.cfg b/nagios-plugins/config/disk.cfg
new file mode 100644 (file)
index 0000000..3f5fcaf
--- /dev/null
@@ -0,0 +1,27 @@
+# 'check_disk' command definition
+define command{
+       command_name    check_disk
+       command_line    /usr/lib/nagios/plugins/check_disk -w '$ARG1$' -c '$ARG2$' -e -p '$ARG3$'
+       }
+
+# 'check_all_disks' command definition
+define command{
+       command_name    check_all_disks
+       command_line    /usr/lib/nagios/plugins/check_disk -w '$ARG1$' -c '$ARG2$' -e
+       }
+
+# 'ssh_disk' command definition
+define command{
+       command_name    ssh_disk
+       command_line    /usr/lib/nagios/plugins/check_by_ssh -H '$HOSTADDRESS$' -C "/usr/lib/nagios/plugins/check_disk -w '$ARG1$' -c '$ARG2$' -e -p '$ARG3$'"
+       }
+
+####
+# use these checks, if you want to test IPv4 connectivity on IPv6 enabled systems
+####
+
+# 'ssh_disk_4' command definition
+define command{
+        command_name    ssh_disk_4
+        command_line    /usr/lib/nagios/plugins/check_by_ssh -H '$HOSTADDRESS$' -C "/usr/lib/nagios/plugins/check_disk -w '$ARG1$' -c '$ARG2$' -e -p '$ARG3$'" -4
+        }
diff --git a/nagios-plugins/config/dns.cfg b/nagios-plugins/config/dns.cfg
new file mode 100644 (file)
index 0000000..d2363bf
--- /dev/null
@@ -0,0 +1,11 @@
+# 'check_dns' command definition
+define command{
+       command_name    check_dns
+       command_line    /usr/lib/nagios/plugins/check_dns -H www.google.com -s '$HOSTADDRESS$' '$ARG1$'
+}
+
+# 'check_dig' command definition
+define command{
+       command_name    check_dig
+       command_line    /usr/lib/nagios/plugins/check_dig -H '$HOSTADDRESS$' -l '$ARG1$' '$ARG2$'
+}
diff --git a/nagios-plugins/config/dummy.cfg b/nagios-plugins/config/dummy.cfg
new file mode 100644 (file)
index 0000000..bfb7ef4
--- /dev/null
@@ -0,0 +1,29 @@
+# return-ok definition
+define command {
+       command_name    return-ok
+       command_line    /usr/lib/nagios/plugins/check_dummy 0
+}
+
+# return-warning definition
+define command {
+       command_name    return-warning
+       command_line    /usr/lib/nagios/plugins/check_dummy 1
+}
+
+# return-critical definition
+define command {
+       command_name    return-critical
+       command_line    /usr/lib/nagios/plugins/check_dummy 2
+}
+
+# return-unknown definition
+define command {
+       command_name    return-unknown
+       command_line    /usr/lib/nagios/plugins/check_dummy 3
+}
+
+# return-numeric definition
+define command {
+       command_name    return-numeric
+       command_line    /usr/lib/nagios/plugins/check_dummy '$ARG1$'
+}
diff --git a/nagios-plugins/config/flexlm.cfg b/nagios-plugins/config/flexlm.cfg
new file mode 100644 (file)
index 0000000..678f044
--- /dev/null
@@ -0,0 +1,6 @@
+# 'check_flexlm' command definition
+define command{
+       command_name    check_flexlm
+       command_line    /usr/lib/nagios/plugins/check_flexlm -F '$ARG1$'
+       }
+
diff --git a/nagios-plugins/config/fping.cfg b/nagios-plugins/config/fping.cfg
new file mode 100644 (file)
index 0000000..bf3baf6
--- /dev/null
@@ -0,0 +1,5 @@
+# 'check-fast-alive' command definition
+define command{
+       command_name    check-fast-alive
+       command_line    /usr/lib/nagios/plugins/check_fping -H '$HOSTADDRESS$'
+       }
diff --git a/nagios-plugins/config/ftp.cfg b/nagios-plugins/config/ftp.cfg
new file mode 100644 (file)
index 0000000..79bf2fd
--- /dev/null
@@ -0,0 +1,15 @@
+# 'check_ftp' command definition
+define command{
+       command_name    check_ftp
+       command_line    /usr/lib/nagios/plugins/check_ftp -H '$HOSTADDRESS$' '$ARG1$'
+       }
+
+####
+# use these checks, if you want to test IPv4 connectivity on IPv6 enabled systems
+####
+
+# 'check_ftp_4' command definition
+define command{
+        command_name    check_ftp_4
+        command_line    /usr/lib/nagios/plugins/check_ftp -H '$HOSTADDRESS$' -4 '$ARG1$'
+        }
diff --git a/nagios-plugins/config/games.cfg b/nagios-plugins/config/games.cfg
new file mode 100644 (file)
index 0000000..0ada476
--- /dev/null
@@ -0,0 +1,14 @@
+# 'check_quake' command definition
+define command{
+       command_name    check_quake
+       command_line    /usr/lib/nagios/plugins/check_game qs '$HOSTADDRESS$'
+       }
+
+
+# 'check_unreal' command definition
+define command{
+       command_name    check_unreal
+       command_line    /usr/lib/nagios/plugins/check_game uns '$HOSTADDRESS$' -P '$ARG1$' -p 8
+       }
+
+
diff --git a/nagios-plugins/config/hppjd.cfg b/nagios-plugins/config/hppjd.cfg
new file mode 100644 (file)
index 0000000..cb15b5b
--- /dev/null
@@ -0,0 +1,6 @@
+# 'check_hpjd' command definition
+define command{
+       command_name    check_hpjd
+       command_line    /usr/lib/nagios/plugins/check_hpjd -H '$HOSTADDRESS$' -C public
+       }
+
diff --git a/nagios-plugins/config/http.cfg b/nagios-plugins/config/http.cfg
new file mode 100644 (file)
index 0000000..16072de
--- /dev/null
@@ -0,0 +1,111 @@
+# 'check_http' command definition
+define command{
+       command_name    check_http
+       command_line    /usr/lib/nagios/plugins/check_http -H '$HOSTADDRESS$' -I '$HOSTADDRESS$' '$ARG1$'
+       }
+
+# 'check_http_hostname' command definition
+define command{
+       command_name    check_httpname
+       command_line    /usr/lib/nagios/plugins/check_http -H '$HOSTNAME$' -I '$HOSTADDRESS$' '$ARG1$'
+       }
+
+# 'check_http2' command definition
+define command{
+       command_name    check_http2
+       command_line    /usr/lib/nagios/plugins/check_http -H '$ARG1$' -I '$HOSTADDRESS$' -w '$ARG2$' -c '$ARG3$' '$ARG4$'
+       }
+
+# 'check_squid' command definition
+define command{
+       command_name    check_squid
+       command_line    /usr/lib/nagios/plugins/check_http -H '$HOSTADDRESS$' -p '$ARG1$'  -u '$ARG2$'
+       }
+
+# 'check_https' command definition
+define command{
+       command_name    check_https
+       command_line    /usr/lib/nagios/plugins/check_http --ssl -H '$HOSTADDRESS$' -I '$HOSTADDRESS$' '$ARG1$'
+       }
+
+# 'check_https_hostname' command definition
+define command{
+       command_name    check_https_hostname
+       command_line    /usr/lib/nagios/plugins/check_http --ssl -H '$HOSTNAME$' -I '$HOSTADDRESS$' '$ARG1$'
+       }
+
+# 'check_https_auth' command definition
+define command{
+       command_name    check_https_auth
+       command_line    /usr/lib/nagios/plugins/check_http --ssl -H '$HOSTADDRESS$' -I '$HOSTADDRESS$' -a '$ARG1$' '$ARG2$'
+       }
+
+# 'check_https_auth_hostname' command definition
+define command{
+       command_name    check_https_auth_hostname
+       command_line    /usr/lib/nagios/plugins/check_http --ssl -H '$HOSTNAME$' -I '$HOSTADDRESS$' -a '$ARG1$' '$ARG2$'
+       }
+
+# 'check_cups' command definition
+define command{
+       command_name    check_cups
+       command_line    /usr/lib/nagios/plugins/check_http -I '$HOSTADDRESS$' -p 631 '$ARG1$'
+       }
+
+####
+# use these checks, if you want to test IPv4 connectivity on IPv6 enabled systems
+####
+
+# 'check_http_4' command definition
+define command{
+        command_name    check_http_4
+        command_line    /usr/lib/nagios/plugins/check_http -H '$HOSTADDRESS$' -I '$HOSTADDRESS$' -4 '$ARG1$'
+        }
+
+# 'check_http_hostname_4' command definition
+define command{
+       command_name    check_httpname_4
+       command_line    /usr/lib/nagios/plugins/check_http -H '$HOSTNAME$' -I '$HOSTADDRESS$' -4 '$ARG1$'
+       }
+
+# 'check_http2_4' command definition
+define command{
+        command_name    check_http2_4
+        command_line    /usr/lib/nagios/plugins/check_http -H '$ARG1$' -I '$HOSTADDRESS$' -w '$ARG2$' -c '$ARG3$' -4 '$ARG4$'
+        }
+
+# 'check_squid_4' command definition
+define command{
+        command_name    check_squid_4
+        command_line    /usr/lib/nagios/plugins/check_http -H '$HOSTADDRESS$' -p '$ARG1$'  -u '$ARG2$' -4
+        }
+
+# 'check_https_4' command definition
+define command{
+        command_name    check_https_4
+        command_line    /usr/lib/nagios/plugins/check_http --ssl -H '$HOSTADDRESS$' -I '$HOSTADDRESS$' -4 '$ARG1$'
+       }
+
+# 'check_https_hostname_4' command definition
+define command{
+       command_name    check_https_hostname_4
+       command_line    /usr/lib/nagios/plugins/check_http --ssl -H '$HOSTNAME$' -I '$HOSTADDRESS$' -4 '$ARG1$'
+       }
+
+# 'check_https_auth_4' command definition
+define command{
+        command_name    check_https_auth_4
+        command_line    /usr/lib/nagios/plugins/check_http --ssl -H '$HOSTADDRESS$' -I '$HOSTADDRESS$' -a '$ARG1$' -4 '$ARG2$'
+        }
+
+# 'check_https_auth_hostname_4' command definition
+define command{
+       command_name    check_https_auth_hostname_4
+       command_line    /usr/lib/nagios/plugins/check_http --ssl -H '$HOSTNAME' -I '$HOSTADDRESS$' -a '$ARG1$' -4 '$ARG2$'
+       }
+
+# 'check_cups_4' command definition
+define command{
+       command_name    check_cups_4
+       command_line    /usr/lib/nagios/plugins/check_http -I '$HOSTADDRESS$' -p 631 -4 '$ARG1$'
+       }
diff --git a/nagios-plugins/config/ifstatus.cfg b/nagios-plugins/config/ifstatus.cfg
new file mode 100644 (file)
index 0000000..e3fb54a
--- /dev/null
@@ -0,0 +1,23 @@
+# 'check_ifstatus' command definition
+define command{
+       command_name    check_ifstatus
+       command_line    /usr/lib/nagios/plugins/check_ifstatus -H '$HOSTADDRESS$' -C '$ARG1$'
+       }
+
+# 'check_ifstatus_exclude' command definition
+define command{
+        command_name    check_ifstatus_exclude
+        command_line    /usr/lib/nagios/plugins/check_ifstatus -H '$HOSTADDRESS$' -C '$ARG1$' -x '$ARG2$'
+        }
+
+# 'check_ifoperstatus_ifindex' command definition
+define command{
+       command_name    check_ifoperstatus_ifindex
+       command_line    /usr/lib/nagios/plugins/check_ifoperstatus -H '$HOSTADDRESS$' -C '$ARG1$' -k '$ARG2$'
+       }
+
+# 'check_ifoperstatus_ifdescr' command definition
+define command{
+       command_name    check_ifoperstatus_ifdescr
+       command_line    /usr/lib/nagios/plugins/check_ifoperstatus -H '$HOSTADDRESS$' -C '$ARG1$' -d '$ARG2$'
+       }
diff --git a/nagios-plugins/config/ldap.cfg b/nagios-plugins/config/ldap.cfg
new file mode 100644 (file)
index 0000000..ae5bde3
--- /dev/null
@@ -0,0 +1,31 @@
+# 'check_ldap' command definition
+define command{
+       command_name    check_ldap
+       command_line    /usr/lib/nagios/plugins/check_ldap -H '$HOSTADDRESS$' -b '$ARG1$'
+       }
+
+# 'check_ldaps' command definition
+# This was using 'check_ldaps' in the past which used port 389 and starttls
+# mechanism on default, keeped for backward compatibility
+define command{
+       command_name    check_ldaps
+       command_line    /usr/lib/nagios/plugins/check_ldap -H '$HOSTADDRESS$' -T -b '$ARG1$'
+       }
+
+####
+# use these checks, if you want to test IPv4 connectivity on IPv6 enabled systems
+####
+
+# 'check_ldap_4' command definition
+define command{
+       command_name    check_ldap_4
+       command_line    /usr/lib/nagios/plugins/check_ldap -H '$HOSTADDRESS$' -b '$ARG1$' -4
+       }
+
+# 'check_ldaps_4' command definition
+# This was using 'check_ldaps' in the past which used port 389 and starttls
+# mechanism on default, keeped for backward compatibility
+define command{
+       command_name    check_ldaps_4
+       command_line    /usr/lib/nagios/plugins/check_ldap -H '$HOSTADDRESS$' -T -b '$ARG1$' -4
+       }
diff --git a/nagios-plugins/config/load.cfg b/nagios-plugins/config/load.cfg
new file mode 100644 (file)
index 0000000..c87efde
--- /dev/null
@@ -0,0 +1,6 @@
+# 'check_load' command definition
+define command{
+       command_name    check_load
+       command_line    /usr/lib/nagios/plugins/check_load --warning='$ARG1$,$ARG2$,$ARG3$' --critical='$ARG4$,$ARG5$,$ARG6$'
+       }
+
diff --git a/nagios-plugins/config/mail.cfg b/nagios-plugins/config/mail.cfg
new file mode 100644 (file)
index 0000000..1da8050
--- /dev/null
@@ -0,0 +1,77 @@
+# 'check_pop' command definition
+define command {
+       command_name    check_pop
+       command_line    /usr/lib/nagios/plugins/check_pop -H '$HOSTADDRESS$' '$ARG1$'
+}
+
+
+# 'check_smtp' command definition
+define command {
+       command_name    check_smtp
+       command_line    /usr/lib/nagios/plugins/check_smtp -H '$HOSTADDRESS$' '$ARG1$'
+}
+
+# 'check_ssmtp' command definition
+define command {
+       command_name    check_ssmtp
+       command_line    /usr/lib/nagios/plugins/check_ssmtp -H '$HOSTADDRESS$' '$ARG1$'
+}
+
+# 'check_imap' command definition
+define command {
+       command_name    check_imap
+       command_line    /usr/lib/nagios/plugins/check_imap -H '$HOSTADDRESS$' '$ARG1$'
+}
+
+# 'check_spop' command definition
+define command {
+       command_name    check_spop
+       command_line    /usr/lib/nagios/plugins/check_pop -p 995 -H '$HOSTADDRESS$' -S '$ARG1$'
+}
+
+
+# 'check_simap' command definition
+define command {
+       command_name    check_simap
+       command_line    /usr/lib/nagios/plugins/check_imap -p 993 -H '$HOSTADDRESS$' -S '$ARG1$'
+}
+
+####
+# use these checks, if you want to test IPv4 connectivity on IPv6 enabled systems
+####
+
+# 'check_pop_4' command definition
+define command {
+        command_name    check_pop_4
+        command_line    /usr/lib/nagios/plugins/check_pop -H '$HOSTADDRESS$' -4 '$ARG1$'
+}
+
+# 'check_smtp_4' command definition
+define command {
+        command_name    check_smtp_4
+        command_line    /usr/lib/nagios/plugins/check_smtp -H '$HOSTADDRESS$' -4 '$ARG1$'
+}
+
+# 'check_ssmtp_4' command definition
+define command {
+        command_name    check_ssmtp_4
+        command_line    /usr/lib/nagios/plugins/check_ssmtp -H '$HOSTADDRESS$' -4 '$ARG1$'
+}
+
+# 'check_imap_4' command definition
+define command {
+        command_name    check_imap_4
+        command_line    /usr/lib/nagios/plugins/check_imap -H '$HOSTADDRESS$' -4 '$ARG1$'
+}
+
+# 'check_spop_4' command definition
+define command {
+        command_name    check_spop_4
+        command_line    /usr/lib/nagios/plugins/check_pop -p 995 -H '$HOSTADDRESS$' -S -4 '$ARG1$'
+}
+
+# 'check_simap_4' command definition
+define command {
+        command_name    check_simap_4
+        command_line    /usr/lib/nagios/plugins/check_imap -p 993 -H '$HOSTADDRESS$' -S -4 '$ARG1$'
+}
diff --git a/nagios-plugins/config/mailq.cfg b/nagios-plugins/config/mailq.cfg
new file mode 100644 (file)
index 0000000..9fb4486
--- /dev/null
@@ -0,0 +1,24 @@
+# 'check-mailq' for sendmail
+define command {
+        command_name    check_mailq_sendmail
+       command_line    /usr/lib/nagios/plugins/check_mailq -w '$ARG1$' -c '$ARG2$' -M sendmail
+}
+
+# 'check-mailq' for postfix
+define command {
+        command_name    check_mailq_postfix
+       command_line    /usr/lib/nagios/plugins/check_mailq -w '$ARG1$' -c '$ARG2$' -M postfix
+}
+
+# 'check-mailq' for exim
+define command {
+        command_name    check_mailq_exim
+       command_line    /usr/lib/nagios/plugins/check_mailq -w '$ARG1$' -c '$ARG2$' -M exim
+}
+
+# 'check-mailq' for qmail
+define command {
+        command_name    check_mailq_qmail
+       command_line    /usr/lib/nagios/plugins/check_mailq -w '$ARG1$' -c '$ARG2$' -M qmail
+}
+
diff --git a/nagios-plugins/config/mrtg.cfg b/nagios-plugins/config/mrtg.cfg
new file mode 100644 (file)
index 0000000..9a4c626
--- /dev/null
@@ -0,0 +1,14 @@
+# 'check_mrtg' command definition
+define command{
+       command_name    check_mrtg
+       command_line    /usr/lib/nagios/plugins/check_mrtg '$ARG1$' 10 AVG '$ARG2$' '$ARG3$' '$ARG4$' '$ARG5$' '$ARG6$'
+       }
+
+
+# 'traffic_average' command definition
+define command{
+       command_name    traffic_average
+       command_line    /usr/lib/nagios/plugins/check_mrtgtraf '$ARG1$' 10 AVG '$ARG2$' '$ARG3$' '$ARG4$' '$ARG5$'
+       }
+
+
diff --git a/nagios-plugins/config/mysql.cfg b/nagios-plugins/config/mysql.cfg
new file mode 100644 (file)
index 0000000..e8c8a65
--- /dev/null
@@ -0,0 +1,24 @@
+# 'check_mysql' command definition
+define command{
+        command_name    check_mysql
+       command_line    /usr/lib/nagios/plugins/check_mysql -H '$HOSTADDRESS$' '$ARG1$'
+}
+
+# 'check_mysql_cmdlinecred' command definition
+define command{
+       command_name    check_mysql_cmdlinecred
+       command_line    /usr/lib/nagios/plugins/check_mysql -H '$HOSTADDRESS$' -u '$ARG1$' -p '$ARG2$' '$ARG3$'
+}
+
+# 'check_mysql_database' command definition
+define command{
+       command_name    check_mysql_database
+       command_line    /usr/lib/nagios/plugins/check_mysql -d '$ARG3$' -H '$HOSTADDRESS$' -u '$ARG1$' -p '$ARG2$' '$ARG3$'
+}
+
+# 'check_mysql_slave' command definition
+define command{
+        command_name    check_mysql_slave
+        command_line    /usr/lib/nagios/plugins/check_mysql -H '$HOSTADDRESS$' -u '$ARG1$' -p '$ARG2$' -S '$ARG3$'
+}
+
diff --git a/nagios-plugins/config/netware.cfg b/nagios-plugins/config/netware.cfg
new file mode 100644 (file)
index 0000000..bc5f9d7
--- /dev/null
@@ -0,0 +1,84 @@
+# 'check_netware_logins' command definition
+define command{
+       command_name    check_netware_logins
+       command_line    /usr/lib/nagios/plugins/check_nwstat -H '$HOSTADDRESS$' -v "LOGINS" -w '$ARG1$' -c '$ARG2$'
+       }
+
+
+# 'check_nwstat_conns' command definition
+define command{
+       command_name    check_nwstat_conns
+       command_line    /usr/lib/nagios/plugins/check_nwstat -H '$HOSTADDRESS$' -v CONNS -w '$ARG1$' -c '$ARG2$'
+       }
+
+
+# 'check_netware_1load' command definition
+define command{
+       command_name    check_netware_1load
+       command_line    /usr/lib/nagios/plugins/check_nwstat -H '$HOSTADDRESS$' -v "LOAD1" -w 70 -c 90
+       }
+
+
+# 'check_netware_5load' command definition
+define command{
+       command_name    check_netware_5load
+       command_line    /usr/lib/nagios/plugins/check_nwstat -H '$HOSTADDRESS$' -v "LOAD5" -w 70 -c 90
+       }
+
+
+# 'check_netware_15load' command definition
+define command{
+       command_name    check_netware_15load
+       command_line    /usr/lib/nagios/plugins/check_nwstat -H '$HOSTADDRESS$' -v "LOAD15" -w 70 -c 90
+       }
+
+
+# 'check_nwstat_vol_p' command definition
+define command{
+       command_name    check_nwstat_vol_p
+       command_line    /usr/lib/nagios/plugins/check_nwstat -H '$HOSTADDRESS$' -v VPF'$ARG1$' -w '$ARG2$' -c '$ARG3$'
+       }
+
+
+# 'check_nwstat_vol_k' command definition
+define command{
+       command_name    check_nwstat_vol_k
+       command_line    /usr/lib/nagios/plugins/check_nwstat -H '$HOSTADDRESS$' -v VKF'$ARG1$' -w '$ARG2$' -c '$ARG3$'
+       }
+
+
+# 'check_nwstat_ltch' command definition
+define command{
+       command_name    check_nwstat_ltch
+       command_line    /usr/lib/nagios/plugins/check_nwstat -H '$HOSTADDRESS$' -v LTCH -w '$ARG1$' -c '$ARG2$'
+       }
+
+
+# 'check_nwstat_puprb' command definition
+define command{
+       command_name    check_nwstat_puprb
+       command_line    /usr/lib/nagios/plugins/check_nwstat -H '$HOSTADDRESS$' -v PUPRB -w '$ARG1$' -c '$ARG2$'
+       }
+
+
+# 'check_nwstat_dsdb' command definition
+define command{
+       command_name    check_nwstat_dsdb
+       command_line    /usr/lib/nagios/plugins/check_nwstat -H '$HOSTADDRESS$' -v DSDB
+       }
+
+
+# 'check_netware_abend' command definition
+define command{
+       command_name    check_netware_abend
+       command_line    /usr/lib/nagios/plugins/check_nwstat -H '$HOSTADDRESS$' -v "ABENDS" -w 10 -c 30
+       }
+
+
+# 'check_nwstat_csprocs' command definition
+define command{
+       command_name    check_nwstat_csprocs
+       command_line    /usr/lib/nagios/plugins/check_nwstat -H '$HOSTADDRESS$' -v CSPROCS -w '$ARG1$' -c '$ARG2$'
+       }
+
+
diff --git a/nagios-plugins/config/news.cfg b/nagios-plugins/config/news.cfg
new file mode 100644 (file)
index 0000000..065b395
--- /dev/null
@@ -0,0 +1,15 @@
+# 'check_nntp' command definition
+define command{
+       command_name    check_nntp
+       command_line    /usr/lib/nagios/plugins/check_nntp -H '$HOSTADDRESS$' '$ARG1$'
+       }
+
+####
+# use these checks, if you want to test IPv4 connectivity on IPv6 enabled systems
+####
+
+# 'check_nntp_4' command definition
+define command{
+        command_name    check_nntp_4
+        command_line    /usr/lib/nagios/plugins/check_nntp -H '$HOSTADDRESS$' -4 '$ARG1$'
+        }
diff --git a/nagios-plugins/config/nt.cfg b/nagios-plugins/config/nt.cfg
new file mode 100644 (file)
index 0000000..c01000c
--- /dev/null
@@ -0,0 +1,15 @@
+# If you are confused about this command definition, cause you was
+# reading other suggestions, please have a look into
+# /usr/share/doc/monitoring-plugins/README.Debian
+
+# 'check_nt' command definition
+define command {
+       command_name    check_nt
+       command_line    /usr/lib/nagios/plugins/check_nt -H '$HOSTADDRESS$' -v '$ARG1$'
+}
+
+# 'check_nscp' command definition
+define command {
+       command_name    check_nscp
+       command_line    /usr/lib/nagios/plugins/check_nt -H '$HOSTADDRESS$' -p 12489 -v '$ARG1$'
+}
diff --git a/nagios-plugins/config/ntp.cfg b/nagios-plugins/config/ntp.cfg
new file mode 100644 (file)
index 0000000..8668718
--- /dev/null
@@ -0,0 +1,17 @@
+# 'check_ntp' command definition
+define command{
+       command_name    check_ntp
+       command_line    /usr/lib/nagios/plugins/check_ntp_peer -H '$HOSTADDRESS$' '$ARG1$'
+       }
+
+# 'check_ntp_ntpq' command definition
+define command{
+       command_name    check_ntp_ntpq
+       command_line    /usr/lib/nagios/plugins/check_ntp_peer -H '$HOSTADDRESS$' -j 10 -k 15 '$ARG1$'
+       }
+
+# 'check_time' command definition
+define command{
+       command_name    check_time
+       command_line    /usr/lib/nagios/plugins/check_time -H '$HOSTADDRESS$' '$ARG1$'
+       }
diff --git a/nagios-plugins/config/pgsql.cfg b/nagios-plugins/config/pgsql.cfg
new file mode 100644 (file)
index 0000000..5c7f87c
--- /dev/null
@@ -0,0 +1,15 @@
+# 'check_pgsql' command definition
+define command{
+       command_name    check_pgsql
+       command_line    /usr/lib/nagios/plugins/check_pgsql -H '$HOSTADDRESS$' '$ARG1$'
+       }
+
+####
+# use these checks, if you want to test IPv4 connectivity on IPv6 enabled systems
+####
+
+# 'check_pgsql_4' command definition
+define command{
+        command_name    check_pgsql_4
+        command_line    /usr/lib/nagios/plugins/check_pgsql -H '$HOSTADDRESS$' -4 '$ARG1$'
+        }
diff --git a/nagios-plugins/config/ping.cfg b/nagios-plugins/config/ping.cfg
new file mode 100644 (file)
index 0000000..4d76cab
--- /dev/null
@@ -0,0 +1,72 @@
+# 'check_ping' command definition
+define command{
+       command_name    check_ping
+       command_line    /usr/lib/nagios/plugins/check_ping -H '$HOSTADDRESS$' -w '$ARG1$' -c '$ARG2$'
+       }
+
+
+# 'check-host-alive' command definition
+define command{
+       command_name    check-host-alive
+       command_line    /usr/lib/nagios/plugins/check_ping -H '$HOSTADDRESS$' -w 5000,100% -c 5000,100% -p 1
+       }
+
+
+# 'check-printer-alive' command definition
+define command{
+       command_name    check-printer-alive
+       command_line    /usr/lib/nagios/plugins/check_ping -H '$HOSTADDRESS$' -w 5000,100% -c 5000,100% -p 1
+       }
+
+
+# 'check-switch-alive' command definition
+define command{
+       command_name    check-switch-alive
+       command_line    /usr/lib/nagios/plugins/check_ping -H '$HOSTADDRESS$' -w 5000,100% -c 5000,100% -p 1
+       }
+
+
+# 'check-router-alive' command definition
+define command{
+       command_name    check-router-alive
+       command_line    /usr/lib/nagios/plugins/check_ping -H '$HOSTADDRESS$' -w 5000,100% -c 5000,100% -p 1
+       }
+
+####
+# use these checks, if you want to test IPv4 connectivity on IPv6 enabled systems
+####
+
+# 'check_ping_4' command definition
+define command{
+       command_name    check_ping_4
+       command_line    /usr/lib/nagios/plugins/check_ping -H '$HOSTADDRESS$' -w '$ARG1$' -c '$ARG2$' -4
+       }
+
+
+# 'check-host-alive_4' command definition
+define command{
+       command_name    check-host-alive_4
+       command_line    /usr/lib/nagios/plugins/check_ping -H '$HOSTADDRESS$' -w 5000,100% -c 5000,100% -p 1 -4
+       }
+
+
+# 'check-printer-alive_4' command definition
+define command{
+       command_name    check-printer-alive_4
+       command_line    /usr/lib/nagios/plugins/check_ping -H '$HOSTADDRESS$' -w 5000,100% -c 5000,100% -p 1 -4
+       }
+
+
+# 'check-switch-alive_4' command definition
+define command{
+       command_name    check-switch-alive_4
+       command_line    /usr/lib/nagios/plugins/check_ping -H '$HOSTADDRESS$' -w 5000,100% -c 5000,100% -p 1 -4
+       }
+
+
+# 'check-router-alive_4' command definition
+define command{
+       command_name    check-router-alive_4
+       command_line    /usr/lib/nagios/plugins/check_ping -H '$HOSTADDRESS$' -w 5000,100% -c 5000,100% -p 1 -4
+       }
+
diff --git a/nagios-plugins/config/procs.cfg b/nagios-plugins/config/procs.cfg
new file mode 100644 (file)
index 0000000..47158e4
--- /dev/null
@@ -0,0 +1,20 @@
+# 'check_procs' command definition
+define command{
+       command_name    check_procs
+       command_line    /usr/lib/nagios/plugins/check_procs -w '$ARG1$' -c '$ARG2$'
+       }
+
+
+# 'check_procs_zombie' command definition
+define command{
+       command_name    check_procs_zombie
+       command_line    /usr/lib/nagios/plugins/check_procs -w '$ARG1$' -c '$ARG2$' -s Z
+       }
+
+
+# 'check_procs_httpd' command definition
+define command{
+       command_name    check_procs_httpd
+       command_line    /usr/lib/nagios/plugins/check_procs -w 5:'$ARG1$' -c 1:'$ARG2$' -C httpd
+       }
+
diff --git a/nagios-plugins/config/radius.cfg b/nagios-plugins/config/radius.cfg
new file mode 100644 (file)
index 0000000..92c3679
--- /dev/null
@@ -0,0 +1,6 @@
+# 'check_radius' command definition
+define command{
+       command_name    check_radius
+       command_line    /usr/lib/nagios/plugins/check_radius -F /etc/radcli/radiusclient.conf -H '$HOSTADDRESS$' -P '$ARG4$' -t '$ARG3$' -u '$ARG1$' -p '$ARG2$'
+       }
+
diff --git a/nagios-plugins/config/real.cfg b/nagios-plugins/config/real.cfg
new file mode 100644 (file)
index 0000000..3afb59c
--- /dev/null
@@ -0,0 +1,13 @@
+# 'check_real_url' command definition
+define command{
+       command_name    check_real_url
+       command_line    /usr/lib/nagios/plugins/check_real '$HOSTADDRESS$' -p '$ARG1$' -wt '$ARG2$' -ct '$ARG3$' -to 5 -u '$ARG4$'
+       }
+
+
+# 'check_real' command definition
+define command{
+       command_name    check_real
+       command_line    /usr/lib/nagios/plugins/check_real '$HOSTADDRESS$' -p '$ARG1$' -wt '$ARG2$' -ct '$ARG3$' -to 5
+       }
+
diff --git a/nagios-plugins/config/rpc-nfs.cfg b/nagios-plugins/config/rpc-nfs.cfg
new file mode 100644 (file)
index 0000000..0a551f4
--- /dev/null
@@ -0,0 +1,14 @@
+
+# 'check-rpc' command definition
+define command{
+       command_name    check-rpc
+       command_line    /usr/lib/nagios/plugins/check_rpc -H '$HOSTADDRESS$' -C '$ARG1$'
+       }
+
+
+# 'check-nfs' command definition
+define command{
+       command_name    check-nfs
+       command_line    /usr/lib/nagios/plugins/check_rpc -H '$HOSTADDRESS$' -C nfs -c2,3
+       }
+
diff --git a/nagios-plugins/config/snmp.cfg b/nagios-plugins/config/snmp.cfg
new file mode 100644 (file)
index 0000000..2be8f8e
--- /dev/null
@@ -0,0 +1,132 @@
+# 'snmp_load' command definition
+define command{
+       command_name    snmp_load
+       command_line    /usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' -C '$ARG1$' -o .1.3.6.1.4.1.2021.10.1.5.1,.1.3.6.1.4.1.2021.10.1.5.2,.1.3.6.1.4.1.2021.10.1.5.3 -w :'$ARG2$',:'$ARG3$',:'$ARG4$' -c :'$ARG5$',:'$ARG6$',:'$ARG7$' -l load
+       }
+
+
+# 'snmp_cpustats' command definition
+define command{
+       command_name    snmp_cpustats
+       command_line    /usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' -C '$ARG1$' -o .1.3.6.1.4.1.2021.11.9.0,.1.3.6.1.4.1.2021.11.10.0,.1.3.6.1.4.1.2021.11.11.0 -l 'CPU usage (user system idle)' -u '%'
+       }
+
+
+# 'snmp_procname' command definition
+define command{
+       command_name    snmp_procname
+       command_line    /usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' -C '$ARG1$' -o .1.3.6.1.4.1.2021.2.1.5.'$ARG2$' -w '$ARG3$':'$ARG4$' -c '$ARG5$':'$ARG6$'
+       }
+
+
+# 'snmp_disk' command definition
+define command{
+       command_name    snmp_disk
+       command_line    /usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' -C '$ARG1$' -o .1.3.6.1.4.1.2021.9.1.7.'$ARG2$',.1.3.6.1.4.1.2021.9.1.9.'$ARG2$' -w '$ARG3$':,:'$ARG4$' -c '$ARG5$':,:'$ARG6$' -u 'kB free (','% used)' -l 'disk space'
+       }
+
+
+# 'snmp_mem' command definition
+define command{
+       command_name    snmp_mem
+       command_line    /usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' -C '$ARG1$' -o .1.3.6.1.4.1.2021.4.6.0,.1.3.6.1.4.1.2021.4.5.0 -w '$ARG2$': -c '$ARG3$':
+       }
+
+
+# 'snmp_swap' command definition
+define command{
+       command_name    snmp_swap
+       command_line    /usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' -C '$ARG1$' -o .1.3.6.1.4.1.2021.4.4.0,.1.3.6.1.4.1.2021.4.3.0 -w '$ARG2$': -c '$ARG3$':
+       }
+
+
+# 'snmp_procs' command definition
+define command{
+       command_name    snmp_procs
+       command_line    /usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' -C '$ARG1$' -o host.hrSystem.hrSystemProcesses -w :'$ARG2$' -c :'$ARG3$' -l processes
+       }
+
+
+# 'snmp_users' command definition
+define command{
+       command_name    snmp_users
+       command_line    /usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' -C '$ARG1$' -o host.hrSystem.hrSystemNumUsers -w :'$ARG2$' -c :'$ARG3$' -l users
+       }
+
+
+# 'snmp_mem2' command definition
+define command{
+       command_name    snmp_mem2
+       command_line    /usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' -C '$ARG1$' -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.'$ARG2$',host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.'$ARG2$' -w '$ARG3$' -c '$ARG4$'
+       }
+
+
+# 'snmp_swap2' command definition
+define command{
+       command_name    snmp_swap2
+       command_line    /usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' -C '$ARG1$' -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.'$ARG2$',host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.'$ARG2$' -w '$ARG3$' -c '$ARG4$'
+       }
+
+
+# 'snmp_mem3' command definition
+define command{
+       command_name    snmp_mem3
+       command_line    /usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' -C '$ARG1$' -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.'$ARG2$',host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.'$ARG2$' -w '$ARG3$' -c '$ARG4$'
+       }
+
+
+# 'snmp_swap3' command definition
+define command{
+       command_name    snmp_swap3
+       command_line    /usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' -C '$ARG1$' -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.'$ARG2$',host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.'$ARG2$' -w '$ARG3$' -c '$ARG4$'
+       }
+
+
+# 'snmp_disk2' command definition
+define command{
+       command_name    snmp_disk2
+       command_line    /usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' -C '$ARG1$' -o host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.'$ARG2$' -w '$ARG3$' -c '$ARG4$'
+       }
+
+
+# 'snmp_tcpopen' command definition
+define command{
+       command_name    snmp_tcpopen
+       command_line    /usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' -C '$ARG1$' -o tcp.tcpCurrEstab.0 -w '$ARG2$' -c '$ARG3$'
+       }
+
+
+# 'snmp_tcpstats' command definition
+define command{
+       command_name    snmp_tcpstats
+       command_line    /usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' -C '$ARG1$' -o tcp.tcpActiveOpens.0,tcp.tcpPassiveOpens.0,tcp.tcpInSegs.0,tcp.tcpOutSegs.0,tcp.tcpRetransSegs.0 -l 'TCP stats'
+       }
+
+
+# 'check_netapp_uptime' command definition
+define command{
+       command_name    check_netapp_uptime
+       command_line    /usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' -C '$ARG1$' -o .1.3.6.1.2.1.1.3.0 --delimiter=')' -l "Uptime is"
+       }
+
+
+# 'check_netapp_cpuload' command definition
+define command{
+       command_name    check_netapp_cpuload
+       command_line    /usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' -C '$ARG1$' -o .1.3.6.1.4.1.789.1.2.1.3.0 -w 90 -c 95 -u '%' -l "CPU LOAD "
+       }
+
+
+# 'check_netapp_numdisks' command definition
+define command{
+       command_name    check_netapp_numdisks
+       command_line    /usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' -C '$ARG1$' -o .1.3.6.1.4.1.789.1.6.4.1.0,.1.3.6.1.4.1.789.1.6.4.2.0,.1.3.6.1.4.1.789.1.6.4.8.0,.1.3.6.1.4.1.789.1.6.4.7.0 -u 'Total Disks','Active','Spare','Failed' -l ""
+       }
+
+
+# 'check_compaq_thermalCondition' command definition
+define command{
+       command_name    check_compaq_thermalCondition
+       command_line     /usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' -C '$ARG1$' -o .1.3.6.1.4.1.232.6.2.1.0,.1.3.6.1.4.1.232.6.2.2.0,.1.3.6.1.4.1.232.6.2.3.0,.1.3.6.1.4.1.232.6.2.4.0 -u 'ThermalCondition','ThermalTemp','ThermalSystem','ThermalCPUFan' -w 2:2,2:2,2:2,2:2 -c 1:2,1:2,1:2,1:2 -l "Thermal status "
+       }
+
diff --git a/nagios-plugins/config/ssh.cfg b/nagios-plugins/config/ssh.cfg
new file mode 100644 (file)
index 0000000..29a6d17
--- /dev/null
@@ -0,0 +1,27 @@
+# 'check_ssh' command definition
+define command{
+       command_name    check_ssh
+       command_line    /usr/lib/nagios/plugins/check_ssh '$HOSTADDRESS$'
+       }
+
+# 'check_ssh_port' command definition
+define command{
+       command_name    check_ssh_port
+       command_line    /usr/lib/nagios/plugins/check_ssh -p '$ARG1$' '$HOSTADDRESS$'
+       }
+
+####
+# use these checks, if you want to test IPv4 connectivity on IPv6 enabled systems
+####
+
+# 'check_ssh_4' command definition
+define command{
+        command_name    check_ssh_4
+        command_line    /usr/lib/nagios/plugins/check_ssh -4 '$HOSTADDRESS$'
+        }
+
+# 'check_ssh_port_4' command definition
+define command{
+       command_name    check_ssh_port_4
+       command_line    /usr/lib/nagios/plugins/check_ssh -4 -p '$ARG1$' '$HOSTADDRESS$'
+       }
diff --git a/nagios-plugins/config/tcp_udp.cfg b/nagios-plugins/config/tcp_udp.cfg
new file mode 100644 (file)
index 0000000..140e84c
--- /dev/null
@@ -0,0 +1,27 @@
+# 'check_tcp' command definition
+define command{
+       command_name    check_tcp
+       command_line    /usr/lib/nagios/plugins/check_tcp -H '$HOSTADDRESS$' -p '$ARG1$' '$ARG2$'
+       }
+
+# 'check_udp' command definition
+define command{
+       command_name    check_udp
+       command_line    /usr/lib/nagios/plugins/check_udp -H '$HOSTADDRESS$' -p '$ARG1$' '$ARG2$'
+       }
+
+####
+# use these checks, if you want to test IPv4 connectivity on IPv6 enabled systems
+####
+
+# 'check_tcp_4' command definition
+define command{
+        command_name    check_tcp_4
+        command_line    /usr/lib/nagios/plugins/check_tcp -H '$HOSTADDRESS$' -p '$ARG1$' -4 '$ARG2$'
+        }
+
+# 'check_udp_4' command definition
+define command{
+        command_name    check_udp_4
+        command_line    /usr/lib/nagios/plugins/check_udp -H '$HOSTADDRESS$' -p '$ARG1$' -4 '$ARG2$'
+        }
diff --git a/nagios-plugins/config/telnet.cfg b/nagios-plugins/config/telnet.cfg
new file mode 100644 (file)
index 0000000..a87f842
--- /dev/null
@@ -0,0 +1,15 @@
+# 'check_telnet' command definition
+define command{
+       command_name    check_telnet
+       command_line    /usr/lib/nagios/plugins/check_tcp -H '$HOSTADDRESS$' -p 23 '$ARG1$'
+       }
+
+####
+# use these checks, if you want to test IPv4 connectivity on IPv6 enabled systems
+####
+
+# 'check_telnet_4' command definition
+define command{
+        command_name    check_telnet_4
+        command_line    /usr/lib/nagios/plugins/check_tcp -H '$HOSTADDRESS$' -p 23 -4 '$ARG1$'
+        }
diff --git a/nagios-plugins/config/users.cfg b/nagios-plugins/config/users.cfg
new file mode 100644 (file)
index 0000000..614a622
--- /dev/null
@@ -0,0 +1,6 @@
+# 'check_users' command definition
+define command{
+       command_name    check_users
+       command_line    /usr/lib/nagios/plugins/check_users -w '$ARG1$' -c '$ARG2$'
+       }
+
diff --git a/passwd b/passwd
index 23f3e1c9ebd2d14b3bbf1585d8c790c5c9fd8305..41a5cbf7d026ae228e80f311ea929cadf0596d52 100644 (file)
--- a/passwd
+++ b/passwd
@@ -32,3 +32,4 @@ gitdeploy:x:3334:100:Git deploy user:/home/gitdeploy:/bin/sh
 messagebus:x:109:117::/var/run/dbus:/bin/false
 _apt:x:110:65534::/nonexistent:/bin/false
 _chrony:x:111:118:Chrony daemon,,,:/var/lib/chrony:/bin/false
+nagios:x:112:119::/var/lib/nagios:/bin/false
diff --git a/passwd- b/passwd-
index 79a83bc153c4a16affceaddabb1896c424cf4d79..23f3e1c9ebd2d14b3bbf1585d8c790c5c9fd8305 100644 (file)
--- a/passwd-
+++ b/passwd-
@@ -31,4 +31,4 @@ openldap:x:108:116:OpenLDAP Server Account,,,:/var/lib/ldap:/bin/false
 gitdeploy:x:3334:100:Git deploy user:/home/gitdeploy:/bin/sh
 messagebus:x:109:117::/var/run/dbus:/bin/false
 _apt:x:110:65534::/nonexistent:/bin/false
-_chrony:x:111:118::/var/lib/chrony:/bin/false
+_chrony:x:111:118:Chrony daemon,,,:/var/lib/chrony:/bin/false
diff --git a/rc0.d/K01icinga2 b/rc0.d/K01icinga2
new file mode 120000 (symlink)
index 0000000..005f4ff
--- /dev/null
@@ -0,0 +1 @@
+../init.d/icinga2
\ No newline at end of file
diff --git a/rc1.d/K01icinga2 b/rc1.d/K01icinga2
new file mode 120000 (symlink)
index 0000000..005f4ff
--- /dev/null
@@ -0,0 +1 @@
+../init.d/icinga2
\ No newline at end of file
diff --git a/rc2.d/S03icinga2 b/rc2.d/S03icinga2
new file mode 120000 (symlink)
index 0000000..005f4ff
--- /dev/null
@@ -0,0 +1 @@
+../init.d/icinga2
\ No newline at end of file
diff --git a/rc3.d/S03icinga2 b/rc3.d/S03icinga2
new file mode 120000 (symlink)
index 0000000..005f4ff
--- /dev/null
@@ -0,0 +1 @@
+../init.d/icinga2
\ No newline at end of file
diff --git a/rc4.d/S03icinga2 b/rc4.d/S03icinga2
new file mode 120000 (symlink)
index 0000000..005f4ff
--- /dev/null
@@ -0,0 +1 @@
+../init.d/icinga2
\ No newline at end of file
diff --git a/rc5.d/S03icinga2 b/rc5.d/S03icinga2
new file mode 120000 (symlink)
index 0000000..005f4ff
--- /dev/null
@@ -0,0 +1 @@
+../init.d/icinga2
\ No newline at end of file
diff --git a/rc6.d/K01icinga2 b/rc6.d/K01icinga2
new file mode 120000 (symlink)
index 0000000..005f4ff
--- /dev/null
@@ -0,0 +1 @@
+../init.d/icinga2
\ No newline at end of file
diff --git a/shadow b/shadow
index ee89a431061f1c65ae3ef10353ae0e2119e07ce6..fa4d4fa09c0ed9fefaa3d5d4ef29ae805b8a0dd8 100644 (file)
--- a/shadow
+++ b/shadow
@@ -32,3 +32,4 @@ gitdeploy:!:16932:0:99999:7:::
 messagebus:*:17329:0:99999:7:::
 _apt:*:17365:0:99999:7:::
 _chrony:*:17365:0:99999:7:::
+nagios:!:17449:0:99999:7:::
diff --git a/shadow- b/shadow-
index ee89a431061f1c65ae3ef10353ae0e2119e07ce6..fa4d4fa09c0ed9fefaa3d5d4ef29ae805b8a0dd8 100644 (file)
--- a/shadow-
+++ b/shadow-
@@ -32,3 +32,4 @@ gitdeploy:!:16932:0:99999:7:::
 messagebus:*:17329:0:99999:7:::
 _apt:*:17365:0:99999:7:::
 _chrony:*:17365:0:99999:7:::
+nagios:!:17449:0:99999:7:::
diff --git a/systemd/system/multi-user.target.wants/icinga2.service b/systemd/system/multi-user.target.wants/icinga2.service
new file mode 120000 (symlink)
index 0000000..563c749
--- /dev/null
@@ -0,0 +1 @@
+/lib/systemd/system/icinga2.service
\ No newline at end of file