Initial Commit of the Switches config from 2019 and the Monitoring config from 2019
This commit is contained in:
parent
1e2a5b582a
commit
4dd8dd9403
|
@ -0,0 +1 @@
|
|||
features-available
|
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* The ApiUser objects are used for authentication against the API.
|
||||
*/
|
||||
object ApiUser "root" {
|
||||
password = "pass"
|
||||
// client_cn = ""
|
||||
|
||||
permissions = [ "*" ]
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
object IcingaApplication "app" { }
|
|
@ -0,0 +1,7 @@
|
|||
apply Service "apt" {
|
||||
import "generic-service"
|
||||
|
||||
check_command = "apt"
|
||||
|
||||
assign where host.name == NodeName
|
||||
}
|
|
@ -0,0 +1,124 @@
|
|||
object CheckCommand "check_net_int" {
|
||||
import "by_ssh"
|
||||
vars.by_ssh_timeout = "420"
|
||||
timeout = "420"
|
||||
vars.by_ssh_command = PluginDir + "/check_interface_load.sh -w $int_warn$ -c $int_crit$"
|
||||
vars.by_ssh_options = [
|
||||
"StrictHostKeyChecking=no",
|
||||
"ControlMaster=auto",
|
||||
"ControlPath=/var/run/icinga2/$host.name$",
|
||||
"ControlPersist=20m"
|
||||
]
|
||||
vars.int_warn=""
|
||||
vars.int_crit=""
|
||||
}
|
||||
|
||||
object CheckCommand "check_open_ports" {
|
||||
import "by_ssh"
|
||||
vars.by_ssh_timeout = "420"
|
||||
timeout = "420"
|
||||
vars.by_ssh_command = PluginDir + "/check_network_ports.sh -p \"$ports$\" -H $host$"
|
||||
vars.by_ssh_options = [
|
||||
"StrictHostKeyChecking=no",
|
||||
"ControlMaster=auto",
|
||||
"ControlPath=/var/run/icinga2/$host.name$",
|
||||
"ControlPersist=20m"
|
||||
]
|
||||
vars.ports=""
|
||||
vars.host=""
|
||||
}
|
||||
|
||||
object CheckCommand "check_sensors" {
|
||||
import "plugin-check-command"
|
||||
command = PluginDir + "/check_sensors_vin"
|
||||
}
|
||||
|
||||
object CheckCommand "check_unbound" {
|
||||
import "plugin-check-command"
|
||||
command = PluginDir + "/check_unbound-ng.sh"
|
||||
}
|
||||
########################################################################################
|
||||
# OpenWRT APs
|
||||
########################################################################################
|
||||
object CheckCommand "check_bandwidth" {
|
||||
import "by_ssh"
|
||||
vars.by_ssh_command = PluginDir + "/check_bandwidth.sh -i $interface$ -w $int_warn$ -c $int_crit$"
|
||||
vars.by_ssh_timeout = "420"
|
||||
timeout = "420"
|
||||
vars.by_ssh_options = [
|
||||
"StrictHostKeyChecking=no",
|
||||
"ControlMaster=auto",
|
||||
"ControlPath=/var/run/icinga2/$host.name$",
|
||||
"ControlPersist=20m"
|
||||
]
|
||||
vars.int_warn="50000"
|
||||
vars.int_crit="100000"
|
||||
}
|
||||
|
||||
#######################################################################################
|
||||
# VOC switches
|
||||
#######################################################################################
|
||||
object CheckCommand "check_operstatus" {
|
||||
import "plugin-check-command"
|
||||
command = PluginDir + "/check_snmp -H $host$ -C openfest --oid $OID$ --miblist=IF-MIB -r $value$"
|
||||
vars.host=""
|
||||
vars.OID=""
|
||||
vars.value=""
|
||||
timeout = "120"
|
||||
}
|
||||
|
||||
object CheckCommand "check_operstatus_regex" {
|
||||
import "plugin-check-command"
|
||||
command = PluginDir + "/check_snmp -H $host$ -C openfest --oid $OID$ -r $value$"
|
||||
vars.host=""
|
||||
vars.OID=""
|
||||
vars.value=""
|
||||
timeout = "120"
|
||||
}
|
||||
|
||||
object CheckCommand "cisco-poe-check" {
|
||||
import "plugin-check-command"
|
||||
command = SysconfDir + "/icinga2/scripts/check_snmp_cisco_poe.pl -H $host.address$ -C openfest -w $host.vars.poe_watts_warning$ -c $host.vars.poe_watts_critical$"
|
||||
timeout = "10"
|
||||
}
|
||||
|
||||
object CheckCommand "nwc_check" {
|
||||
import "plugin-check-command"
|
||||
command = SysconfDir + "/icinga2/scripts/check_nwc_health --hostname $host.address# --community openfest --mode $mode$"
|
||||
vars.mode = ""
|
||||
}
|
||||
|
||||
object CheckCommand "rtmp-check" {
|
||||
import "plugin-check-command"
|
||||
command = SysconfDir + "/icinga2/scripts/check_rtmp.sh -t $timeout$ -u $monitoreduri$"
|
||||
vars.monitoreduri = ""
|
||||
vars.timeout = 10
|
||||
}
|
||||
|
||||
object CheckCommand "check-audio-stream" {
|
||||
import "plugin-check-command"
|
||||
command = PluginDir + "/check_http -N -H openfest.org -p 8000 -E -u $monitoredpath$"
|
||||
vars.monitoredpath = ""
|
||||
}
|
||||
|
||||
########################################################################################
|
||||
# Router services
|
||||
########################################################################################
|
||||
object CheckCommand "bgp_sessions_check" {
|
||||
import "plugin-check-command"
|
||||
command = PluginDir + "/check_bird_bgp --asn $ASN$ --ebgp --sessions_down_ok $sessions_down$"
|
||||
vars.ASN = ""
|
||||
vars.sessions_down = ""
|
||||
}
|
||||
|
||||
#######################################################################################
|
||||
# UPS checks
|
||||
#######################################################################################
|
||||
object CheckCommand "check_ups" {
|
||||
import "plugin-check-command"
|
||||
command = PluginDir + "/check_snmp -H $host$ -P 1 -C openfest --oid $OID$ --miblist=UPS-MIB -r $value$"
|
||||
vars.host=""
|
||||
vars.OID=""
|
||||
vars.value=""
|
||||
timeout = "120"
|
||||
}
|
|
@ -0,0 +1,187 @@
|
|||
/* Command objects */
|
||||
|
||||
/* Notification Commands
|
||||
*
|
||||
* Please check the documentation for all required and
|
||||
* optional parameters.
|
||||
*/
|
||||
|
||||
object NotificationCommand "mail-host-notification" {
|
||||
command = [ ConfigDir + "/scripts/mail-host-notification.sh" ]
|
||||
|
||||
arguments += {
|
||||
"-4" = "$notification_address$"
|
||||
"-6" = "$notification_address6$"
|
||||
"-b" = "$notification_author$"
|
||||
"-c" = "$notification_comment$"
|
||||
"-d" = {
|
||||
required = true
|
||||
value = "$notification_date$"
|
||||
}
|
||||
"-f" = {
|
||||
value = "$notification_from$"
|
||||
description = "Set from address. Requires GNU mailutils (Debian/Ubuntu) or mailx (RHEL/SUSE)"
|
||||
}
|
||||
"-i" = "$notification_icingaweb2url$"
|
||||
"-l" = {
|
||||
required = true
|
||||
value = "$notification_hostname$"
|
||||
}
|
||||
"-n" = {
|
||||
required = true
|
||||
value = "$notification_hostdisplayname$"
|
||||
}
|
||||
"-o" = {
|
||||
required = true
|
||||
value = "$notification_hostoutput$"
|
||||
}
|
||||
"-r" = {
|
||||
required = true
|
||||
value = "$notification_useremail$"
|
||||
}
|
||||
"-s" = {
|
||||
required = true
|
||||
value = "$notification_hoststate$"
|
||||
}
|
||||
"-t" = {
|
||||
required = true
|
||||
value = "$notification_type$"
|
||||
}
|
||||
"-v" = "$notification_logtosyslog$"
|
||||
}
|
||||
|
||||
vars += {
|
||||
notification_address = "$address$"
|
||||
notification_address6 = "$address6$"
|
||||
notification_author = "$notification.author$"
|
||||
notification_comment = "$notification.comment$"
|
||||
notification_type = "$notification.type$"
|
||||
notification_date = "$icinga.long_date_time$"
|
||||
notification_hostname = "$host.name$"
|
||||
notification_hostdisplayname = "$host.display_name$"
|
||||
notification_hostoutput = "$host.output$"
|
||||
notification_hoststate = "$host.state$"
|
||||
notification_useremail = "$user.email$"
|
||||
}
|
||||
}
|
||||
|
||||
object NotificationCommand "mail-service-notification" {
|
||||
command = [ ConfigDir + "/scripts/mail-service-notification.sh" ]
|
||||
|
||||
arguments += {
|
||||
"-4" = "$notification_address$"
|
||||
"-6" = "$notification_address6$"
|
||||
"-b" = "$notification_author$"
|
||||
"-c" = "$notification_comment$"
|
||||
"-d" = {
|
||||
required = true
|
||||
value = "$notification_date$"
|
||||
}
|
||||
"-e" = {
|
||||
required = true
|
||||
value = "$notification_servicename$"
|
||||
}
|
||||
"-f" = {
|
||||
value = "$notification_from$"
|
||||
description = "Set from address. Requires GNU mailutils (Debian/Ubuntu) or mailx (RHEL/SUSE)"
|
||||
}
|
||||
"-i" = "$notification_icingaweb2url$"
|
||||
"-l" = {
|
||||
required = true
|
||||
value = "$notification_hostname$"
|
||||
}
|
||||
"-n" = {
|
||||
required = true
|
||||
value = "$notification_hostdisplayname$"
|
||||
}
|
||||
"-o" = {
|
||||
required = true
|
||||
value = "$notification_serviceoutput$"
|
||||
}
|
||||
"-r" = {
|
||||
required = true
|
||||
value = "$notification_useremail$"
|
||||
}
|
||||
"-s" = {
|
||||
required = true
|
||||
value = "$notification_servicestate$"
|
||||
}
|
||||
"-t" = {
|
||||
required = true
|
||||
value = "$notification_type$"
|
||||
}
|
||||
"-u" = {
|
||||
required = true
|
||||
value = "$notification_servicedisplayname$"
|
||||
}
|
||||
"-v" = "$notification_logtosyslog$"
|
||||
}
|
||||
|
||||
vars += {
|
||||
notification_address = "$address$"
|
||||
notification_address6 = "$address6$"
|
||||
notification_author = "$notification.author$"
|
||||
notification_comment = "$notification.comment$"
|
||||
notification_type = "$notification.type$"
|
||||
notification_date = "$icinga.long_date_time$"
|
||||
notification_hostname = "$host.name$"
|
||||
notification_hostdisplayname = "$host.display_name$"
|
||||
notification_servicename = "$service.name$"
|
||||
notification_serviceoutput = "$service.output$"
|
||||
notification_servicestate = "$service.state$"
|
||||
notification_useremail = "$user.email$"
|
||||
notification_servicedisplayname = "$service.display_name$"
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If you prefer to use the notification scripts with environment
|
||||
* variables instead of command line parameters, you can use
|
||||
* the following commands. They have been updated from < 2.7
|
||||
* to support the new notification scripts and should help
|
||||
* with an upgrade.
|
||||
* Remove the comment blocks and comment the notification commands above.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
object NotificationCommand "mail-host-notification" {
|
||||
command = [ ConfigDir + "/scripts/mail-host-notification.sh" ]
|
||||
|
||||
env = {
|
||||
NOTIFICATIONTYPE = "$notification.type$"
|
||||
HOSTDISPLAYNAME = "$host.display_name$"
|
||||
HOSTNAME = "$host.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 = [ ConfigDir + "/scripts/mail-service-notification.sh" ]
|
||||
|
||||
env = {
|
||||
NOTIFICATIONTYPE = "$notification.type$"
|
||||
SERVICENAME = "$service.name$"
|
||||
HOSTNAME = "$host.name$"
|
||||
HOSTDISPLAYNAME = "$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$"
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
apply Dependency "disable-host-service-checks" to Service {
|
||||
disable_checks = true
|
||||
assign where true
|
||||
}
|
||||
|
||||
apply Dependency "host-depends-on-host" to Host {
|
||||
parent_host_name = host.vars.parent
|
||||
disable_checks = true
|
||||
disable_notifications = true
|
||||
|
||||
assign where host.vars.parent
|
||||
}
|
|
@ -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 != ""
|
||||
}
|
|
@ -0,0 +1,95 @@
|
|||
/**
|
||||
* Host group examples.
|
||||
*/
|
||||
|
||||
object HostGroup "linux-servers" {
|
||||
display_name = "Linux Servers"
|
||||
|
||||
assign where host.vars.os == "Linux"
|
||||
}
|
||||
|
||||
/**
|
||||
* 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)
|
||||
}
|
||||
|
||||
object ServiceGroup "openwrt" {
|
||||
display_name = "openwrt APs"
|
||||
|
||||
assign where "openwrt" in host.vars.groups
|
||||
}
|
||||
|
||||
object ServiceGroup "vocsw" {
|
||||
display_name = "Video Team switches"
|
||||
|
||||
assign where "vocsw" in host.vars.groups
|
||||
}
|
||||
|
||||
object ServiceGroup "ciscosw" {
|
||||
display_name = "CISCO Switches"
|
||||
|
||||
assign where "ciscosw" in host.vars.groups
|
||||
}
|
||||
|
||||
object HostGroup "vocsw" {
|
||||
display_name = "Video Team switches"
|
||||
|
||||
assign where "vocsw" in host.vars.groups
|
||||
}
|
||||
|
||||
object HostGroup "ciscosw" {
|
||||
display_name = "CISCO Switches"
|
||||
|
||||
assign where "ciscosw" in host.vars.groups
|
||||
}
|
||||
|
||||
object HostGroup "misc" {
|
||||
display_name = "Misc devices"
|
||||
assign where "misc" in host.vars.groups
|
||||
}
|
||||
|
||||
object HostGroup "overflow" {
|
||||
display_name = "Overflow RPIs"
|
||||
assign where "overflow" in host.vars.groups
|
||||
}
|
||||
|
||||
object HostGroup "equipment" {
|
||||
display_name = "Video team equipment"
|
||||
assign where "equipment" in host.vars.groups
|
||||
}
|
||||
object HostGroup "phones" {
|
||||
display_name = "Telephones"
|
||||
assign where "phone" in host.vars.groups
|
||||
}
|
||||
|
||||
object HostGroup "wifi" {
|
||||
display_name = "Access points"
|
||||
assign where "openwrt" in host.vars.groups
|
||||
}
|
||||
|
||||
object HostGroup "ups" {
|
||||
display_name = "UPS-es"
|
||||
assign where "ups" in host.vars.groups
|
||||
}
|
||||
|
||||
object HostGroup "routers" {
|
||||
display_name = "Routers"
|
||||
assign where "routers" in host.vars.groups
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
* 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 variable `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" ]
|
||||
}
|
||||
|
||||
vars.notification["slack"] = {
|
||||
groups = [ "icingaadmins"]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
object Host "dell-ups.openfest.org" {
|
||||
import "generic-host"
|
||||
|
||||
address = "dell-ups"
|
||||
vars.groups = [ "ups" ]
|
||||
|
||||
vars.ups[ "Battery Status" ] = {
|
||||
OID = "1.3.6.1.2.1.33.1.2.1.0"
|
||||
value = 2
|
||||
}
|
||||
vars.ups[ "Seconds on Battery" ] = {
|
||||
OID = "1.3.6.1.2.1.33.1.2.2.0"
|
||||
value = 0
|
||||
}
|
||||
vars.ups[ "Estimated Min Remaining" ] = {
|
||||
OID = "1.3.6.1.2.1.33.1.2.3.0"
|
||||
}
|
||||
vars.ups[ "Estimated Charge Remaining" ] = {
|
||||
OID = "1.3.6.1.2.1.33.1.2.4.0"
|
||||
}
|
||||
vars.ups[ "Temperature" ] = {
|
||||
OID = "1.3.6.1.2.1.33.1.2.7.0"
|
||||
}
|
||||
|
||||
vars.notification["slack"] = {
|
||||
groups = [ "icingaadmins" ]
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
object Host "voc-control-A-1" {
|
||||
import "generic-host"
|
||||
|
||||
# main room laptop/controller [1/2]
|
||||
address = "control-A-1"
|
||||
vars.groups = [ "equipment" ]
|
||||
|
||||
vars.parent = "vocsw-A.openfest.org"
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
object Host "voc-control-A-2" {
|
||||
import "generic-host"
|
||||
|
||||
# main room laptop/controller [2/2]
|
||||
address = "control-A-2"
|
||||
vars.groups = [ "equipment" ]
|
||||
|
||||
vars.parent = "vocsw-A.openfest.org"
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
object Host "voc-control-B-1" {
|
||||
import "generic-host"
|
||||
|
||||
# second room laptop/controller [1/2]
|
||||
address = "control-B-1"
|
||||
vars.groups = [ "equipment" ]
|
||||
|
||||
vars.parent = "vocsw-B.openfest.org"
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
object Host "voc-control-B-2" {
|
||||
import "generic-host"
|
||||
|
||||
# second room laptop/controller [2/2]
|
||||
address = "control-B-2"
|
||||
vars.groups = [ "equipment" ]
|
||||
|
||||
vars.parent = "vocsw-B.openfest.org"
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
object Host "voc-fbox-camera-B" {
|
||||
import "generic-host"
|
||||
|
||||
# FOSDEM cambox in room B
|
||||
address = "fbox-camera-B"
|
||||
vars.groups = [ "equipment" ]
|
||||
|
||||
vars.parent = "coresw.openfest.org"
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
object Host "voc-fbox-camera-C" {
|
||||
import "generic-host"
|
||||
|
||||
# FOSDEM cambox in room C
|
||||
address = "fbox-camera-C"
|
||||
vars.groups = [ "equipment" ]
|
||||
|
||||
vars.parent = "coresw.openfest.org"
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
object Host "voc-fbox-slides-B" {
|
||||
import "generic-host"
|
||||
|
||||
# FOSDEM slidebox in room B
|
||||
address = "fbox-slides-B"
|
||||
vars.groups = [ "equipment" ]
|
||||
|
||||
vars.parent = "coresw.openfest.org"
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
object Host "voc-fbox-slides-C" {
|
||||
import "generic-host"
|
||||
|
||||
# FOSDEM slidebox in room C
|
||||
address = "fbox-slides-C"
|
||||
vars.groups = [ "equipment" ]
|
||||
|
||||
vars.parent = "coresw.openfest.org"
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
object Host "voc-icom-A-1" {
|
||||
import "generic-host"
|
||||
|
||||
# RPI intercom receiver 1 - main room [1/3]
|
||||
address = "icom-A-1"
|
||||
vars.groups = [ "equipment" ]
|
||||
|
||||
vars.parent = "vocsw-A.openfest.org"
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
object Host "voc-icom-A-2" {
|
||||
import "generic-host"
|
||||
|
||||
# RPI intercom receiver 2 - main room [2/3]
|
||||
address = "icom-A-2"
|
||||
vars.groups = [ "equipment" ]
|
||||
|
||||
vars.parent = "vocsw-A.openfest.org"
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
object Host "voc-icom-A-3" {
|
||||
import "generic-host"
|
||||
|
||||
# RPI intercom receiver 3 - main room [3/3]
|
||||
address = "icom-A-3"
|
||||
vars.groups = [ "equipment" ]
|
||||
|
||||
vars.parent = "vocsw-A.openfest.org"
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
object Host "voc-icom-B-1" {
|
||||
import "generic-host"
|
||||
|
||||
# RPI intercom receiver 1 - second room [1/3]
|
||||
address = "icom-B-1"
|
||||
vars.groups = [ "equipment" ]
|
||||
|
||||
vars.parent = "vocsw-B.openfest.org"
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
object Host "voc-icom-B-2" {
|
||||
import "generic-host"
|
||||
|
||||
# RPI intercom receiver 2 - second room [2/3]
|
||||
address = "icom-B-2"
|
||||
vars.groups = [ "equipment" ]
|
||||
|
||||
vars.parent = "vocsw-B.openfest.org"
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
object Host "voc-icom-B-3" {
|
||||
import "generic-host"
|
||||
|
||||
# RPI intercom receiver 3 - second room [3/3]
|
||||
address = "icom-B-3"
|
||||
vars.groups = [ "equipment" ]
|
||||
|
||||
vars.parent = "vocsw-B.openfest.org"
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
object Host "voc-scaler-A" {
|
||||
import "generic-host"
|
||||
|
||||
# Atlona scaler in room A
|
||||
address = "scaler-A"
|
||||
vars.groups = [ "equipment" ]
|
||||
|
||||
vars.parent = "vocsw-A.openfest.org"
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
object Host "voc-stream-A" {
|
||||
import "generic-host"
|
||||
|
||||
# main room streamer
|
||||
address = "stream-A"
|
||||
vars.groups = [ "equipment" ]
|
||||
|
||||
vars.parent = "vocsw-A.openfest.org"
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
object Host "voc-stream-B" {
|
||||
import "generic-host"
|
||||
|
||||
# second room streamer
|
||||
address = "stream-B"
|
||||
vars.groups = [ "equipment" ]
|
||||
|
||||
vars.parent = "vocsw-B.openfest.org"
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
object Host "voc-stream-C" {
|
||||
import "generic-host"
|
||||
|
||||
# third room streamer
|
||||
address = "stream-C"
|
||||
vars.groups = [ "equipment" ]
|
||||
|
||||
vars.parent = "vocsw-C.openfest.org"
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
object Host "voc-videoswitcher-A" {
|
||||
import "generic-host"
|
||||
|
||||
# Atlona scaler in room A
|
||||
address = "videoswitcher-A"
|
||||
vars.groups = [ "equipment" ]
|
||||
|
||||
vars.parent = "vocsw-A.openfest.org"
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
object Host "printer-1" {
|
||||
import "generic-host"
|
||||
|
||||
# reception printer
|
||||
address = "printer-1"
|
||||
vars.groups = [ "misc" ]
|
||||
|
||||
vars.parent = "receptionsw.openfest.org"
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
object Host "printer-1" {
|
||||
import "generic-host"
|
||||
|
||||
# reception printer
|
||||
address = "printer-1"
|
||||
vars.groups = [ "misc" ]
|
||||
|
||||
vars.parent = "receptionsw.openfest.org"
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
object Host "rpi-tv-1" {
|
||||
import "generic-host"
|
||||
|
||||
# Overflow TV-1
|
||||
address = "tv-1"
|
||||
vars.groups = [ "overflow" ]
|
||||
|
||||
vars.parent = "teamsw.openfest.org"
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
object Host "rpi-tv-2" {
|
||||
import "generic-host"
|
||||
|
||||
# Overflow TV-2
|
||||
address = "tv-2"
|
||||
vars.groups = [ "overflow" ]
|
||||
|
||||
vars.parent = "teamsw.openfest.org"
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
object Host "phone-A" {
|
||||
import "generic-host"
|
||||
|
||||
address = "phone-A"
|
||||
vars.groups = [ "phone" ]
|
||||
|
||||
vars.parent = "vocsw-A.openfest.org"
|
||||
|
||||
# check_command = "xxx_health"
|
||||
# vars.extra_port_check = ""
|
||||
# vars.specification = "vocsw"
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
object Host "phone-B" {
|
||||
import "generic-host"
|
||||
|
||||
address = "phone-B"
|
||||
vars.groups = [ "phone" ]
|
||||
|
||||
vars.parent = "vocsw-B.openfest.org"
|
||||
|
||||
# check_command = "xxx_health"
|
||||
# vars.extra_port_check = ""
|
||||
# vars.specification = "vocsw"
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
object Host "phone-C" {
|
||||
import "generic-host"
|
||||
|
||||
address = "phone-C"
|
||||
vars.groups = [ "phone" ]
|
||||
|
||||
vars.parent = "vocsw-C.openfest.org"
|
||||
|
||||
# check_command = "xxx_health"
|
||||
# vars.extra_port_check = ""
|
||||
# vars.specification = "vocsw"
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
object Host "phone-D" {
|
||||
import "generic-host"
|
||||
|
||||
address = "phone-D"
|
||||
vars.groups = [ "phone" ]
|
||||
|
||||
vars.parent = "vocsw-D.openfest.org"
|
||||
|
||||
# check_command = "xxx_health"
|
||||
# vars.extra_port_check = ""
|
||||
# vars.specification = "vocsw"
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
object Host "phone-noc-1" {
|
||||
import "generic-host"
|
||||
|
||||
address = "phone-noc-1"
|
||||
vars.groups = [ "phone" ]
|
||||
|
||||
vars.parent = "nocsw.openfest.org"
|
||||
|
||||
# check_command = "xxx_health"
|
||||
# vars.extra_port_check = ""
|
||||
# vars.specification = "vocsw"
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
object Host "phone-noc-2" {
|
||||
import "generic-host"
|
||||
|
||||
address = "phone-noc-2"
|
||||
vars.groups = [ "phone" ]
|
||||
|
||||
vars.parent = "nocsw.openfest.org"
|
||||
|
||||
# check_command = "xxx_health"
|
||||
# vars.extra_port_check = ""
|
||||
# vars.specification = "vocsw"
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
object Host "phone-reception" {
|
||||
import "generic-host"
|
||||
|
||||
address = "phone-reception"
|
||||
vars.groups = [ "phone" ]
|
||||
|
||||
vars.parent = "receptionsw.openfest.org"
|
||||
|
||||
# check_command = "xxx_health"
|
||||
# vars.extra_port_check = ""
|
||||
# vars.specification = "vocsw"
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
object Host "phone-team" {
|
||||
import "generic-host"
|
||||
|
||||
address = "phone-team"
|
||||
vars.groups = [ "phone" ]
|
||||
|
||||
vars.parent = "teamsw.openfest.org"
|
||||
|
||||
# check_command = "xxx_health"
|
||||
# vars.extra_port_check = ""
|
||||
# vars.specification = "vocsw"
|
||||
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
object Host "vin-external.openfest.org" {
|
||||
import "generic-host"
|
||||
|
||||
address = "185.117.82.237"
|
||||
# check_command = "xxx_health"
|
||||
# vars.extra_port_check = ""
|
||||
vars.by_ssh_port = "22"
|
||||
vars.by_ssh_logname = "nagios"
|
||||
vars.by_ssh_identity = "/var/lib/nagios/.ssh/id_rsa"
|
||||
vars.groups = [ "routers" ]
|
||||
|
||||
vars.net_interfaces = [ "bond0", "bond0.20", "bond0.21", "bond0.22", "bond0.23", "bond0.24", "bond0.25", "bond0.26", "bond0.4001", "eno1", "enp1s0f4", "enp1s0f4d1" ]
|
||||
|
||||
vars.open_ports = "80 179 2004 53 22 7002 8443 443"
|
||||
|
||||
vars.ASN = "65500"
|
||||
vars.sessions_down = "hawk_pri marla_pri marla_tp_v spitfire_pri"
|
||||
|
||||
vars.notification["slack"] = {
|
||||
groups = [ "icingaadmins" ]
|
||||
}
|
||||
|
||||
vars.rtmp_check[ "hall-a" ] = {
|
||||
monitoreduri = "rtmp://127.0.0.1/st/hall-a"
|
||||
timeout =15
|
||||
}
|
||||
vars.rtmp_check[ "hall-b" ] = {
|
||||
monitoreduri = "rtmp://127.0.0.1/st/hall-b"
|
||||
timeout =15
|
||||
}
|
||||
vars.rtmp_check[ "hall-c" ] = {
|
||||
monitoreduri = "rtmp://127.0.0.1/st/hall-c"
|
||||
timeout =15
|
||||
}
|
||||
vars.audiostream_check[ "hall-a-sound" ] = {
|
||||
monitoredpath = "/halla.mp3"
|
||||
}
|
||||
vars.audiostream_check[ "hall-b-sound" ] = {
|
||||
monitoredpath = "/hallb.mp3"
|
||||
}
|
||||
vars.audiostream_check[ "hall-c-sound" ] = {
|
||||
monitoredpath = "/hallc.mp3"
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,256 @@
|
|||
object Host "coresw.openfest.org" {
|
||||
import "generic-host"
|
||||
|
||||
address = "coresw"
|
||||
vars.groups = [ "ciscosw" ]
|
||||
|
||||
# check_command = "xxx_health"
|
||||
# vars.extra_port_check = ""
|
||||
# vars.specification = "vocsw"
|
||||
|
||||
# vin - primary link
|
||||
vars.snmp_ifaces [ "TenGigabitEthernet1/0/2" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10202"
|
||||
value = "1"
|
||||
}
|
||||
|
||||
# debug
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/1" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10101"
|
||||
value = "1|2"
|
||||
}
|
||||
|
||||
# debug/trunk
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/2" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10102"
|
||||
value = "1|2"
|
||||
}
|
||||
|
||||
# vin/backup
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/3" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10103"
|
||||
value = "1|2"
|
||||
}
|
||||
|
||||
# aps
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/5" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10105"
|
||||
value = "1"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/6" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10106"
|
||||
value = "1"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/7" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10107"
|
||||
value = "1"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/8" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10108"
|
||||
value = "1"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/9" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10109"
|
||||
value = "1"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/10" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10110"
|
||||
value = "1"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/11" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10111"
|
||||
value = "1"
|
||||
}
|
||||
|
||||
# dowstream switches
|
||||
# reception-sw
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/17" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10117"
|
||||
value = "1"
|
||||
}
|
||||
# team-sw
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/18" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10118"
|
||||
value = "1"
|
||||
}
|
||||
# vocsw-A
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/19" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10119"
|
||||
value = "1"
|
||||
}
|
||||
# vocsw-B
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/20" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10120"
|
||||
value = "1"
|
||||
}
|
||||
# vocsw-C
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/21" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10121"
|
||||
value = "1"
|
||||
}
|
||||
# vocsw-D
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/22" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10122"
|
||||
value = "1"
|
||||
}
|
||||
|
||||
# presenters
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/24" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10124"
|
||||
value = "1|2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/25" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10125"
|
||||
value = "1|2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/26" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10126"
|
||||
value = "1|2"
|
||||
}
|
||||
|
||||
# camboxes
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/27" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10127"
|
||||
value = "1"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/28" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10128"
|
||||
value = "1"
|
||||
}
|
||||
|
||||
# techpark
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/48" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10148"
|
||||
value = "1"
|
||||
}
|
||||
|
||||
# f0sw
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/49" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10149"
|
||||
value = "1"
|
||||
}
|
||||
# ipacct
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/50" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10150"
|
||||
value = "1"
|
||||
}
|
||||
# ups
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/41" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10141"
|
||||
value = "1"
|
||||
}
|
||||
|
||||
# down
|
||||
vars.snmp_ifaces [ "TenGigabitEthernet1/0/1" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10201"
|
||||
value = "2"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/12" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10112"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/13" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10113"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/14" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10114"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/15" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10115"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/16" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10116"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/4" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10104"
|
||||
value = "1|2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/23" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10123"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/29" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10129"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/30" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10130"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/31" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10131"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/32" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10132"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/33" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10133"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/34" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10134"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/35" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10135"
|
||||
value = "1|2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/36" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10136"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/37" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10137"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/38" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10138"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/39" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10139"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/40" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10140"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/42" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10142"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/43" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10143"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/44" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10144"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/45" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10145"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/46" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10146"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet1/0/47" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10147"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "FastEthernet0" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.14502"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_uptime = "true"
|
||||
vars.poe_watts_warning = "300"
|
||||
vars.poe_watts_critical = "100"
|
||||
}
|
|
@ -0,0 +1,222 @@
|
|||
object Host "f0sw.openfest.org" {
|
||||
import "generic-host"
|
||||
|
||||
address = "f0sw"
|
||||
vars.groups = [ "ciscosw" ]
|
||||
|
||||
vars.parent = "coresw.openfest.org"
|
||||
|
||||
# check_command = "xxx_health"
|
||||
# vars.extra_port_check = ""
|
||||
# vars.specification = "vocsw"
|
||||
|
||||
#nocsw
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/1" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10101"
|
||||
value = "1"
|
||||
}
|
||||
|
||||
# aps
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/2" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10102"
|
||||
value = "1"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/3" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10103"
|
||||
value = "1"
|
||||
}
|
||||
|
||||
# wired maybe
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/11" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10111"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/12" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10112"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/13" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10113"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/14" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10114"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/15" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10115"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/16" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10116"
|
||||
value = "2"
|
||||
}
|
||||
|
||||
# Overflow raspberry
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/20" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10120"
|
||||
value = "1"
|
||||
}
|
||||
# uplink
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/49" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10149"
|
||||
value = "1"
|
||||
}
|
||||
|
||||
# down
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/04" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10104"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/05" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10105"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/06" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10106"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/07" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10107"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/08" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10108"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/09" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10109"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/10" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10110"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/17" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10117"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/18" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10118"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/19" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10119"
|
||||
value = "2"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/21" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10121"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/22" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10122"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/23" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10123"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/24" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10124"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/25" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10125"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/26" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10126"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/27" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10127"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/28" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10128"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/29" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10129"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/30" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10130"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/31" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10131"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/32" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10132"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/33" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10133"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/34" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10134"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/35" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10135"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/36" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10136"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/37" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10137"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/38" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10138"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/39" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10139"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/40" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10140"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/41" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10141"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/42" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10142"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/43" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10143"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/44" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10144"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/45" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10145"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/46" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10146"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/47" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10147"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/48" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10148"
|
||||
value = "2"
|
||||
}
|
||||
|
||||
vars.snmp_uptime = "true"
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
object Host "nocsw.openfest.org" {
|
||||
import "generic-host"
|
||||
|
||||
address = "nocsw"
|
||||
vars.groups = [ "ciscosw" ]
|
||||
vars.parent = "f0sw.openfest.org"
|
||||
|
||||
# check_command = "xxx_health"
|
||||
# vars.extra_port_check = ""
|
||||
# vars.specification = "vocsw"
|
||||
|
||||
vars.snmp_uptime = "true"
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
object Host "receptionsw.openfest.org" {
|
||||
import "generic-host"
|
||||
|
||||
address = "receptionsw"
|
||||
vars.groups = [ "vocsw" ]
|
||||
|
||||
vars.parent = "coresw.openfest.org"
|
||||
|
||||
# check_command = "xxx_health"
|
||||
# vars.extra_port_check = ""
|
||||
# vars.specification = "vocsw"
|
||||
|
||||
# vars.net_interfaces = [ "eth0", "eth1" ]
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/1" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.1"
|
||||
value = "1" # UP - 1 , 2 - down
|
||||
}
|
||||
|
||||
# printer - on usb
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/2" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.2"
|
||||
value = "2"
|
||||
}
|
||||
|
||||
# pc ?
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/3" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.3"
|
||||
value = "1|2"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/4" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.4"
|
||||
value = "2"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/5" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.5"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/6" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.6"
|
||||
value = "2"
|
||||
}
|
||||
|
||||
# ip camera in reception
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/7" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.7"
|
||||
value = "1"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/8" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.8"
|
||||
value = "1"
|
||||
}
|
||||
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/9" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.9"
|
||||
value = "2"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/10" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10"
|
||||
value = "2"
|
||||
}
|
||||
|
||||
vars.snmp_uptime = "true"
|
||||
|
||||
vars.notification["slack"] = {
|
||||
groups = [ "icingaadmins" ]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
object Host "teamsw.openfest.org" {
|
||||
import "generic-host"
|
||||
|
||||
address = "teamsw"
|
||||
vars.groups = [ "vocsw" ]
|
||||
|
||||
vars.parent = "coresw.openfest.org"
|
||||
|
||||
# check_command = "xxx_health"
|
||||
# vars.extra_port_check = ""
|
||||
# vars.specification = "vocsw"
|
||||
|
||||
# vars.net_interfaces = [ "eth0", "eth1" ]
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/1" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.1"
|
||||
value = "1" # UP - 1 , 2 - down
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/2" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.2"
|
||||
value = "1"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/3" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.3"
|
||||
value = "1|2"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/4" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.4"
|
||||
value = "2"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/5" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.5"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/6" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.6"
|
||||
value = "2"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/7" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.7"
|
||||
value = "2"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/8" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.8"
|
||||
value = "1"
|
||||
}
|
||||
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/9" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.9"
|
||||
value = "2"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/10" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10"
|
||||
value = "2"
|
||||
}
|
||||
|
||||
vars.snmp_uptime = "true"
|
||||
|
||||
vars.notification["slack"] = {
|
||||
groups = [ "icingaadmins" ]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,130 @@
|
|||
object Host "uplink-gkc.openfest.org" {
|
||||
import "generic-host"
|
||||
|
||||
address = "uplink-gkc"
|
||||
vars.groups = [ "vocsw" ]
|
||||
|
||||
vars.parent = "coresw.openfest.org"
|
||||
|
||||
# check_command = "xxx_health"
|
||||
# vars.extra_port_check = ""
|
||||
# vars.specification = "vocsw"
|
||||
|
||||
# debug
|
||||
vars.snmp_ifaces [ "FastEthernet0/1" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10001"
|
||||
value = "1|2" # UP - 1 , 2 - down
|
||||
}
|
||||
|
||||
# down
|
||||
vars.snmp_ifaces [ "FastEthernet0/2" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10002"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "FastEthernet0/3" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10003"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "FastEthernet0/4" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10004"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "FastEthernet0/5" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10005"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "FastEthernet0/6" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10006"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "FastEthernet0/7" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10007"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "FastEthernet0/8" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10008"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "FastEthernet0/9" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10009"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "FastEthernet0/10" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10010"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "FastEthernet0/11" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10011"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "FastEthernet0/12" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10012"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "FastEthernet0/13" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10013"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "FastEthernet0/14" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10014"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "FastEthernet0/15" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10015"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "FastEthernet0/16" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10016"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "FastEthernet0/17" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10017"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "FastEthernet0/18" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10018"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "FastEthernet0/19" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10019"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "FastEthernet0/20" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10020"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "FastEthernet0/21" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10021"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "FastEthernet0/22" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10022"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "FastEthernet0/23" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10023"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "FastEthernet0/24" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10024"
|
||||
value = "2"
|
||||
}
|
||||
|
||||
# to gkc - switchboard
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/1" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10101"
|
||||
value = "1"
|
||||
}
|
||||
|
||||
# hall
|
||||
vars.snmp_ifaces [ "GigabitEthernet0/2" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10102"
|
||||
value = "1"
|
||||
}
|
||||
|
||||
vars.notification["slack"] = {
|
||||
groups = [ "icingaadmins" ]
|
||||
}
|
||||
vars.snmp_uptime = "true"
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
object Host "uplink-sw.openfest.org" {
|
||||
import "generic-host"
|
||||
|
||||
address = "uplink-sw"
|
||||
vars.groups = [ "vocsw" ]
|
||||
|
||||
vars.parent = "uplink-gkc.openfest.org"
|
||||
|
||||
# check_command = "xxx_health"
|
||||
# vars.extra_port_check = ""
|
||||
# vars.specification = "vocsw"
|
||||
|
||||
# debug
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/1" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.1"
|
||||
value = "2" # UP - 1 , 2 - down
|
||||
}
|
||||
|
||||
# down
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/2" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.2"
|
||||
value = "2"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/3" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.3"
|
||||
value = "2"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/4" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.4"
|
||||
value = "2"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/5" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.5"
|
||||
value = "2"
|
||||
}
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/6" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.6"
|
||||
value = "2"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/7" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.7"
|
||||
value = "2"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/8" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.8"
|
||||
value = "2"
|
||||
}
|
||||
|
||||
# uplink - ipacct
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/9" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.9"
|
||||
value = "1"
|
||||
}
|
||||
|
||||
# to gkc
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/10" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10"
|
||||
value = "1"
|
||||
}
|
||||
|
||||
vars.snmp_uptime = "true"
|
||||
|
||||
vars.notification["slack"] = {
|
||||
groups = [ "icingaadmins" ]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
object Host "vocsw-A.openfest.org" {
|
||||
import "generic-host"
|
||||
|
||||
address = "vocsw-A"
|
||||
vars.groups = [ "vocsw" ]
|
||||
|
||||
vars.parent = "coresw.openfest.org"
|
||||
|
||||
# check_command = "xxx_health"
|
||||
# vars.extra_port_check = ""
|
||||
# vars.specification = "vocsw"
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/1" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.1"
|
||||
value = "1" # UP - 1 , 2 - down
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/2" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.2"
|
||||
value = "1"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/3" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.3"
|
||||
value = "1"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/4" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.4"
|
||||
value = "1"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/5" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.5"
|
||||
value = "1|2"
|
||||
}
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/6" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.6"
|
||||
value = "1|2"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/7" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.7"
|
||||
value = "1|2"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/8" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.8"
|
||||
value = "1"
|
||||
}
|
||||
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/9" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.9"
|
||||
value = "2"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/10" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10"
|
||||
value = "2"
|
||||
}
|
||||
|
||||
vars.snmp_uptime = "true"
|
||||
|
||||
vars.notification["slack"] = {
|
||||
groups = [ "icingaadmins" ]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
object Host "vocsw-B.openfest.org" {
|
||||
import "generic-host"
|
||||
|
||||
address = "vocsw-B"
|
||||
vars.groups = [ "vocsw" ]
|
||||
|
||||
vars.parent = "coresw.openfest.org"
|
||||
|
||||
# check_command = "xxx_health"
|
||||
# vars.extra_port_check = ""
|
||||
# vars.specification = "vocsw"
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/1" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.1"
|
||||
value = "1" # UP - 1 , 2 - down
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/2" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.2"
|
||||
value = "1|2"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/3" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.3"
|
||||
value = "2"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/4" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.4"
|
||||
value = "1"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/5" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.5"
|
||||
value = "1|2"
|
||||
}
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/6" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.6"
|
||||
value = "1|2"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/7" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.7"
|
||||
value = "1|2"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/8" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.8"
|
||||
value = "1"
|
||||
}
|
||||
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/9" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.9"
|
||||
value = "2"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/10" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10"
|
||||
value = "2"
|
||||
}
|
||||
|
||||
vars.snmp_uptime = "true"
|
||||
|
||||
vars.notification["slack"] = {
|
||||
groups = [ "icingaadmins" ]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
object Host "vocsw-C.openfest.org" {
|
||||
import "generic-host"
|
||||
|
||||
address = "vocsw-C"
|
||||
vars.groups = [ "vocsw" ]
|
||||
|
||||
vars.parent = "coresw.openfest.org"
|
||||
|
||||
# check_command = "xxx_health"
|
||||
# vars.extra_port_check = ""
|
||||
# vars.specification = "vocsw"
|
||||
|
||||
# vars.net_interfaces = [ "eth0", "eth1" ]
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/1" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.1"
|
||||
value = "1" # UP - 1 , 2 - down
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/2" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.2"
|
||||
value = "1"
|
||||
}
|
||||
|
||||
# cambox - moved to core
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/3" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.3"
|
||||
value = "2"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/4" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.4"
|
||||
value = "1"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/5" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.5"
|
||||
value = "1|2"
|
||||
}
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/6" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.6"
|
||||
value = "1|2"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/7" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.7"
|
||||
value = "1|2"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/8" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.8"
|
||||
value = "1"
|
||||
}
|
||||
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/9" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.9"
|
||||
value = "2"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/10" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10"
|
||||
value = "2"
|
||||
}
|
||||
|
||||
vars.snmp_uptime = "true"
|
||||
|
||||
vars.notification["slack"] = {
|
||||
groups = [ "icingaadmins" ]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
object Host "vocsw-D.openfest.org" {
|
||||
import "generic-host"
|
||||
|
||||
address = "vocsw-D"
|
||||
vars.groups = [ "vocsw" ]
|
||||
|
||||
vars.parent = "coresw.openfest.org"
|
||||
|
||||
# check_command = "xxx_health"
|
||||
# vars.extra_port_check = ""
|
||||
# vars.specification = "vocsw"
|
||||
|
||||
# vars.net_interfaces = [ "eth0", "eth1" ]
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/1" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.1"
|
||||
value = "1" # UP - 1 , 2 - down
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/2" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.2"
|
||||
value = "1"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/3" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.3"
|
||||
value = "1"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/4" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.4"
|
||||
value = "2"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/5" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.5"
|
||||
value = "1|2"
|
||||
}
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/6" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.6"
|
||||
value = "1|2"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/7" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.7"
|
||||
value = "1|2"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/8" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.8"
|
||||
value = "1"
|
||||
}
|
||||
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/9" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.9"
|
||||
value = "2"
|
||||
}
|
||||
|
||||
vars.snmp_ifaces [ "gigabitEthernet 1/0/10" ] = {
|
||||
OID = "1.3.6.1.2.1.2.2.1.8.10"
|
||||
value = "2"
|
||||
}
|
||||
|
||||
vars.snmp_uptime = "true"
|
||||
|
||||
vars.notification["slack"] = {
|
||||
groups = [ "icingaadmins" ]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
object Host "ap-cf-a1.openfest.org" {
|
||||
import "generic-host"
|
||||
|
||||
address = "ap-cf-a1"
|
||||
vars.groups = [ "openwrt" ]
|
||||
|
||||
vars.parent = "coresw.openfest.org"
|
||||
|
||||
vars.os = "Linux"
|
||||
|
||||
# check_command = "xxx_health"
|
||||
# vars.extra_port_check = ""
|
||||
vars.by_ssh_port = "22"
|
||||
vars.by_ssh_logname = "root"
|
||||
vars.by_ssh_identity = "/var/lib/nagios/.ssh/id_rsa"
|
||||
|
||||
# vars.specification = "ap"
|
||||
|
||||
vars.net_interfaces = [ "eth0", "eth1" ]
|
||||
vars.ifaces[ "wlan0" ] = {
|
||||
interface = "wlan0"
|
||||
}
|
||||
|
||||
vars.ifaces[ "wlan1" ] = {
|
||||
interface = "wlan1"
|
||||
}
|
||||
|
||||
vars.notification["slack"] = {
|
||||
groups = [ "icingaadmins" ]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
object Host "ap-cf-a2.openfest.org" {
|
||||
import "generic-host"
|
||||
|
||||
address = "ap-cf-a2"
|
||||
vars.groups = [ "openwrt" ]
|
||||
|
||||
vars.parent = "coresw.openfest.org"
|
||||
|
||||
vars.os = "Linux"
|
||||
|
||||
# check_command = "xxx_health"
|
||||
# vars.extra_port_check = ""
|
||||
vars.by_ssh_port = "22"
|
||||
vars.by_ssh_logname = "root"
|
||||
vars.by_ssh_identity = "/var/lib/nagios/.ssh/id_rsa"
|
||||
|
||||
# vars.specification = "ap"
|
||||
|
||||
vars.net_interfaces = [ "eth0", "eth1" ]
|
||||
vars.ifaces[ "wlan0" ] = {
|
||||
interface = "wlan0"
|
||||
}
|
||||
|
||||
vars.ifaces[ "wlan1" ] = {
|
||||
interface = "wlan1"
|
||||
}
|
||||
|
||||
vars.notification["slack"] = {
|
||||
groups = [ "icingaadmins" ]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
object Host "ap-cf-b1.openfest.org" {
|
||||
import "generic-host"
|
||||
|
||||
address = "ap-cf-b1"
|
||||
vars.groups = [ "openwrt" ]
|
||||
|
||||
vars.parent = "coresw.openfest.org"
|
||||
|
||||
vars.os = "Linux"
|
||||
|
||||
# check_command = "xxx_health"
|
||||
# vars.extra_port_check = ""
|
||||
vars.by_ssh_port = "22"
|
||||
vars.by_ssh_logname = "root"
|
||||
vars.by_ssh_identity = "/var/lib/nagios/.ssh/id_rsa"
|
||||
|
||||
# vars.specification = "ap"
|
||||
|
||||
vars.net_interfaces = [ "eth0", "eth1" ]
|
||||
|
||||
vars.ifaces[ "wlan1" ] = {
|
||||
interface = "wlan1"
|
||||
}
|
||||
|
||||
vars.notification["slack"] = {
|
||||
groups = [ "icingaadmins" ]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
object Host "ap-cf-c1.openfest.org" {
|
||||
import "generic-host"
|
||||
|
||||
address = "ap-cf-c1"
|
||||
vars.groups = [ "openwrt" ]
|
||||
|
||||
vars.parent = "coresw.openfest.org"
|
||||
|
||||
vars.os = "Linux"
|
||||
|
||||
# check_command = "xxx_health"
|
||||
# vars.extra_port_check = ""
|
||||
vars.by_ssh_port = "22"
|
||||
vars.by_ssh_logname = "root"
|
||||
vars.by_ssh_identity = "/var/lib/nagios/.ssh/id_rsa"
|
||||
|
||||
# vars.specification = "ap"
|
||||
|
||||
vars.net_interfaces = [ "eth0", "eth1" ]
|
||||
|
||||
vars.ifaces[ "wlan1" ] = {
|
||||
interface = "wlan1"
|
||||
}
|
||||
|
||||
vars.notification["slack"] = {
|
||||
groups = [ "icingaadmins" ]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
object Host "ap-cf-ch.openfest.org" {
|
||||
import "generic-host"
|
||||
|
||||
# ap depends on teamsw
|
||||
vars.parent = "teamsw.openfest.org"
|
||||
|
||||
address = "ap-cf-ch"
|
||||
vars.groups = [ "openwrt" ]
|
||||
|
||||
vars.os = "Linux"
|
||||
|
||||
# check_command = "xxx_health"
|
||||
# vars.extra_port_check = ""
|
||||
vars.by_ssh_port = "22"
|
||||
vars.by_ssh_logname = "root"
|
||||
vars.by_ssh_identity = "/var/lib/nagios/.ssh/id_rsa"
|
||||
|
||||
# vars.specification = "ap"
|
||||
|
||||
vars.net_interfaces = [ "eth0", "eth1" ]
|
||||
vars.ifaces[ "wlan0" ] = {
|
||||
interface = "wlan0"
|
||||
}
|
||||
|
||||
vars.ifaces[ "wlan1" ] = {
|
||||
interface = "wlan1"
|
||||
}
|
||||
|
||||
vars.notification["slack"] = {
|
||||
groups = [ "icingaadmins" ]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
object Host "ap-cf-f-l.openfest.org" {
|
||||
import "generic-host"
|
||||
|
||||
address = "ap-cf-f-l"
|
||||
vars.groups = [ "openwrt" ]
|
||||
|
||||
vars.parent = "coresw.openfest.org"
|
||||
|
||||
|
||||
vars.os = "Linux"
|
||||
|
||||
# check_command = "xxx_health"
|
||||
# vars.extra_port_check = ""
|
||||
vars.by_ssh_port = "22"
|
||||
vars.by_ssh_logname = "root"
|
||||
vars.by_ssh_identity = "/var/lib/nagios/.ssh/id_rsa"
|
||||
|
||||
# vars.specification = "ap"
|
||||
|
||||
vars.net_interfaces = [ "eth0", "eth1" ]
|
||||
vars.ifaces[ "wlan0" ] = {
|
||||
interface = "wlan0"
|
||||
}
|
||||
|
||||
vars.ifaces[ "wlan1" ] = {
|
||||
interface = "wlan1"
|
||||
}
|
||||
|
||||
vars.notification["slack"] = {
|
||||
groups = [ "icingaadmins" ]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
object Host "ap-cf-f-r.openfest.org" {
|
||||
import "generic-host"
|
||||
|
||||
address = "ap-cf-f-r"
|
||||
vars.groups = [ "openwrt" ]
|
||||
|
||||
vars.parent = "coresw.openfest.org"
|
||||
|
||||
vars.os = "Linux"
|
||||
|
||||
# check_command = "xxx_health"
|
||||
# vars.extra_port_check = ""
|
||||
vars.by_ssh_port = "22"
|
||||
vars.by_ssh_logname = "root"
|
||||
vars.by_ssh_identity = "/var/lib/nagios/.ssh/id_rsa"
|
||||
|
||||
# vars.specification = "ap"
|
||||
|
||||
vars.net_interfaces = [ "eth0", "eth1" ]
|
||||
|
||||
vars.ifaces[ "wlan1" ] = {
|
||||
interface = "wlan1"
|
||||
}
|
||||
|
||||
vars.notification["slack"] = {
|
||||
groups = [ "icingaadmins" ]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
object Host "ap-cf-qws.openfest.org" {
|
||||
import "generic-host"
|
||||
|
||||
address = "ap-cf-qws"
|
||||
vars.groups = [ "openwrt" ]
|
||||
|
||||
vars.parent = "coresw.openfest.org"
|
||||
|
||||
vars.os = "Linux"
|
||||
|
||||
# check_command = "xxx_health"
|
||||
# vars.extra_port_check = ""
|
||||
vars.by_ssh_port = "22"
|
||||
vars.by_ssh_logname = "root"
|
||||
vars.by_ssh_identity = "/var/lib/nagios/.ssh/id_rsa"
|
||||
|
||||
# vars.specification = "ap"
|
||||
|
||||
vars.net_interfaces = [ "eth0", "eth1" ]
|
||||
vars.ifaces[ "wlan0" ] = {
|
||||
interface = "wlan0"
|
||||
}
|
||||
|
||||
vars.ifaces[ "wlan1" ] = {
|
||||
interface = "wlan1"
|
||||
}
|
||||
|
||||
vars.notification["slack"] = {
|
||||
groups = [ "icingaadmins" ]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
object Host "ap-cf-srv.openfest.org" {
|
||||
import "generic-host"
|
||||
|
||||
address = "ap-cf-srv"
|
||||
vars.groups = [ "openwrt" ]
|
||||
|
||||
vars.parent = "coresw.openfest.org"
|
||||
|
||||
vars.os = "Linux"
|
||||
|
||||
# check_command = "xxx_health"
|
||||
# vars.extra_port_check = ""
|
||||
vars.by_ssh_port = "22"
|
||||
vars.by_ssh_logname = "root"
|
||||
vars.by_ssh_identity = "/var/lib/nagios/.ssh/id_rsa"
|
||||
|
||||
# vars.specification = "ap"
|
||||
|
||||
vars.net_interfaces = [ "eth0", "eth1" ]
|
||||
vars.ifaces[ "wlan0" ] = {
|
||||
interface = "wlan0"
|
||||
}
|
||||
|
||||
vars.ifaces[ "wlan1" ] = {
|
||||
interface = "wlan1"
|
||||
}
|
||||
|
||||
vars.notification["slack"] = {
|
||||
groups = [ "icingaadmins" ]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
object Host "ap-ws-noc.openfest.org" {
|
||||
import "generic-host"
|
||||
|
||||
address = "ap-ws-noc"
|
||||
vars.groups = [ "openwrt" ]
|
||||
|
||||
vars.parent = "nocsw.openfest.org"
|
||||
|
||||
vars.os = "Linux"
|
||||
|
||||
# check_command = "xxx_health"
|
||||
# vars.extra_port_check = ""
|
||||
vars.by_ssh_port = "22"
|
||||
vars.by_ssh_logname = "root"
|
||||
vars.by_ssh_identity = "/var/lib/nagios/.ssh/id_rsa"
|
||||
|
||||
# vars.specification = "ap"
|
||||
|
||||
vars.net_interfaces = [ "eth0", "eth1" ]
|
||||
|
||||
vars.ifaces[ "wlan1" ] = {
|
||||
interface = "wlan1"
|
||||
}
|
||||
|
||||
vars.notification["slack"] = {
|
||||
groups = [ "icingaadmins" ]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
object Host "ap-ws-ws1.openfest.org" {
|
||||
import "generic-host"
|
||||
|
||||
# depends on f0sw
|
||||
vars.parent = "f0sw.openfest.org"
|
||||
|
||||
address = "ap-ws-ws1"
|
||||
vars.groups = [ "openwrt" ]
|
||||
|
||||
vars.os = "Linux"
|
||||
|
||||
# check_command = "xxx_health"
|
||||
# vars.extra_port_check = ""
|
||||
vars.by_ssh_port = "22"
|
||||
vars.by_ssh_logname = "root"
|
||||
vars.by_ssh_identity = "/var/lib/nagios/.ssh/id_rsa"
|
||||
|
||||
# vars.specification = "ap"
|
||||
|
||||
vars.net_interfaces = [ "eth0", "eth1" ]
|
||||
vars.ifaces[ "wlan0" ] = {
|
||||
interface = "wlan0"
|
||||
}
|
||||
|
||||
vars.ifaces[ "wlan1" ] = {
|
||||
interface = "wlan1"
|
||||
}
|
||||
|
||||
vars.notification["slack"] = {
|
||||
groups = [ "icingaadmins" ]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
object Host "ap-ws-ws2.openfest.org" {
|
||||
import "generic-host"
|
||||
|
||||
# depends on f0sw
|
||||
vars.parent = "f0sw.openfest.org"
|
||||
|
||||
address = "ap-ws-ws2"
|
||||
vars.groups = [ "openwrt" ]
|
||||
|
||||
vars.os = "Linux"
|
||||
|
||||
# check_command = "xxx_health"
|
||||
# vars.extra_port_check = ""
|
||||
vars.by_ssh_port = "22"
|
||||
vars.by_ssh_logname = "root"
|
||||
vars.by_ssh_identity = "/var/lib/nagios/.ssh/id_rsa"
|
||||
|
||||
# vars.specification = "ap"
|
||||
|
||||
vars.net_interfaces = [ "eth0", "eth1" ]
|
||||
vars.ifaces[ "wlan0" ] = {
|
||||
interface = "wlan0"
|
||||
}
|
||||
|
||||
vars.ifaces[ "wlan1" ] = {
|
||||
interface = "wlan1"
|
||||
}
|
||||
|
||||
vars.notification["slack"] = {
|
||||
groups = [ "icingaadmins" ]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
/**
|
||||
* The example notification apply rules.
|
||||
*
|
||||
* Only applied if host/service objects have
|
||||
* the custom variable `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
|
||||
|
||||
//interval = 2h
|
||||
|
||||
//vars.notification_logtosyslog = true
|
||||
|
||||
# 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
|
||||
|
||||
//interval = 2h
|
||||
|
||||
//vars.notification_logtosyslog = true
|
||||
|
||||
// assign where host.vars.notification.mail
|
||||
//}
|
||||
|
||||
apply Notification "slack" to Service {
|
||||
import "slack-service-notification"
|
||||
user_groups = host.vars.notification.slack.groups
|
||||
interval = 10m
|
||||
vars.notification_logtosyslog = true
|
||||
assign where host.vars.notification.slack
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
|
@ -0,0 +1,137 @@
|
|||
apply Service "network_interfaces_traffic" {
|
||||
import "generic-service"
|
||||
check_interval = 5m
|
||||
retry_interval = 1m
|
||||
max_check_attempts = 3
|
||||
check_command = "check_net_int"
|
||||
vars.int_warn="925"
|
||||
vars.int_crit="950"
|
||||
enable_perfdata = true
|
||||
|
||||
assign where host.vars.net_interfaces
|
||||
|
||||
vars.notif_prio = "high"
|
||||
}
|
||||
|
||||
apply Service "network_open_ports" {
|
||||
import "generic-service"
|
||||
max_check_attempts = 3
|
||||
check_interval = 5m
|
||||
retry_interval = 1m
|
||||
check_command = "check_open_ports"
|
||||
vars.ports=host.vars.open_ports
|
||||
vars.host=host.address
|
||||
assign where host.vars.open_ports
|
||||
|
||||
vars.notif_prio = "high"
|
||||
}
|
||||
|
||||
apply Service for (iface => config in host.vars.ifaces) {
|
||||
import "generic-service"
|
||||
display_name = "bandwidth_" + iface
|
||||
|
||||
check_command = "check_bandwidth"
|
||||
|
||||
vars += config
|
||||
# NB: you probably want to use another condition/hostgroup
|
||||
assign where "openwrt" in host.vars.groups
|
||||
}
|
||||
|
||||
apply Service for (iface => config in host.vars.snmp_ifaces) {
|
||||
import "generic-service"
|
||||
display_name = "operstatus_" + iface
|
||||
|
||||
check_command = "check_operstatus"
|
||||
|
||||
vars.host = host.address
|
||||
vars += config
|
||||
# NB: you probably want to use another condition/hostgroup
|
||||
assign where "vocsw" in host.vars.groups
|
||||
assign where "ciscosw" in host.vars.groups
|
||||
}
|
||||
|
||||
apply Service "uptime-tp" {
|
||||
display_name = "Uptime"
|
||||
import "generic-service"
|
||||
check_command = "snmp"
|
||||
vars.snmp_oid = "1.3.6.1.2.1.1.3.0"
|
||||
vars.snmp_community = "openfest"
|
||||
assign where "vocsw" in host.vars.groups && host.vars.snmp_uptime
|
||||
}
|
||||
|
||||
apply Service "uptime-cisco" {
|
||||
display_name = "Uptime"
|
||||
import "generic-service"
|
||||
check_command = "snmp"
|
||||
vars.snmp_oid = "1.3.6.1.6.3.10.2.1.3.0"
|
||||
vars.snmp_community = "openfest"
|
||||
vars.snmp_miblist = "SNMP-FRAMEWORK-MIB"
|
||||
assign where "ciscosw" in host.vars.groups && host.vars.snmp_uptime
|
||||
}
|
||||
|
||||
apply Service "poe-watts-remaining" {
|
||||
display_name = "POE - Watts Remaining"
|
||||
import "generic-service"
|
||||
check_command = "cisco-poe-check"
|
||||
assign where host.name == "coresw.openfest.org"
|
||||
}
|
||||
|
||||
apply Service for (stream => config in host.vars.rtmp_check) {
|
||||
import "generic-service"
|
||||
display_name = "RTMP Check " + stream
|
||||
check_command = "rtmp-check"
|
||||
|
||||
vars += config
|
||||
|
||||
### assign where host.name == "vin-external.openfest.org"
|
||||
assign where host.vars.rtmp_check
|
||||
}
|
||||
|
||||
apply Service "bird_bgp_sessions" {
|
||||
import "generic-service"
|
||||
max_check_attempts = 3
|
||||
check_interval = 5m
|
||||
retry_interval = 1m
|
||||
check_command = "bgp_sessions_check"
|
||||
vars.ASN = host.vars.ASN
|
||||
vars.sessions_down = host.vars.sessions_down
|
||||
assign where host.vars.ASN
|
||||
|
||||
vars.notif_prio = "high"
|
||||
}
|
||||
|
||||
apply Service "check_sensors" {
|
||||
import "generic-service"
|
||||
display_name = "Check LM Sensors "
|
||||
check_command = "check_sensors"
|
||||
### vars += config
|
||||
|
||||
assign where host.name == "vin-external.openfest.org"
|
||||
}
|
||||
|
||||
apply Service "check_unbound" {
|
||||
import "generic-service"
|
||||
display_name = "Check Unbound Status"
|
||||
check_command = "check_unbound"
|
||||
assign where host.name == "vin-external.openfest.org"
|
||||
}
|
||||
|
||||
apply Service for (ups_check => config in host.vars.ups) {
|
||||
import "generic-service"
|
||||
display_name = "UPS " + ups_check
|
||||
check_command = "check_ups"
|
||||
|
||||
vars.host = host.address
|
||||
vars += config
|
||||
|
||||
assign where host.vars.ups
|
||||
}
|
||||
|
||||
apply Service for (stream => config in host.vars.audiostream_check) {
|
||||
import "generic-service"
|
||||
display_name = "Stream check " + stream
|
||||
check_command = "check-audio-stream"
|
||||
vars += config
|
||||
|
||||
assign where host.vars.audiostream_check
|
||||
}
|
|
@ -0,0 +1,116 @@
|
|||
/*
|
||||
* 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 variable `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.vars.swap_size
|
||||
}
|
||||
|
||||
apply Service "users" {
|
||||
import "generic-service"
|
||||
|
||||
check_command = "users"
|
||||
|
||||
assign where host.name == NodeName
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
object NotificationCommand "slack-service-notification" {
|
||||
import "plugin-notification-command"
|
||||
|
||||
command = [ SysconfDir + "/icinga2/scripts/slack-service-notification.sh" ]
|
||||
|
||||
env = {
|
||||
"NOTIFICATIONTYPE" = "$notification.type$"
|
||||
"SERVICEDESC" = "$service.name$"
|
||||
"HOSTALIAS" = "$host.display_name$",
|
||||
"HOSTNAME" = "$host.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$",
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
template Notification "slack-service-notification" {
|
||||
command = "slack-service-notification"
|
||||
|
||||
states = [ OK, Warning, Critical, Unknown ]
|
||||
types = [ Problem, Acknowledgement, Recovery, Custom,
|
||||
FlappingStart, FlappingEnd,
|
||||
DowntimeStart, DowntimeEnd, DowntimeRemoved ]
|
||||
|
||||
period = "24x7"
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
/*
|
||||
* 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 ]
|
||||
|
||||
vars += {
|
||||
// notification_icingaweb2url = "https://www.example.com/icingaweb2"
|
||||
// notification_from = "Icinga 2 Host Monitoring <icinga@example.com>"
|
||||
notification_logtosyslog = false
|
||||
}
|
||||
|
||||
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 ]
|
||||
|
||||
vars += {
|
||||
// notification_icingaweb2url = "https://www.example.com/icingaweb2"
|
||||
// notification_from = "Icinga 2 Service Monitoring <icinga@example.com>"
|
||||
notification_logtosyslog = false
|
||||
}
|
||||
|
||||
period = "24x7"
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
/**
|
||||
* Sample timeperiods for Icinga 2.
|
||||
* Check the documentation for details.
|
||||
*/
|
||||
|
||||
object TimePeriod "24x7" {
|
||||
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" {
|
||||
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" {
|
||||
display_name = "Icinga 2 never TimePeriod"
|
||||
ranges = {
|
||||
}
|
||||
}
|
||||
|
|
@ -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"
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
/**
|
||||
* This file defines global constants which can be used in
|
||||
* the other configuration files.
|
||||
*/
|
||||
|
||||
/* XXX: Nice comment */
|
||||
const SysconfDir = "/etc"
|
||||
|
||||
/* 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 = "vin.openfest.org"
|
||||
|
||||
/* Our local zone name. */
|
||||
const ZoneName = "vin.openfest.org"
|
||||
|
||||
/* Secret key for remote node tickets */
|
||||
const TicketSalt = ""
|
|
@ -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 = ""
|
|
@ -0,0 +1,5 @@
|
|||
/**
|
||||
* The checker component takes care of executing service checks.
|
||||
*/
|
||||
|
||||
object CheckerComponent "checker" { }
|
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* The ExternalCommandListener implements support for the external
|
||||
* commands pipe.
|
||||
*/
|
||||
|
||||
object ExternalCommandListener "command" { }
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
/**
|
||||
* 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
|
||||
// enable_send_thresholds = true
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* The db_ido_mysql library implements IDO functionality
|
||||
* for MySQL.
|
||||
*/
|
||||
|
||||
library "db_ido_mysql"
|
||||
|
||||
object IdoMysqlConnection "ido-mysql" {
|
||||
user = "user",
|
||||
password = "pass",
|
||||
host = "localhost",
|
||||
database = "icinga2"
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
/**
|
||||
* The FileLogger type writes log information to a file.
|
||||
*/
|
||||
|
||||
object FileLogger "main-log" {
|
||||
severity = "information"
|
||||
path = LogDir + "/icinga2.log"
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
/**
|
||||
* The notification component is responsible for sending notifications.
|
||||
*/
|
||||
|
||||
object NotificationComponent "notification" { }
|
|
@ -0,0 +1,6 @@
|
|||
/**
|
||||
* The PerfdataWriter type writes performance data files and rotates
|
||||
* them in a regular interval.
|
||||
*/
|
||||
|
||||
object PerfdataWriter "perfdata" { }
|
|
@ -0,0 +1,57 @@
|
|||
/**
|
||||
* 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"
|
||||
|
||||
/**
|
||||
* 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"
|
|
@ -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"
|
|
@ -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.
|
|
@ -0,0 +1,591 @@
|
|||
# /usr/bin/perl -w
|
||||
|
||||
use strict;
|
||||
no warnings qw(once);
|
||||
|
||||
if ( ! grep /BEGIN/, keys %Monitoring::GLPlugin::) {
|
||||
eval {
|
||||
require Monitoring::GLPlugin;
|
||||
require Monitoring::GLPlugin::SNMP;
|
||||
require Monitoring::GLPlugin::UPNP;
|
||||
};
|
||||
if ($@) {
|
||||
printf "UNKNOWN - module Monitoring::GLPlugin was not found. Either build a standalone version of this plugin or set PERL5LIB\n";
|
||||
printf "%s\n", $@;
|
||||
exit 3;
|
||||
}
|
||||
}
|
||||
|
||||
my $plugin = Classes::Device->new(
|
||||
shortname => '',
|
||||
usage => 'Usage: %s [ -v|--verbose ] [ -t <timeout> ] '.
|
||||
'--mode <what-to-do> '.
|
||||
'--hostname <network-component> --community <snmp-community>'.
|
||||
' ...]',
|
||||
version => '$Revision: #PACKAGE_VERSION# $',
|
||||
blurb => 'This plugin checks various parameters of network components ',
|
||||
url => 'http://labs.consol.de/nagios/check_nwc_health',
|
||||
timeout => 60,
|
||||
plugin => $Monitoring::GLPlugin::pluginname,
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::hardware::health',
|
||||
spec => 'hardware-health',
|
||||
alias => undef,
|
||||
help => 'Check the status of environmental equipment (fans, temperatures, power)',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::hardware::load',
|
||||
spec => 'cpu-load',
|
||||
alias => ['cpu-usage'],
|
||||
help => 'Check the CPU load of the device',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::hardware::memory',
|
||||
spec => 'memory-usage',
|
||||
alias => undef,
|
||||
help => 'Check the memory usage of the device',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::disk::usage',
|
||||
spec => 'disk-usage',
|
||||
alias => undef,
|
||||
help => 'Check the disk usage of the device',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::interfaces::usage',
|
||||
spec => 'interface-usage',
|
||||
alias => undef,
|
||||
help => 'Check the utilization of interfaces',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::interfaces::errors',
|
||||
spec => 'interface-errors',
|
||||
alias => undef,
|
||||
help => 'Check the error-rate of interfaces (without discards)',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::interfaces::discards',
|
||||
spec => 'interface-discards',
|
||||
alias => undef,
|
||||
help => 'Check the discard-rate of interfaces',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::interfaces::operstatus',
|
||||
spec => 'interface-status',
|
||||
alias => undef,
|
||||
help => 'Check the status of interfaces (oper/admin)',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::interfaces::duplex',
|
||||
spec => 'interface-duplex',
|
||||
alias => undef,
|
||||
help => 'Check if interfaces operate in duplex mode',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::interfaces::complete',
|
||||
spec => 'interface-health',
|
||||
alias => undef,
|
||||
help => 'Check everything interface',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::interfaces::nat::sessions::count',
|
||||
spec => 'interface-nat-count-sessions',
|
||||
alias => undef,
|
||||
help => 'Count the number of nat sessions',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::interfaces::nat::rejects',
|
||||
spec => 'interface-nat-rejects',
|
||||
alias => undef,
|
||||
help => 'Count the number of nat sessions rejected due to lack of resources',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::interfaces::list',
|
||||
spec => 'list-interfaces',
|
||||
alias => undef,
|
||||
help => 'Show the interfaces of the device and update the name cache',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::interfaces::listdetail',
|
||||
spec => 'list-interfaces-detail',
|
||||
alias => undef,
|
||||
help => 'Show the interfaces of the device and some details',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::interfaces::availability',
|
||||
spec => 'interface-availability',
|
||||
alias => undef,
|
||||
help => 'Show the availability (oper != up) of interfaces',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::interfaces::aggregation::availability',
|
||||
spec => 'link-aggregation-availability',
|
||||
alias => undef,
|
||||
help => 'Check the percentage of up interfaces in a link aggregation',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::interfaces::ifstack::status',
|
||||
spec => 'interface-stack-status',
|
||||
alias => undef,
|
||||
help => 'Check the status of interface sublayers (mostly layer 2)',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::interfaces::ifstack::availability',
|
||||
spec => 'interface-stack-availability',
|
||||
alias => undef,
|
||||
help => 'Check the percentage of available sublayer interfaces',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::interfaces::etherstats',
|
||||
spec => 'interface-etherstats',
|
||||
alias => undef,
|
||||
help => 'Check the ethernet statistics of interfaces',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::interfaces::uptime',
|
||||
spec => 'interface-uptime',
|
||||
alias => undef,
|
||||
help => 'Check state changes of interfaces',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::interfaces::portsecurity',
|
||||
spec => 'interface-security',
|
||||
alias => undef,
|
||||
help => 'Check interfaces for security violations',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::routes::list',
|
||||
spec => 'list-routes',
|
||||
alias => undef,
|
||||
help => 'Show the configured routes',
|
||||
help => 'Check the percentage of up interfaces in a link aggregation',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::routes::exists',
|
||||
spec => 'route-exists',
|
||||
alias => undef,
|
||||
help => 'Check if a route exists. (--name is the dest, --name2 check also the next hop)',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::routes::count',
|
||||
spec => 'count-routes',
|
||||
alias => undef,
|
||||
help => 'Count the routes. (--name is the dest, --name2 is the hop)',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::vpn::status',
|
||||
spec => 'vpn-status',
|
||||
alias => undef,
|
||||
help => 'Check the status of vpns (up/down)',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::fcinterfaces::usage',
|
||||
spec => 'fc-interface-usage',
|
||||
alias => undef,
|
||||
help => 'Check the utilization of fibrechannel interfaces',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::fcinterfaces::errors',
|
||||
spec => 'fc-interface-errors',
|
||||
alias => undef,
|
||||
help => 'Check the error-rate of fibrechannel interfaces',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::fcinterfaces::discards',
|
||||
spec => 'fc-interface-discards',
|
||||
alias => undef,
|
||||
help => 'Check the discard-rate of interfaces',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::fcinterfaces::operstatus',
|
||||
spec => 'fc-interface-status',
|
||||
alias => undef,
|
||||
help => 'Check the status of interfaces (oper/admin)',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::fcinterfaces::complete',
|
||||
spec => 'fc-interface-health',
|
||||
alias => undef,
|
||||
help => 'Check everything interface',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::fcinterfaces::list',
|
||||
spec => 'fc-list-interfaces',
|
||||
alias => undef,
|
||||
help => 'Show the fcal interfaces of the device and update the name cache',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::shinken::interface',
|
||||
spec => 'create-shinken-service',
|
||||
alias => undef,
|
||||
help => 'Create a Shinken service definition',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::hsrp::state',
|
||||
spec => 'hsrp-state',
|
||||
alias => undef,
|
||||
help => 'Check the state in a HSRP group',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::hsrp::failover',
|
||||
spec => 'hsrp-failover',
|
||||
alias => undef,
|
||||
help => 'Check if a HSRP group\'s nodes have changed their roles',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::hsrp::list',
|
||||
spec => 'list-hsrp-groups',
|
||||
alias => undef,
|
||||
help => 'Show the HSRP groups configured on this device',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::vrrp::state',
|
||||
spec => 'vrrp-state',
|
||||
alias => undef,
|
||||
help => 'Check the state in a VRRP group',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::vrrp::failover',
|
||||
spec => 'vrrp-failover',
|
||||
alias => undef,
|
||||
help => 'Check if a VRRP group\'s nodes have changed their roles',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::vrrp::list',
|
||||
spec => 'list-vrrp-groups',
|
||||
alias => undef,
|
||||
help => 'Show the VRRP groups configured on this device',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::bgp::peer::status',
|
||||
spec => 'bgp-peer-status',
|
||||
alias => undef,
|
||||
help => 'Check status of BGP peers',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::bgp::peer::count',
|
||||
spec => 'count-bgp-peers',
|
||||
alias => undef,
|
||||
help => 'Count the number of BGP peers',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::bgp::peer::watch',
|
||||
spec => 'watch-bgp-peers',
|
||||
alias => undef,
|
||||
help => 'Watch BGP peers appear and disappear',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::bgp::peer::list',
|
||||
spec => 'list-bgp-peers',
|
||||
alias => undef,
|
||||
help => 'Show BGP peers known to this device',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::bgp::prefix::count',
|
||||
spec => 'count-bgp-prefixes',
|
||||
alias => undef,
|
||||
help => 'Count the number of BGP prefixes (for specific peer with --name)',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::ospf::neighbor::status',
|
||||
spec => 'ospf-neighbor-status',
|
||||
alias => undef,
|
||||
help => 'Check status of OSPF neighbors',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::ospf::neighbor::watch',
|
||||
spec => 'watch-ospf-neighbors',
|
||||
alias => undef,
|
||||
help => 'Watch OSPF neighbors appear and disappear',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::ospf::neighbor::list',
|
||||
spec => 'list-ospf-neighbors',
|
||||
alias => undef,
|
||||
help => 'Show OSPF neighbors',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::eigrp::peer::count',
|
||||
spec => 'count-eigrp-peers',
|
||||
alias => undef,
|
||||
help => 'Count the number of EIGRP peers',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::eigrp::peer::status',
|
||||
spec => 'eigrp-peer-status',
|
||||
alias => undef,
|
||||
help => 'Check status (existance) of EIGRP peers',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::eigrp::peer::watch',
|
||||
spec => 'watch-eigrp-peers',
|
||||
alias => undef,
|
||||
help => 'Watch EIGRP peers appear and disappear',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::eigrp::peer::list',
|
||||
spec => 'list-eigrp-peers',
|
||||
alias => undef,
|
||||
help => 'Show EIGRP peers',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::ha::status',
|
||||
spec => 'ha-status',
|
||||
alias => undef,
|
||||
help => 'Check the status of a clustered setup',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::ha::role',
|
||||
spec => 'ha-role',
|
||||
alias => undef,
|
||||
help => 'Check the role in a ha group',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::svn::status',
|
||||
spec => 'svn-status',
|
||||
alias => undef,
|
||||
help => 'Check the status of the svn subsystem',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::mngmt::status',
|
||||
spec => 'mngmt-status',
|
||||
alias => undef,
|
||||
help => 'Check the status of the management subsystem',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::process::status',
|
||||
spec => 'process-status',
|
||||
alias => undef,
|
||||
help => 'Check the status of the running processes'
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::fw::policy::installed',
|
||||
spec => 'fw-policy',
|
||||
alias => undef,
|
||||
help => 'Check the installed firewall policy',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::fw::policy::connections',
|
||||
spec => 'fw-connections',
|
||||
alias => undef,
|
||||
help => 'Check the number of firewall policy connections',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::lb::session::usage',
|
||||
spec => 'session-usage',
|
||||
alias => undef,
|
||||
help => 'Check the session limits of a load balancer',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::security',
|
||||
spec => 'security-status',
|
||||
alias => undef,
|
||||
help => 'Check if there are security-relevant incidents',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::lb::pool::completeness',
|
||||
spec => 'pool-completeness',
|
||||
alias => undef,
|
||||
help => 'Check the members of a load balancer pool',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::lb::pool::connections',
|
||||
spec => 'pool-connections',
|
||||
alias => undef,
|
||||
help => 'Check the number of connections of a load balancer pool',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::lb::pool::complections',
|
||||
spec => 'pool-complections',
|
||||
alias => undef,
|
||||
help => 'Check the members and connections of a load balancer pool',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::wideip::status',
|
||||
spec => 'wideip-status',
|
||||
alias => undef,
|
||||
help => 'Check the status of F5 Wide IPs',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::lb::pool::list',
|
||||
spec => 'list-pools',
|
||||
alias => undef,
|
||||
help => 'List load balancer pools',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::licenses::validate',
|
||||
spec => 'check-licenses',
|
||||
alias => undef,
|
||||
help => 'Check the installed licences/keys',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::users::count',
|
||||
spec => 'count-users',
|
||||
help => 'Count the (connected) users/sessions',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::config::status',
|
||||
spec => 'check-config',
|
||||
alias => undef,
|
||||
help => 'Check the status of configs (cisco, unsaved config changes)',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::connections::check',
|
||||
spec => 'check-connections',
|
||||
alias => undef,
|
||||
help => 'Check the quality of connections',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::connections::count',
|
||||
spec => 'count-connections',
|
||||
alias => ['count-connections-client', 'count-connections-server', 'count-sessions'],
|
||||
help => 'Check the number of connections/sessions (-client, -server is possible)',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::cisco::fex::watch',
|
||||
spec => 'watch-fexes',
|
||||
alias => undef,
|
||||
help => 'Check if FEXes appear and disappear (use --lookup)',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::hardware::chassis::health',
|
||||
spec => 'chassis-hardware-health',
|
||||
alias => undef,
|
||||
help => 'Check the status of stacked switches and chassis, count modules and ports',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::wlan::aps::status',
|
||||
spec => 'accesspoint-status',
|
||||
alias => undef,
|
||||
help => 'Check the status of access points',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::wlan::aps::count',
|
||||
spec => 'count-accesspoints',
|
||||
alias => undef,
|
||||
help => 'Check if the number of access points is within a certain range',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::wlan::aps::watch',
|
||||
spec => 'watch-accesspoints',
|
||||
alias => undef,
|
||||
help => 'Check if access points appear and disappear (use --lookup)',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::wlan::aps::clients',
|
||||
spec => 'count-accesspoint-clients',
|
||||
alias => undef,
|
||||
help => 'Check if the number of access point clients is within a certain range',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::wlan::aps::list',
|
||||
spec => 'list-accesspoints',
|
||||
alias => undef,
|
||||
help => 'List access points managed by this device',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::phone::cmstatus',
|
||||
spec => 'phone-cm-status',
|
||||
alias => undef,
|
||||
help => 'Check if the callmanager is up',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::phone::status',
|
||||
spec => 'phone-status',
|
||||
alias => undef,
|
||||
help => 'Check the number of registered/unregistered/rejected phones',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::smarthome::device::list',
|
||||
spec => 'list-smart-home-devices',
|
||||
alias => undef,
|
||||
help => 'List Fritz!DECT 200 plugs managed by this device',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::smarthome::device::status',
|
||||
spec => 'smart-home-device-status',
|
||||
alias => undef,
|
||||
help => 'Check if a Fritz!DECT 200 plug is on (or Comet DECT)',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::smarthome::device::energy',
|
||||
spec => 'smart-home-device-energy',
|
||||
alias => undef,
|
||||
help => 'Show the current power consumption of a Fritz!DECT 200 plug',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::smarthome::device::consumption',
|
||||
spec => 'smart-home-device-consumption',
|
||||
alias => undef,
|
||||
help => 'Show the cumulated power consumption of a Fritz!DECT 200 plug',
|
||||
);
|
||||
$plugin->add_mode(
|
||||
internal => 'device::smarthome::device::temperature',
|
||||
spec => 'smart-home-device-temperature',
|
||||
alias => undef,
|
||||
help => 'Show the temperature measured by a Fritz! compatible device',
|
||||
);
|
||||
$plugin->add_default_modes();
|
||||
$plugin->add_snmp_modes();
|
||||
$plugin->add_snmp_args();
|
||||
$plugin->add_default_args();
|
||||
$plugin->mod_arg("name",
|
||||
help => "--name
|
||||
The name of an interface (ifDescr) or pool or ...",
|
||||
);
|
||||
$plugin->add_arg(
|
||||
spec => 'alias=s',
|
||||
help => "--alias
|
||||
The alias name of a 64bit-interface (ifAlias)",
|
||||
required => 0,
|
||||
);
|
||||
$plugin->add_arg(
|
||||
spec => 'ifspeedin=i',
|
||||
help => "--ifspeedin
|
||||
Override the ifspeed oid of an interface (only inbound)",
|
||||
required => 0,
|
||||
);
|
||||
$plugin->add_arg(
|
||||
spec => 'ifspeedout=i',
|
||||
help => "--ifspeedout
|
||||
Override the ifspeed oid of an interface (only outbound)",
|
||||
required => 0,
|
||||
);
|
||||
$plugin->add_arg(
|
||||
spec => 'ifspeed=i',
|
||||
help => "--ifspeed
|
||||
Override the ifspeed oid of an interface",
|
||||
required => 0,
|
||||
);
|
||||
$plugin->add_arg(
|
||||
spec => 'role=s',
|
||||
help => "--role
|
||||
The role of this device in a hsrp group (active/standby/listen)",
|
||||
required => 0,
|
||||
);
|
||||
|
||||
$plugin->getopts();
|
||||
$plugin->classify();
|
||||
$plugin->validate_args();
|
||||
|
||||
if (! $plugin->check_messages()) {
|
||||
$plugin->init();
|
||||
if (! $plugin->check_messages()) {
|
||||
$plugin->add_ok($plugin->get_summary())
|
||||
if $plugin->get_summary();
|
||||
$plugin->add_ok($plugin->get_extendedinfo(" "))
|
||||
if $plugin->get_extendedinfo();
|
||||
}
|
||||
} elsif ($plugin->opts->snmpwalk && $plugin->opts->offline) {
|
||||
;
|
||||
} else {
|
||||
;
|
||||
}
|
||||
my ($code, $message) = $plugin->opts->multiline ?
|
||||
$plugin->check_messages(join => "\n", join_all => ', ') :
|
||||
$plugin->check_messages(join => ', ', join_all => ', ');
|
||||
$message .= sprintf "\n%s\n", $plugin->get_info("\n")
|
||||
if $plugin->opts->verbose >= 1;
|
||||
|
||||
$plugin->nagios_exit($code, $message);
|
|
@ -0,0 +1,96 @@
|
|||
#!/bin/sh
|
||||
# FILE: "check_rtmp"
|
||||
# DESCRIPTION:nagios plugin for checking rtmp streams.
|
||||
# REQUIRES: rtmpdump (http://rtmpdump.mplayerhq.hu/)
|
||||
# AUTHOR: Toni Comerma
|
||||
# DATE: jan-2013
|
||||
# $Id:$
|
||||
#
|
||||
|
||||
PROGNAME=`readlink -f $0`
|
||||
PROGPATH=`echo $PROGNAME | sed -e 's,[\\/][^\\/][^\\/]*$,,'`
|
||||
REVISION=`echo '$Revision: .2 $' | sed -e 's/[^0-9.]//g'`
|
||||
|
||||
RTMPDUMP=`which rtmpdump`
|
||||
|
||||
print_usage() {
|
||||
echo "Usage:"
|
||||
echo " $PROGNAME -u <url> -t <timeout> "
|
||||
echo " $PROGNAME -h "
|
||||
|
||||
|
||||
}
|
||||
|
||||
print_help() {
|
||||
print_revision $PROGNAME $REVISION
|
||||
echo ""
|
||||
print_usage
|
||||
|
||||
echo "Comprova l'estat d'un stream RTMP"
|
||||
echo ""
|
||||
echo "Opcions:"
|
||||
echo " -u URL a testejar Exemple: rtmp://server/app/streamName"
|
||||
echo " -t Temps a monitoritzar"
|
||||
echo ""
|
||||
exit $STATE_UNKNOWN
|
||||
}
|
||||
|
||||
|
||||
|
||||
STATE_OK=0
|
||||
STATE_WARNING=1
|
||||
STATE_CRITICAL=2
|
||||
STATE_UNKNOWN=3
|
||||
|
||||
URL=""
|
||||
TIMEOUT=2
|
||||
|
||||
# Proces de parametres
|
||||
while getopts ":u:t:h" Option
|
||||
do
|
||||
case $Option in
|
||||
u ) URL=$OPTARG;;
|
||||
t ) TIMEOUT=$OPTARG;;
|
||||
h ) print_help;;
|
||||
* ) echo "unimplemented option";;
|
||||
|
||||
esac
|
||||
done
|
||||
|
||||
if [ ! $URL ] ; then
|
||||
echo " Error - No URI specified to monitor "
|
||||
echo ""
|
||||
print_help
|
||||
echo ""
|
||||
fi
|
||||
|
||||
# Construir noms de fitxers temporals
|
||||
NAME=`echo $URL | sed -e s/[^A-Za-z0-9.]/_/g`
|
||||
ERR=/tmp/check_rtmp_err_$NAME.tmp
|
||||
|
||||
# Testejant
|
||||
timeout --preserve-status 7 $RTMPDUMP --live -r $URL --stop $TIMEOUT > /dev/null 2> $ERR
|
||||
status=$?
|
||||
|
||||
|
||||
# Retorn de resultats
|
||||
CONNECTA=`grep "INFO: Connected" $ERR`
|
||||
|
||||
if [ -z "$CONNECTA" ]
|
||||
then
|
||||
echo "CRITICAL - No connection to server: $URL"
|
||||
exit $STATE_CRITICAL
|
||||
else
|
||||
ERROR=`grep "INFO: Metadata:" $ERR`
|
||||
if [ ! -z "$ERROR" ]
|
||||
then
|
||||
echo "OK - Stream working: $URL"
|
||||
exit $STATE_OK
|
||||
fi
|
||||
echo "CRITICAL - Stream NOT working: $URL"
|
||||
exit $STATE_CRITICAL
|
||||
fi
|
||||
|
||||
echo "UNKNOWN - Alguna condicio no esperada ha permes arribar fins aqui. Revisar check"
|
||||
exit $STATE_UNKNOWN
|
||||
|
|
@ -0,0 +1,477 @@
|
|||
#!/usr/bin/perl
|
||||
# ============================================================================
|
||||
# ============================== INFO ========================================
|
||||
# ============================================================================
|
||||
# Version : 0.3
|
||||
# Date : March 6 2019
|
||||
# Author : Michiel Timmers ( michiel.timmers AT gmx.net) +Farid Joubbi
|
||||
# Licence : GPL - summary below
|
||||
#
|
||||
# ============================================================================
|
||||
# ============================== SUMMARY =====================================
|
||||
# ============================================================================
|
||||
#
|
||||
# Check the PoE availability of a Cisco switch
|
||||
# version 0.3 By farid@joubbi.se:
|
||||
# - Added performace data
|
||||
# - Small modifications of output
|
||||
#
|
||||
# version 0.2:
|
||||
# - fix for Cisco bug CSCtl11469. Data is now collected via a snmpwalk
|
||||
# - added support for stackble switches
|
||||
#
|
||||
# Check the http://exchange.nagios.org website for new versions.
|
||||
# For comments, questions, problems and patches send me an
|
||||
# e-mail (michiel.timmmers AT gmx.net).
|
||||
#
|
||||
# ============================================================================
|
||||
# ============================== LICENCE =====================================
|
||||
# ============================================================================
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
#
|
||||
# ============================================================================
|
||||
# ============================== HELP ========================================
|
||||
# ============================================================================
|
||||
# Help : ./check_snmp_cisco_poe.pl --help
|
||||
#
|
||||
# ============================================================================
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
use Net::SNMP;
|
||||
use Getopt::Long;
|
||||
use Scalar::Util qw(looks_like_number);
|
||||
#use lib "/usr/local/nagios/libexec";
|
||||
#use utils qw(%ERRORS $TIMEOUT);
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# ============================== NAGIOS VARIABLES ============================
|
||||
# ============================================================================
|
||||
|
||||
my $TIMEOUT = 15; # This is the global script timeout, not the SNMP timeout
|
||||
my %ERRORS = ('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4);
|
||||
my @Nagios_state = ("UNKNOWN","OK","WARNING","CRITICAL"); # Nagios states coding
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# ============================== OID VARIABLES ===============================
|
||||
# ============================================================================
|
||||
|
||||
# System description
|
||||
my $cisco_pethMainPseEntry_oid = "1.3.6.1.2.1.105.1.3.1.1"; # pethMainPseEntry
|
||||
my $cisco_pethMainPsePower_oid = "1.3.6.1.2.1.105.1.3.1.1.2"; # pethMainPsePower
|
||||
my $cisco_pethMainPseOperStatus_oid = "1.3.6.1.2.1.105.1.3.1.1.3"; # pethMainPseOperStatus
|
||||
my $cisco_pethMainPseConsumptionPower_oid = "1.3.6.1.2.1.105.1.3.1.1.4"; # pethMainPseConsumptionPower
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# ============================== GLOBAL VARIABLES ============================
|
||||
# ============================================================================
|
||||
|
||||
my $Version = '0.3'; # Version number of this script
|
||||
my $o_host = undef; # Hostname
|
||||
my $o_community = undef; # Community
|
||||
my $o_port = 161; # Port
|
||||
my $o_help = undef; # Want some help ?
|
||||
my $o_verb = undef; # Verbose mode
|
||||
my $o_version = undef; # Print version
|
||||
my $o_timeout = undef; # Timeout (Default 5)
|
||||
my $o_version1 = undef; # Use SNMPv1
|
||||
my $o_version2 = undef; # Use SNMPv2c
|
||||
my $o_domain = undef; # Use IPv6
|
||||
my $o_login = undef; # Login for SNMPv3
|
||||
my $o_passwd = undef; # Pass for SNMPv3
|
||||
my $v3protocols = undef; # V3 protocol list.
|
||||
my $o_authproto = 'sha'; # Auth protocol
|
||||
my $o_privproto = 'aes'; # Priv protocol
|
||||
my $o_privpass = undef; # priv password
|
||||
my $o_warning = undef; # Warning threshold
|
||||
my $o_critical = undef; # Critical threshold
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# ============================== SUBROUTINES (FUNCTIONS) =====================
|
||||
# ============================================================================
|
||||
|
||||
# Subroutine: Print version
|
||||
sub p_version {
|
||||
print "check_snmp_cisco_poe version : $Version\n";
|
||||
}
|
||||
|
||||
# Subroutine: Print Usage
|
||||
sub print_usage {
|
||||
print "Usage: $0 [-v] -H <host> [-6] -C <snmp_community> [-2] -w <warning threshold in Watt> -c <critical threshold in Watt> | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] [-t <timeout>] [-V]\n";
|
||||
}
|
||||
|
||||
# Subroutine: Check number
|
||||
sub isnnum { # Return true if arg is not a number
|
||||
my $num = shift;
|
||||
if ( $num =~ /^(\d+\.?\d*)|(^\.\d+)$/ ) { return 0 ;}
|
||||
return 1;
|
||||
}
|
||||
|
||||
# Subroutine: Set final status
|
||||
sub set_status { # Return worst status with this order : OK, unknown, warning, critical
|
||||
my $new_status = shift;
|
||||
my $cur_status = shift;
|
||||
if ($new_status == 1 && $cur_status != 2) {$cur_status = $new_status;}
|
||||
if ($new_status == 2) {$cur_status = $new_status;}
|
||||
if ($new_status == 3 && $cur_status == 0) {$cur_status = $new_status;}
|
||||
return $cur_status;
|
||||
}
|
||||
|
||||
# Subroutine: Check if SNMP table could be retrieved, otherwise give error
|
||||
sub check_snmp_result {
|
||||
my $snmp_table = shift;
|
||||
my $snmp_error_mesg = shift;
|
||||
|
||||
# Check if table is defined and does not contain specified error message.
|
||||
# Had to do string compare it will not work with a status code
|
||||
if (!defined($snmp_table) && $snmp_error_mesg !~ /table is empty or does not exist/) {
|
||||
printf("ERROR: ". $snmp_error_mesg . " : UNKNOWN\n");
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
}
|
||||
}
|
||||
|
||||
# Subroutine: Print complete help
|
||||
sub help {
|
||||
print "\nSNMP Cisco SNMP PoE check plugin for Nagios\nVersion: ",$Version,"\n\n";
|
||||
print_usage();
|
||||
print <<EOT;
|
||||
|
||||
Options:
|
||||
-v, --verbose
|
||||
Print extra debugging information
|
||||
-h, --help
|
||||
Print this help message
|
||||
-H, --hostname=HOST
|
||||
Hostname or IPv4/IPv6 address of host to check
|
||||
-6, --use-ipv6
|
||||
Use IPv6 connection
|
||||
-C, --community=COMMUNITY NAME
|
||||
Community name for the host's SNMP agent
|
||||
-w, --warning=WATT
|
||||
Warning threshold in Watt
|
||||
-c, --critical=WATT
|
||||
Critical threshold in Watt
|
||||
-1, --v1
|
||||
Use SNMPv1
|
||||
-2, --v2c
|
||||
Use SNMPv2c (default)
|
||||
-l, --login=LOGIN ; -x, --passwd=PASSWD
|
||||
Login and auth password for SNMPv3 authentication
|
||||
If no priv password exists, implies AuthNoPriv
|
||||
-X, --privpass=PASSWD
|
||||
Priv password for SNMPv3 (AuthPriv protocol)
|
||||
-L, --protocols=<authproto>,<privproto>
|
||||
<authproto> : Authentication protocol (md5|sha : default sha)
|
||||
<privproto> : Priv protocole (des|aes : default aes)
|
||||
-P, --port=PORT
|
||||
SNMP port (Default 161)
|
||||
-t, --timeout=INTEGER
|
||||
Timeout for SNMP in seconds (Default: 5)
|
||||
-V, --version
|
||||
Prints version number
|
||||
|
||||
Notes:
|
||||
- Check the http://exchange.nagios.org website for new versions.
|
||||
- For questions, problems and patches send me an e-mail (michiel.timmmers AT gmx.net).
|
||||
|
||||
EOT
|
||||
}
|
||||
|
||||
# Subroutine: Verbose output
|
||||
sub verb {
|
||||
my $t=shift;
|
||||
print $t,"\n" if defined($o_verb);
|
||||
}
|
||||
|
||||
# Subroutine: Verbose output
|
||||
sub check_options {
|
||||
Getopt::Long::Configure ("bundling");
|
||||
GetOptions(
|
||||
'v' => \$o_verb, 'verbose' => \$o_verb,
|
||||
'h' => \$o_help, 'help' => \$o_help,
|
||||
'H:s' => \$o_host, 'hostname:s' => \$o_host,
|
||||
'p:i' => \$o_port, 'port:i' => \$o_port,
|
||||
'C:s' => \$o_community, 'community:s' => \$o_community,
|
||||
'l:s' => \$o_login, 'login:s' => \$o_login,
|
||||
'x:s' => \$o_passwd, 'passwd:s' => \$o_passwd,
|
||||
'X:s' => \$o_privpass, 'privpass:s' => \$o_privpass,
|
||||
'L:s' => \$v3protocols, 'protocols:s' => \$v3protocols,
|
||||
't:i' => \$o_timeout, 'timeout:i' => \$o_timeout,
|
||||
'V' => \$o_version, 'version' => \$o_version,
|
||||
'6' => \$o_domain, 'use-ipv6' => \$o_domain,
|
||||
'1' => \$o_version1, 'v1' => \$o_version1,
|
||||
'2' => \$o_version2, 'v2c' => \$o_version2,
|
||||
'w:i' => \$o_warning, 'warning:i' => \$o_warning,
|
||||
'c:i' => \$o_critical, 'critical:i' => \$o_critical
|
||||
);
|
||||
|
||||
|
||||
# Basic checks
|
||||
if (defined($o_timeout) && (isnnum($o_timeout) || ($o_timeout < 2) || ($o_timeout > 60))) {
|
||||
print "Timeout must be >1 and <60 !\n";
|
||||
print_usage();
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
}
|
||||
if (!defined($o_timeout)) {
|
||||
$o_timeout=5;
|
||||
}
|
||||
if (defined ($o_help) ) {
|
||||
help();
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
}
|
||||
|
||||
if (defined($o_version)) {
|
||||
p_version();
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
}
|
||||
|
||||
# check host and filter
|
||||
if ( ! defined($o_host) ) {
|
||||
print_usage();
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
}
|
||||
|
||||
# Check IPv6
|
||||
if (defined ($o_domain)) {
|
||||
$o_domain="udp/ipv6";
|
||||
} else {
|
||||
$o_domain="udp/ipv4";
|
||||
}
|
||||
|
||||
# Check SNMP information
|
||||
if ( !defined($o_community) && (!defined($o_login) || !defined($o_passwd)) ){
|
||||
print "Put SNMP login info!\n";
|
||||
print_usage();
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
}
|
||||
if ((defined($o_login) || defined($o_passwd)) && (defined($o_community) || defined($o_version2)) ){
|
||||
print "Can't mix SNMP v1,v2c,v3 protocols!\n";
|
||||
print_usage();
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
}
|
||||
|
||||
# Check SNMPv3 information
|
||||
if (defined ($v3protocols)) {
|
||||
if (!defined($o_login)) {
|
||||
print "Put SNMP V3 login info with protocols!\n";
|
||||
print_usage();
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
}
|
||||
my @v3proto=split(/,/,$v3protocols);
|
||||
if ((defined ($v3proto[0])) && ($v3proto[0] ne "")) {
|
||||
$o_authproto=$v3proto[0];
|
||||
}
|
||||
if (defined ($v3proto[1])) {
|
||||
$o_privproto=$v3proto[1];
|
||||
}
|
||||
if ((defined ($v3proto[1])) && (!defined($o_privpass))) {
|
||||
print "Put SNMP v3 priv login info with priv protocols!\n";
|
||||
print_usage();
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! defined($o_warning) ) {
|
||||
print_usage();
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
}
|
||||
|
||||
if ( ! defined($o_critical) ) {
|
||||
print_usage();
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# ============================== MAIN ========================================
|
||||
# ============================================================================
|
||||
|
||||
check_options();
|
||||
|
||||
# Check gobal timeout if SNMP screws up
|
||||
if (defined($TIMEOUT)) {
|
||||
verb("Alarm at ".$TIMEOUT." + ".$o_timeout);
|
||||
alarm($TIMEOUT+$o_timeout);
|
||||
} else {
|
||||
verb("no global timeout defined : ".$o_timeout." + 15");
|
||||
alarm ($o_timeout+15);
|
||||
}
|
||||
|
||||
# Report when the script gets "stuck" in a loop or takes to long
|
||||
$SIG{'ALRM'} = sub {
|
||||
print "UNKNOWN: Script timed out\n";
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
};
|
||||
|
||||
# Connect to host
|
||||
my ($session,$error);
|
||||
if (defined($o_login) && defined($o_passwd)) {
|
||||
# SNMPv3 login
|
||||
verb("SNMPv3 login");
|
||||
if (!defined ($o_privpass)) {
|
||||
# SNMPv3 login (Without encryption)
|
||||
verb("SNMPv3 AuthNoPriv login : $o_login, $o_authproto");
|
||||
($session, $error) = Net::SNMP->session(
|
||||
-domain => $o_domain,
|
||||
-hostname => $o_host,
|
||||
-version => 3,
|
||||
-username => $o_login,
|
||||
-authpassword => $o_passwd,
|
||||
-authprotocol => $o_authproto,
|
||||
-timeout => $o_timeout
|
||||
);
|
||||
} else {
|
||||
# SNMPv3 login (With encryption)
|
||||
verb("SNMPv3 AuthPriv login : $o_login, $o_authproto, $o_privproto");
|
||||
($session, $error) = Net::SNMP->session(
|
||||
-domain => $o_domain,
|
||||
-hostname => $o_host,
|
||||
-version => 3,
|
||||
-username => $o_login,
|
||||
-authpassword => $o_passwd,
|
||||
-authprotocol => $o_authproto,
|
||||
-privpassword => $o_privpass,
|
||||
-privprotocol => $o_privproto,
|
||||
-timeout => $o_timeout
|
||||
);
|
||||
}
|
||||
} else {
|
||||
if ((defined ($o_version2)) || (!defined ($o_version1))) {
|
||||
# SNMPv2 login
|
||||
verb("SNMP v2c login");
|
||||
($session, $error) = Net::SNMP->session(
|
||||
-domain => $o_domain,
|
||||
-hostname => $o_host,
|
||||
-version => 2,
|
||||
-community => $o_community,
|
||||
-port => $o_port,
|
||||
-timeout => $o_timeout
|
||||
);
|
||||
} else {
|
||||
# SNMPv1 login
|
||||
verb("SNMP v1 login");
|
||||
($session, $error) = Net::SNMP->session(
|
||||
-domain => $o_domain,
|
||||
-hostname => $o_host,
|
||||
-version => 1,
|
||||
-community => $o_community,
|
||||
-port => $o_port,
|
||||
-timeout => $o_timeout
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
# Check if there are any problems with the session
|
||||
if (!defined($session)) {
|
||||
printf("ERROR opening session: %s.\n", $error);
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
}
|
||||
|
||||
my $exit_val=undef;
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# ============================== Cisco - PoE =================================
|
||||
# ============================================================================
|
||||
|
||||
# Define variables
|
||||
my $output = "";
|
||||
my $output_pd = "";
|
||||
my $final_status = 0;
|
||||
my $result_t;
|
||||
my $index;
|
||||
my @temp_oid;
|
||||
my ($pethMainPsePower,$pethMainPseOperStatus,$pethMainPseConsumptionPower,$module)=(undef,undef,undef,undef);
|
||||
|
||||
# Get SNMP table(s) and check the result
|
||||
my $cisco_pethMainPseEntry = $session->get_table(Baseoid => $cisco_pethMainPseEntry_oid);
|
||||
&check_snmp_result($cisco_pethMainPseEntry,$session->error);
|
||||
|
||||
if (defined($cisco_pethMainPseEntry)) {
|
||||
foreach my $key ( keys %$cisco_pethMainPseEntry) {
|
||||
if ($key =~ /$cisco_pethMainPseOperStatus_oid/) {
|
||||
$key =~ s/$cisco_pethMainPseOperStatus_oid//;
|
||||
|
||||
$module = substr $key, 1;
|
||||
|
||||
# Set the Pse variables
|
||||
$pethMainPsePower = $$cisco_pethMainPseEntry{$cisco_pethMainPsePower_oid.$key};
|
||||
$pethMainPseOperStatus = $$cisco_pethMainPseEntry{$cisco_pethMainPseOperStatus_oid.$key};
|
||||
$pethMainPseConsumptionPower = $$cisco_pethMainPseEntry{$cisco_pethMainPseConsumptionPower_oid.$key};
|
||||
|
||||
if (defined($pethMainPsePower) && defined($pethMainPseOperStatus) && defined($pethMainPseConsumptionPower)){
|
||||
|
||||
if (!looks_like_number($pethMainPsePower) && !looks_like_number($pethMainPseOperStatus) && !looks_like_number($pethMainPseConsumptionPower)) {
|
||||
$output = "Module:".$module." Device does not have PoE";
|
||||
}else{
|
||||
if ($pethMainPseOperStatus != 1){
|
||||
$final_status = 2;
|
||||
$output = "Module:".$module." Power Sourcing Equipment (PSE) is not on";
|
||||
}else{
|
||||
if($pethMainPsePower - $pethMainPseConsumptionPower < $o_warning){
|
||||
$final_status = &set_status(1,$final_status);
|
||||
}
|
||||
|
||||
if($pethMainPsePower - $pethMainPseConsumptionPower < $o_critical){
|
||||
$final_status = &set_status(2,$final_status);
|
||||
}
|
||||
|
||||
if ($output eq ""){
|
||||
$output = "Module:".$module." Available:".$pethMainPsePower." W, Used:".$pethMainPseConsumptionPower." W, Remaining:".($pethMainPsePower - $pethMainPseConsumptionPower)." W";
|
||||
$output_pd = " | M".$module."_Used=".$pethMainPseConsumptionPower.";".($pethMainPsePower - $o_warning).";".($pethMainPsePower - $o_critical).";0;".$pethMainPsePower;
|
||||
}else{
|
||||
$output.= " - Module:".$module." Available:".$pethMainPsePower." W, Used:".$pethMainPseConsumptionPower." W, Remaining:".($pethMainPsePower - $pethMainPseConsumptionPower)." W";
|
||||
$output_pd.= " M".$module."_Used=".$pethMainPseConsumptionPower.";".($pethMainPsePower - $o_warning).";".($pethMainPsePower - $o_critical).";0;".$pethMainPsePower;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}else{
|
||||
$output = "Device does not have PoE";
|
||||
}
|
||||
|
||||
if ($final_status == 3) {
|
||||
print $output," : UNKNOWN\n";
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
}
|
||||
|
||||
if ($final_status == 2) {
|
||||
print $output," : CRITICAL",$output_pd,"\n";
|
||||
exit $ERRORS{"CRITICAL"};
|
||||
}
|
||||
|
||||
if ($final_status == 1) {
|
||||
print $output," : WARNING",$output_pd,"\n";
|
||||
exit $ERRORS{"WARNING"};
|
||||
}
|
||||
|
||||
print $output," : OK",$output_pd,"\n";
|
||||
exit $ERRORS{"OK"};
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# ============================== NO CHECK DEFINED ============================
|
||||
# ============================================================================
|
||||
|
||||
print "Unknown check type : UNKNOWN\n";
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
|
|
@ -0,0 +1,171 @@
|
|||
#!/bin/sh
|
||||
# Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+
|
||||
# Except of function urlencode which is Copyright (C) by Brian White (brian@aljex.com) used under MIT license
|
||||
|
||||
PROG="`basename $0`"
|
||||
ICINGA2HOST="`hostname`"
|
||||
MAILBIN="mail"
|
||||
|
||||
if [ -z "`which $MAILBIN`" ] ; then
|
||||
echo "$MAILBIN not found in \$PATH. Consider installing it."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
## Function helpers
|
||||
Usage() {
|
||||
cat << EOF
|
||||
|
||||
Required parameters:
|
||||
-d LONGDATETIME (\$icinga.long_date_time\$)
|
||||
-l HOSTNAME (\$host.name\$)
|
||||
-n HOSTDISPLAYNAME (\$host.display_name\$)
|
||||
-o HOSTOUTPUT (\$host.output\$)
|
||||
-r USEREMAIL (\$user.email\$)
|
||||
-s HOSTSTATE (\$host.state\$)
|
||||
-t NOTIFICATIONTYPE (\$notification.type\$)
|
||||
|
||||
Optional parameters:
|
||||
-4 HOSTADDRESS (\$address\$)
|
||||
-6 HOSTADDRESS6 (\$address6\$)
|
||||
-b NOTIFICATIONAUTHORNAME (\$notification.author\$)
|
||||
-c NOTIFICATIONCOMMENT (\$notification.comment\$)
|
||||
-i ICINGAWEB2URL (\$notification_icingaweb2url\$, Default: unset)
|
||||
-f MAILFROM (\$notification_mailfrom\$, requires GNU mailutils (Debian/Ubuntu) or mailx (RHEL/SUSE))
|
||||
-v (\$notification_sendtosyslog\$, Default: false)
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
Help() {
|
||||
Usage;
|
||||
exit 0;
|
||||
}
|
||||
|
||||
Error() {
|
||||
if [ "$1" ]; then
|
||||
echo $1
|
||||
fi
|
||||
Usage;
|
||||
exit 1;
|
||||
}
|
||||
|
||||
urlencode() {
|
||||
local LANG=C i=0 c e s="$1"
|
||||
|
||||
while [ $i -lt ${#1} ]; do
|
||||
[ "$i" -eq 0 ] || s="${s#?}"
|
||||
c=${s%"${s#?}"}
|
||||
[ -z "${c#[[:alnum:].~_-]}" ] || c=$(printf '%%%02X' "'$c")
|
||||
e="${e}${c}"
|
||||
i=$((i + 1))
|
||||
done
|
||||
echo "$e"
|
||||
}
|
||||
|
||||
## Main
|
||||
while getopts 4:6::b:c:d:f:hi:l:n:o:r:s:t:v: opt
|
||||
do
|
||||
case "$opt" in
|
||||
4) HOSTADDRESS=$OPTARG ;;
|
||||
6) HOSTADDRESS6=$OPTARG ;;
|
||||
b) NOTIFICATIONAUTHORNAME=$OPTARG ;;
|
||||
c) NOTIFICATIONCOMMENT=$OPTARG ;;
|
||||
d) LONGDATETIME=$OPTARG ;; # required
|
||||
f) MAILFROM=$OPTARG ;;
|
||||
h) Help ;;
|
||||
i) ICINGAWEB2URL=$OPTARG ;;
|
||||
l) HOSTNAME=$OPTARG ;; # required
|
||||
n) HOSTDISPLAYNAME=$OPTARG ;; # required
|
||||
o) HOSTOUTPUT=$OPTARG ;; # required
|
||||
r) USEREMAIL=$OPTARG ;; # required
|
||||
s) HOSTSTATE=$OPTARG ;; # required
|
||||
t) NOTIFICATIONTYPE=$OPTARG ;; # required
|
||||
v) VERBOSE=$OPTARG ;;
|
||||
\?) echo "ERROR: Invalid option -$OPTARG" >&2
|
||||
Error ;;
|
||||
:) echo "Missing option argument for -$OPTARG" >&2
|
||||
Error ;;
|
||||
*) echo "Unimplemented option: -$OPTARG" >&2
|
||||
Error ;;
|
||||
esac
|
||||
done
|
||||
|
||||
shift $((OPTIND - 1))
|
||||
|
||||
## Keep formatting in sync with mail-service-notification.sh
|
||||
for P in LONGDATETIME HOSTNAME HOSTDISPLAYNAME HOSTOUTPUT HOSTSTATE USEREMAIL NOTIFICATIONTYPE ; do
|
||||
eval "PAR=\$${P}"
|
||||
|
||||
if [ ! "$PAR" ] ; then
|
||||
Error "Required parameter '$P' is missing."
|
||||
fi
|
||||
done
|
||||
|
||||
## Build the message's subject
|
||||
SUBJECT="[$NOTIFICATIONTYPE] Host $HOSTDISPLAYNAME is $HOSTSTATE!"
|
||||
|
||||
## Build the notification message
|
||||
NOTIFICATION_MESSAGE=`cat << EOF
|
||||
***** Host Monitoring on $ICINGA2HOST *****
|
||||
|
||||
$HOSTDISPLAYNAME is $HOSTSTATE!
|
||||
|
||||
Info: $HOSTOUTPUT
|
||||
|
||||
When: $LONGDATETIME
|
||||
Host: $HOSTNAME
|
||||
EOF
|
||||
`
|
||||
|
||||
## Check whether IPv4 was specified.
|
||||
if [ -n "$HOSTADDRESS" ] ; then
|
||||
NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE
|
||||
IPv4: $HOSTADDRESS"
|
||||
fi
|
||||
|
||||
## Check whether IPv6 was specified.
|
||||
if [ -n "$HOSTADDRESS6" ] ; then
|
||||
NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE
|
||||
IPv6: $HOSTADDRESS6"
|
||||
fi
|
||||
|
||||
## Check whether author and comment was specified.
|
||||
if [ -n "$NOTIFICATIONCOMMENT" ] ; then
|
||||
NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE
|
||||
|
||||
Comment by $NOTIFICATIONAUTHORNAME:
|
||||
$NOTIFICATIONCOMMENT"
|
||||
fi
|
||||
|
||||
## Check whether Icinga Web 2 URL was specified.
|
||||
if [ -n "$ICINGAWEB2URL" ] ; then
|
||||
NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE
|
||||
|
||||
$ICINGAWEB2URL/monitoring/host/show?host=$(urlencode "$HOSTNAME")"
|
||||
fi
|
||||
|
||||
## Check whether verbose mode was enabled and log to syslog.
|
||||
if [ "$VERBOSE" == "true" ] ; then
|
||||
logger "$PROG sends $SUBJECT => $USEREMAIL"
|
||||
fi
|
||||
|
||||
## Send the mail using the $MAILBIN command.
|
||||
## If an explicit sender was specified, try to set it.
|
||||
if [ -n "$MAILFROM" ] ; then
|
||||
|
||||
## Modify this for your own needs!
|
||||
|
||||
## Debian/Ubuntu use mailutils which requires `-a` to append the header
|
||||
if [ -f /etc/debian_version ]; then
|
||||
/usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" | tr -d '\015' \
|
||||
| $MAILBIN -a "From: $MAILFROM" -s "$SUBJECT" $USEREMAIL
|
||||
## Other distributions (RHEL/SUSE/etc.) prefer mailx which sets a sender address with `-r`
|
||||
else
|
||||
/usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" | tr -d '\015' \
|
||||
| $MAILBIN -r "$MAILFROM" -s "$SUBJECT" $USEREMAIL
|
||||
fi
|
||||
|
||||
else
|
||||
/usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" | tr -d '\015' \
|
||||
| $MAILBIN -s "$SUBJECT" $USEREMAIL
|
||||
fi
|
|
@ -0,0 +1,176 @@
|
|||
#!/bin/sh
|
||||
# Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+
|
||||
# Except of function urlencode which is Copyright (C) by Brian White (brian@aljex.com) used under MIT license
|
||||
|
||||
PROG="`basename $0`"
|
||||
ICINGA2HOST="`hostname`"
|
||||
MAILBIN="mail"
|
||||
|
||||
if [ -z "`which $MAILBIN`" ] ; then
|
||||
echo "$MAILBIN not found in \$PATH. Consider installing it."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
## Function helpers
|
||||
Usage() {
|
||||
cat << EOF
|
||||
|
||||
Required parameters:
|
||||
-d LONGDATETIME (\$icinga.long_date_time\$)
|
||||
-e SERVICENAME (\$service.name\$)
|
||||
-l HOSTNAME (\$host.name\$)
|
||||
-n HOSTDISPLAYNAME (\$host.display_name\$)
|
||||
-o SERVICEOUTPUT (\$service.output\$)
|
||||
-r USEREMAIL (\$user.email\$)
|
||||
-s SERVICESTATE (\$service.state\$)
|
||||
-t NOTIFICATIONTYPE (\$notification.type\$)
|
||||
-u SERVICEDISPLAYNAME (\$service.display_name\$)
|
||||
|
||||
Optional parameters:
|
||||
-4 HOSTADDRESS (\$address\$)
|
||||
-6 HOSTADDRESS6 (\$address6\$)
|
||||
-b NOTIFICATIONAUTHORNAME (\$notification.author\$)
|
||||
-c NOTIFICATIONCOMMENT (\$notification.comment\$)
|
||||
-i ICINGAWEB2URL (\$notification_icingaweb2url\$, Default: unset)
|
||||
-f MAILFROM (\$notification_mailfrom\$, requires GNU mailutils (Debian/Ubuntu) or mailx (RHEL/SUSE))
|
||||
-v (\$notification_sendtosyslog\$, Default: false)
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
Help() {
|
||||
Usage;
|
||||
exit 0;
|
||||
}
|
||||
|
||||
Error() {
|
||||
if [ "$1" ]; then
|
||||
echo $1
|
||||
fi
|
||||
Usage;
|
||||
exit 1;
|
||||
}
|
||||
|
||||
urlencode() {
|
||||
local LANG=C i=0 c e s="$1"
|
||||
|
||||
while [ $i -lt ${#1} ]; do
|
||||
[ "$i" -eq 0 ] || s="${s#?}"
|
||||
c=${s%"${s#?}"}
|
||||
[ -z "${c#[[:alnum:].~_-]}" ] || c=$(printf '%%%02X' "'$c")
|
||||
e="${e}${c}"
|
||||
i=$((i + 1))
|
||||
done
|
||||
echo "$e"
|
||||
}
|
||||
|
||||
## Main
|
||||
while getopts 4:6:b:c:d:e:f:hi:l:n:o:r:s:t:u:v: opt
|
||||
do
|
||||
case "$opt" in
|
||||
4) HOSTADDRESS=$OPTARG ;;
|
||||
6) HOSTADDRESS6=$OPTARG ;;
|
||||
b) NOTIFICATIONAUTHORNAME=$OPTARG ;;
|
||||
c) NOTIFICATIONCOMMENT=$OPTARG ;;
|
||||
d) LONGDATETIME=$OPTARG ;; # required
|
||||
e) SERVICENAME=$OPTARG ;; # required
|
||||
f) MAILFROM=$OPTARG ;;
|
||||
h) Usage ;;
|
||||
i) ICINGAWEB2URL=$OPTARG ;;
|
||||
l) HOSTNAME=$OPTARG ;; # required
|
||||
n) HOSTDISPLAYNAME=$OPTARG ;; # required
|
||||
o) SERVICEOUTPUT=$OPTARG ;; # required
|
||||
r) USEREMAIL=$OPTARG ;; # required
|
||||
s) SERVICESTATE=$OPTARG ;; # required
|
||||
t) NOTIFICATIONTYPE=$OPTARG ;; # required
|
||||
u) SERVICEDISPLAYNAME=$OPTARG ;; # required
|
||||
v) VERBOSE=$OPTARG ;;
|
||||
\?) echo "ERROR: Invalid option -$OPTARG" >&2
|
||||
Usage ;;
|
||||
:) echo "Missing option argument for -$OPTARG" >&2
|
||||
Usage ;;
|
||||
*) echo "Unimplemented option: -$OPTARG" >&2
|
||||
Usage ;;
|
||||
esac
|
||||
done
|
||||
|
||||
shift $((OPTIND - 1))
|
||||
|
||||
## Keep formatting in sync with mail-host-notification.sh
|
||||
for P in LONGDATETIME HOSTNAME HOSTDISPLAYNAME SERVICENAME SERVICEDISPLAYNAME SERVICEOUTPUT SERVICESTATE USEREMAIL NOTIFICATIONTYPE ; do
|
||||
eval "PAR=\$${P}"
|
||||
|
||||
if [ ! "$PAR" ] ; then
|
||||
Error "Required parameter '$P' is missing."
|
||||
fi
|
||||
done
|
||||
|
||||
## Build the message's subject
|
||||
SUBJECT="[$NOTIFICATIONTYPE] $SERVICEDISPLAYNAME on $HOSTDISPLAYNAME is $SERVICESTATE!"
|
||||
|
||||
## Build the notification message
|
||||
NOTIFICATION_MESSAGE=`cat << EOF
|
||||
***** Service Monitoring on $ICINGA2HOST *****
|
||||
|
||||
$SERVICEDISPLAYNAME on $HOSTDISPLAYNAME is $SERVICESTATE!
|
||||
|
||||
Info: $SERVICEOUTPUT
|
||||
|
||||
When: $LONGDATETIME
|
||||
Service: $SERVICENAME
|
||||
Host: $HOSTNAME
|
||||
EOF
|
||||
`
|
||||
|
||||
## Check whether IPv4 was specified.
|
||||
if [ -n "$HOSTADDRESS" ] ; then
|
||||
NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE
|
||||
IPv4: $HOSTADDRESS"
|
||||
fi
|
||||
|
||||
## Check whether IPv6 was specified.
|
||||
if [ -n "$HOSTADDRESS6" ] ; then
|
||||
NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE
|
||||
IPv6: $HOSTADDRESS6"
|
||||
fi
|
||||
|
||||
## Check whether author and comment was specified.
|
||||
if [ -n "$NOTIFICATIONCOMMENT" ] ; then
|
||||
NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE
|
||||
|
||||
Comment by $NOTIFICATIONAUTHORNAME:
|
||||
$NOTIFICATIONCOMMENT"
|
||||
fi
|
||||
|
||||
## Check whether Icinga Web 2 URL was specified.
|
||||
if [ -n "$ICINGAWEB2URL" ] ; then
|
||||
NOTIFICATION_MESSAGE="$NOTIFICATION_MESSAGE
|
||||
|
||||
$ICINGAWEB2URL/monitoring/service/show?host=$(urlencode "$HOSTNAME")&service=$(urlencode "$SERVICENAME")"
|
||||
fi
|
||||
|
||||
## Check whether verbose mode was enabled and log to syslog.
|
||||
if [ "$VERBOSE" == "true" ] ; then
|
||||
logger "$PROG sends $SUBJECT => $USEREMAIL"
|
||||
fi
|
||||
|
||||
## Send the mail using the $MAILBIN command.
|
||||
## If an explicit sender was specified, try to set it.
|
||||
if [ -n "$MAILFROM" ] ; then
|
||||
|
||||
## Modify this for your own needs!
|
||||
|
||||
## Debian/Ubuntu use mailutils which requires `-a` to append the header
|
||||
if [ -f /etc/debian_version ]; then
|
||||
/usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" | tr -d '\015' \
|
||||
| $MAILBIN -a "From: $MAILFROM" -s "$SUBJECT" $USEREMAIL
|
||||
## Other distributions (RHEL/SUSE/etc.) prefer mailx which sets a sender address with `-r`
|
||||
else
|
||||
/usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" | tr -d '\015' \
|
||||
| $MAILBIN -r "$MAILFROM" -s "$SUBJECT" $USEREMAIL
|
||||
fi
|
||||
|
||||
else
|
||||
/usr/bin/printf "%b" "$NOTIFICATION_MESSAGE" | tr -d '\015' \
|
||||
| $MAILBIN -s "$SUBJECT" $USEREMAIL
|
||||
fi
|
|
@ -0,0 +1,157 @@
|
|||
#!/bin/ash
|
||||
# set -x
|
||||
START=`date +%s`
|
||||
#INTERFACES=`ls /sys/class/net/`
|
||||
|
||||
|
||||
while getopts "w:c:h" OPT; do
|
||||
case $OPT in
|
||||
"w") warn=$OPTARG;;
|
||||
"c") crit=$OPTARG;;
|
||||
"h") help;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
WARNING=$(echo "$warn * 1000000" | bc)
|
||||
CRITICAL=$(echo "$crit * 1000000" | bc)
|
||||
|
||||
#which iftop > /dev/null 2>&1
|
||||
#if [ $? != 0 ]; then
|
||||
# echo "Iftop not installed"
|
||||
# exit 1
|
||||
#fi
|
||||
|
||||
IFTOP="/usr/bin/iftop"
|
||||
PERFDATA=""
|
||||
overloaded=""
|
||||
ex_st=0
|
||||
int=0
|
||||
int_ol=0
|
||||
for i in eth0;
|
||||
do
|
||||
#IF_UP=`cat /sys/class/net/$i/operstate`
|
||||
if [ -e "/sys/class/net/$i/operstate" ]; then
|
||||
IF_UP=`cat /sys/class/net/$i/operstate 2>&1`
|
||||
else
|
||||
continue
|
||||
fi
|
||||
if [ $IF_UP == "up" ] || [ $IF_UP == "unknown" ]; then
|
||||
INTERFACE=$i
|
||||
TMP_FILE="/tmp/int_${INTERFACE}_cache"
|
||||
|
||||
$IFTOP -i $INTERFACE -n -t -s 2 > $TMP_FILE 2>&1
|
||||
if [ $? != 0 ]; then
|
||||
rm -f $TMP_FILE
|
||||
continue
|
||||
fi
|
||||
|
||||
##### TOTAL ########
|
||||
TOTAL=`cat $TMP_FILE | grep -i 'Total send and receive rate'| awk -F ":" '{print $2}'| awk '{print $1}'`
|
||||
####################
|
||||
##### SEND RATE ####
|
||||
SEND=`cat $TMP_FILE | grep -i 'Total send rate'| awk -F ":" '{print $2}'| awk '{print $1}'`
|
||||
###################
|
||||
#### REC RATE #####
|
||||
REC=`cat $TMP_FILE | grep -i 'Total receive rate'| awk -F ":" '{print $2}'| awk '{print $1}'`
|
||||
##################
|
||||
rm -f $TMP_FILE 2>&1
|
||||
|
||||
|
||||
|
||||
metric=`echo "$TOTAL" | grep -Eo '[[:alpha:]]+'`
|
||||
TOTAL=${TOTAL/${metric}}
|
||||
TOTAL=`echo "$TOTAL" | sed 's/,/./'`
|
||||
|
||||
if [ $metric == "Mb" ]; then
|
||||
TOTAL=$(echo "$TOTAL * 1000000" | bc)
|
||||
elif [ $metric == "Kb" ]; then
|
||||
TOTAL=$(echo "$TOTAL * 1000" | bc)
|
||||
elif [ $metric == "b" ]; then
|
||||
TOTAL=$TOTAL
|
||||
else
|
||||
TOTAL=$TOTAL
|
||||
fi
|
||||
TOTAL=${TOTAL%.*}
|
||||
|
||||
metric=`echo "$SEND" | grep -Eo '[[:alpha:]]+'`
|
||||
SEND=${SEND/${metric}}
|
||||
SEND=`echo "$SEND" | sed 's/,/./'`
|
||||
|
||||
if [ $metric == "Mb" ]; then
|
||||
SEND=$(echo "$SEND * 1000000" | bc)
|
||||
elif [ $metric == "Kb" ]; then
|
||||
SEND=$(echo "$SEND * 1000" | bc)
|
||||
elif [ $metric == "b" ]; then
|
||||
SEND=$SEND
|
||||
else
|
||||
SEND=$SEND
|
||||
fi
|
||||
SEND=${SEND%.*}
|
||||
|
||||
metric=`echo "$REC" | grep -Eo '[[:alpha:]]+'`
|
||||
REC=${REC/${metric}}
|
||||
REC=`echo "$REC" | sed 's/,/./'`
|
||||
|
||||
if [ $metric == "Mb" ]; then
|
||||
REC=$(echo "$REC * 1000000" | bc)
|
||||
elif [ $metric == "Kb" ]; then
|
||||
REC=$(echo "$REC * 1000" | bc)
|
||||
elif [ $metric == "b" ]; then
|
||||
REC=$REC
|
||||
else
|
||||
REC=$REC
|
||||
fi
|
||||
REC=${REC%.*}
|
||||
|
||||
if [ -z $TOTAL ] ; then
|
||||
TOTAL=0
|
||||
fi
|
||||
if [ $TOTAL -ge $CRITICAL ]; then
|
||||
overloaded="$overloaded $INTERFACE"
|
||||
int_ol=$(echo "$int_ol + 1" | bc)
|
||||
ex_st=2
|
||||
elif [ $TOTAL -lt $CRITICAL ] && [ $TOTAL -ge $WARNING ]; then
|
||||
overloaded="$overloaded $INTERFACE"
|
||||
int_ol=$(echo "$int_ol + 1" | bc)
|
||||
if [ $ex_st -eq 0 ]; then
|
||||
ex_st=1
|
||||
fi
|
||||
elif [ $TOTAL -le $WARNING ]; then
|
||||
if [ $ex_st -eq 0 ]; then
|
||||
ex_st=0
|
||||
fi
|
||||
else
|
||||
echo 0 > /dev/null
|
||||
|
||||
fi
|
||||
|
||||
int=$(echo "$int + 1" | bc)
|
||||
PERFDATA="$PERFDATA Total_$INTERFACE=${TOTAL};${WARNING};${CRITICAL};0;${CRITICAL} Send_$INTERFACE=${SEND}; Receive_$INTERFACE=${REC};"
|
||||
|
||||
elif [ $IF_UP == "down" ]; then
|
||||
echo 0 > /dev/null
|
||||
else
|
||||
echo 0 > /dev/null
|
||||
fi
|
||||
done
|
||||
|
||||
END=`date +%s`
|
||||
EXEC_TIME=$(($END-$START))
|
||||
PERFDATA="$PERFDATA ExecTime=$EXEC_TIME;"
|
||||
|
||||
if [ $ex_st -eq 0 ]; then
|
||||
echo "OK: $int interfaces under expected load | $PERFDATA"
|
||||
exit $ex_st
|
||||
|
||||
elif [ $ex_st -eq 1 ]; then
|
||||
echo "Warning: $int_ol overloaded interfaces ($overloaded); $int interfaces OK | $PERFDATA"
|
||||
exit $ex_st
|
||||
elif [ $ex_st -eq 2 ]; then
|
||||
echo "Critical: $int_ol overloaded interfaces ($overloaded); $int interfaces OK | $PERFDATA"
|
||||
exit $ex_st
|
||||
else
|
||||
echo "Unknown: $int_ol overloaded interfaces ($overloaded). $int interfaces OK | $PERFDATA"
|
||||
exit 3
|
||||
fi
|
||||
|
|
@ -0,0 +1,107 @@
|
|||
#!/bin/bash
|
||||
|
||||
ICINGA_HOSTNAME="vin.openfest.org/icingaweb2"
|
||||
SLACK_WEBHOOK_URL="https://hooks.slack.com/services/some/other/tocken"
|
||||
SLACK_CHANNEL="#noc"
|
||||
SLACK_BOTNAME="icinga2"
|
||||
|
||||
|
||||
if [ "$NOTIFICATIONTYPE" = "ACKNOWLEDGEMENT" ] || [ "$NOTIFICATIONTYPE" = "DOWNTIMESTART" ] || [ "$NOTIFICATIONTYPE" = "DOWNTIMEEND" ]
|
||||
then
|
||||
COLOR="#FFB6C1"
|
||||
read -d '' PAYLOAD << EOF
|
||||
{
|
||||
"channel": "${SLACK_CHANNEL}",
|
||||
"username": "${SLACK_BOTNAME}",
|
||||
"attachments": [
|
||||
{
|
||||
"fallback": "${NOTIFICATIONTYPE}: ${SERVICESTATE}: ${HOSTDISPLAYNAME} - ${SERVICEDISPLAYNAME}",
|
||||
"color": "${COLOR}",
|
||||
"fields": [
|
||||
{
|
||||
"title": "${NOTIFICATIONTYPE}",
|
||||
"value": "${NOTIFICATIONCOMMENT} - ${NOTIFICATIONAUTHORNAME}"
|
||||
},
|
||||
{
|
||||
"title": "Service output",
|
||||
"value": "${SERVICEOUTPUT}",
|
||||
"short": false
|
||||
},
|
||||
{
|
||||
"title": "Host",
|
||||
"value": "<${ICINGA_HOSTNAME}/monitoring/host/services?host=${HOSTNAME}|${HOSTDISPLAYNAME}>",
|
||||
"short": true
|
||||
},
|
||||
{
|
||||
"title": "Service",
|
||||
"value": "<${ICINGA_HOSTNAME}/monitoring/service/show?host=${HOSTNAME}&service=${SERVICEDESC}|${SERVICEDISPLAYNAME}>",
|
||||
"short": true
|
||||
},
|
||||
{
|
||||
"title": "State",
|
||||
"value": "${SERVICESTATE}",
|
||||
"short": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
EOF
|
||||
else
|
||||
|
||||
#Set the message icon based on ICINGA service state
|
||||
if [ "$SERVICESTATE" = "CRITICAL" ]
|
||||
then
|
||||
COLOR="danger"
|
||||
elif [ "$SERVICESTATE" = "WARNING" ]
|
||||
then
|
||||
COLOR="warning"
|
||||
elif [ "$SERVICESTATE" = "OK" ]
|
||||
then
|
||||
COLOR="good"
|
||||
elif [ "$SERVICESTATE" = "UNKNOWN" ]
|
||||
then
|
||||
COLOR="#800080"
|
||||
else
|
||||
COLOR=""
|
||||
fi
|
||||
|
||||
#Send message to Slack
|
||||
read -d '' PAYLOAD << EOF
|
||||
{
|
||||
"channel": "${SLACK_CHANNEL}",
|
||||
"username": "${SLACK_BOTNAME}",
|
||||
"attachments": [
|
||||
{
|
||||
"fallback": "${SERVICESTATE}: ${HOSTDISPLAYNAME} - ${SERVICEDISPLAYNAME}",
|
||||
"color": "${COLOR}",
|
||||
"fields": [
|
||||
{
|
||||
"title": "Service output",
|
||||
"value": "${SERVICEOUTPUT}",
|
||||
"short": false
|
||||
},
|
||||
{
|
||||
"title": "Host",
|
||||
"value": "<${ICINGA_HOSTNAME}/monitoring/host/services?host=${HOSTNAME}|${HOSTDISPLAYNAME}>",
|
||||
"short": true
|
||||
},
|
||||
{
|
||||
"title": "Service",
|
||||
"value": "<${ICINGA_HOSTNAME}/monitoring/service/show?host=${HOSTNAME}&service=${SERVICEDESC}|${SERVICEDISPLAYNAME}>",
|
||||
"short": true
|
||||
},
|
||||
{
|
||||
"title": "State",
|
||||
"value": "${SERVICESTATE}",
|
||||
"short": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
EOF
|
||||
|
||||
fi
|
||||
|
||||
curl --connect-timeout 30 --max-time 60 -s -S -X POST -H 'Content-type: application/json' --data "${PAYLOAD}" "${SLACK_WEBHOOK_URL}"
|
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* 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 for distributed setups with masters,
|
||||
* satellites and clients.
|
||||
* This is required to sync configuration commands,
|
||||
* templates, apply rules, etc. to satellite and clients.
|
||||
* All nodes require the same configuration and must
|
||||
* have `accept_config` enabled in the `api` feature.
|
||||
*/
|
||||
|
||||
object Zone "global-templates" {
|
||||
global = true
|
||||
}
|
||||
|
||||
/*
|
||||
* Defines a global zone for the Icinga Director.
|
||||
* This is required to sync configuration commands,
|
||||
* templates, apply rules, etc. to satellite and clients.
|
||||
* All nodes require the same configuration and must
|
||||
* have `accept_config` enabled in the `api` feature.
|
||||
*/
|
||||
|
||||
object Zone "director-global" {
|
||||
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" ]
|
||||
}
|
||||
*/
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
Please check the documentation for more details:
|
||||
https://icinga.com/docs/icinga2/latest/doc/06-distributed-monitoring/
|
|
@ -0,0 +1,3 @@
|
|||
[icingaweb2]
|
||||
backend = "db"
|
||||
resource = "icingaweb_db"
|
|
@ -0,0 +1,10 @@
|
|||
[global]
|
||||
show_stacktraces = "1"
|
||||
show_application_state_messages = "1"
|
||||
config_backend = "db"
|
||||
config_resource = "icingaweb_db"
|
||||
|
||||
[logging]
|
||||
log = "file"
|
||||
level = "WARNING"
|
||||
file = "/var/log/icingaweb2/icingaweb2.log"
|
|
@ -0,0 +1,3 @@
|
|||
[icingaweb2]
|
||||
backend = "db"
|
||||
resource = "icingaweb_db"
|
|
@ -0,0 +1,4 @@
|
|||
[graphite]
|
||||
metric_prefix = icinga
|
||||
url = https://vin.openfest.org:8443
|
||||
args_template = "&target=$target$&source=0&width=300&height=120&hideAxes=true&lineWidth=1&hideLegend=true&hideAxes=false&colorList=049BAF&bgcolor=white&fgcolor=blue&minorLine=green"
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue