aboutsummaryrefslogtreecommitdiff
path: root/files/usr/local/etc/icinga2/conf.d/commands.conf.icinga_server
diff options
context:
space:
mode:
Diffstat (limited to 'files/usr/local/etc/icinga2/conf.d/commands.conf.icinga_server')
-rw-r--r--files/usr/local/etc/icinga2/conf.d/commands.conf.icinga_server207
1 files changed, 178 insertions, 29 deletions
diff --git a/files/usr/local/etc/icinga2/conf.d/commands.conf.icinga_server b/files/usr/local/etc/icinga2/conf.d/commands.conf.icinga_server
index dd78f14..f8017ec 100644
--- a/files/usr/local/etc/icinga2/conf.d/commands.conf.icinga_server
+++ b/files/usr/local/etc/icinga2/conf.d/commands.conf.icinga_server
@@ -1,40 +1,189 @@
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$"
- HOSTNOTES = "$host.notes$"
+ 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$"
+ }
+ "-X" = "$notification_hostnotes$"
+ "-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$"
+ notification_hostnotes = "$host.notes$"
}
}
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$"
- HOSTNOTES = "$host.notes$"
- SERVICENOTES = "$service.notes$"
+ 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$"
+ }
+ "-X" = "$notification_hostnotes$"
+ "-x" = "$notification_servicenotes$"
+ "-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$"
+ notification_hostnotes = "$host.notes$"
+ notification_servicenotes = "$service.notes$"
+ }
+}
+
+object CheckCommand "eapol" {
+ command = [ PluginDir + "/check_eapol" ]
+ arguments = {
+ "-c" = {
+ value = "$eapol_config_file$"
+ required = true
+ description = "Path to wpa_supplicant config file"
+ }
+ "-a" = {
+ value = "$eapol_address$"
+ required = true
+ description = "IP address of the RADIUS server"
+ }
+ "-p" = {
+ value = "$eapol_port$"
+ required = true
+ description = "Port of the RADIUS server"
+ }
+ "-s" = {
+ value = "$eapol_secret$"
+ required = true
+ description = "Shared secret with the RADIUS server"
+ }
+ "-t" = {
+ value = "$eapol_timeout$"
+ description = "Timeout in seconds"
+ }
+ "-d" = {
+ set_if = "$eapol_debug$"
+ description = "Enable debugging output"
+ }
}
+
+ vars.eapol_timeout = 5
+ vars.eapol_port = 1812
+ vars.eapol_address = "$host.address$"
+ vars.eapol_debug = false
+}
+
+object CheckCommand "smtp2" {
+ import "smtp"
+ arguments += {
+ "-L" = {
+ set_if = "$smtp_lmtp$"
+ description = "Send LHLO instead of HELO/EHLO"
+ }
+ }
+}
+
+object CheckCommand "mailq_by_ssh" {
+ import "mailq"
+ import "by_ssh"
+ vars.by_ssh_command = {{ get_check_command("mailq").command }}
+ vars.by_ssh_arguments = {{ get_check_command("mailq").arguments }}
}