aboutsummaryrefslogblamecommitdiff
path: root/files/usr/local/etc/icinga2/conf.d/commands.conf.icinga_server
blob: f8017ece82b83ff893cfee65250b114189617b7e (plain) (tree)
1
2
3


                                                                






















































                                                                                                   





                                                                   




































































































                                                                                                   
   





















                                                                    
 
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$"
    }
    "-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" ]

  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 }}
}