aboutsummaryrefslogtreecommitdiff
path: root/files/usr/local/etc/icinga2/conf.d/commands.conf.icinga_server
blob: f8017ece82b83ff893cfee65250b114189617b7e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
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 }}
}