notification_command = "mail-notification"
users = [ "icingaadmin" ]
- assign where service.name == "ping4"
+ assign where service.name == "mysql"
}
> **Note**
display_name = "Icinga 2nd Level"
enable_notifications = true
- vars.mobile = "+49123456781"
+ vars.mobile = "+1 555 424642"
}
object User "icinga-oncall-1st-level" {
display_name = "Icinga 1st Level"
enable_notifications = true
- vars.mobile = "+49123456782"
+ vars.mobile = "+1 555 424642"
}
}
}
template User "generic-windows-mssql-users" {
- groups = [ "windows-mssql-admins" ]
+ groups += [ "windows-mssql-admins" ]
}
object User "win-mssql-noc" {
vars.email = "ops@example.com"
}
-
- apply Service "ping4" {
- import "generic-notification"
- notification_command = "mail-notification"
- user_groups = [ "windows-admins" ]
- }
Use the `notification_period` attribute to assign time periods to
`Notification` objects:
- apply Notification "mail" to Host {
+ object Notification "mail" {
import "generic-notification"
+ host_name = "localhost"
+
notification_command = "mail-notification"
users = [ "icingaadmin" ]
notification_period = "workhours"
-
- assign where host.name == "localhost"
}
> **Note**
>
-> If you are not using any web interface or addon requiring this output
-> do not enable this feature.
+> If you are not using any web interface or addon which uses these files
+> you can safely disable this feature.
> **Note**
>
]
}
- apply Service "swap" {
+ object Service "swap" {
import "generic-service"
+
+ host_name = "remote-ssh-host"
+
check_command = "check_by_ssh_swap"
vars = {
"warn" = "50%"
"crit" = "75%"
}
-
- assign where host.name == "remote-ssh-host"
}
#### NRPE
]
}
- apply Service "users" {
+ object Service "users" {
import "generic-service"
+ host_name = "remote-nrpe-host"
+
check_command = "check_nrpe"
vars.remote_nrpe_command = "check_users"
-
- assign where host.name == "remote-nrpe-host"
}
nrpe.cfg:
}
}
- apply Service "users" {
+ object Service "users" {
import "generic-service"
+ host_name = "remote-windows-host"
+
check_command = "check_nscp"
vars += {
warn = "70"
crit = "80"
}
-
- assign where host.name == "remote-windows-host"
}
For details on the `NSClient++` configuration please refer to the [official documentation](http://www.nsclient.org/nscp/wiki/doc/configuration/0.4.x).
>
> The format of the `NSClient++` configuration file has changed from 0.3.x to 0.4!
-
#### Icinga 2 Agent
A dedicated Icinga 2 agent supporting all platforms and using the native
The [Icinga 2 Vagrant Demo VM](#vagrant) ships a demo integration and further samples.
-
#### SNMP Traps
SNMP Traps can be received and filtered by using [SNMPTT](http://snmptt.sourceforge.net/) and specific trap handlers
> Exclamation marks (!) are not permitted in object names.
Each object is uniquely identified by its type (`Host`) and name
-(`host1.example.org`). Objects can contain a comma-separated list of
-property declarations. Instead of commas semi-colons may also be used.
+(`host1.example.org`). Some types have composite names, e.g. the
+`Service` type which uses the hostname and the name you specified
+to generate its object name.
+
+Objects can contain a comma-separated list of property
+declarations. Instead of commas semi-colons may also be used.
The following data types are available for property values:
### Expressions