icinga2 --version
icinga2 - The Icinga 2 network monitoring daemon (version: r2.11.3-1)
Copyright © 2012-2020 Icinga GmbH (https://icinga.com/)
License GPLv2+: GNU GPL version 2 or later http://gnu.org/licenses/gpl2.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
System information:
Platform: Ubuntu
Platform version: 18.04.3 LTS (Bionic Beaver)
Kernel: Linux
Kernel version: 5.3.0-1017-aws
Architecture: x86_64
Build information:
Compiler: GNU 8.3.0
Build host: runner-LTrJQZ9N-project-298-concurrent-0
Application information:
General paths:
Config directory: /etc/icinga2
Data directory: /var/lib/icinga2
Log directory: /var/log/icinga2
Cache directory: /var/cache/icinga2
Spool directory: /var/spool/icinga2
Run directory: /run/icinga2
Old paths (deprecated):
Installation root: /usr
Sysconf directory: /etc
Run directory (base): /run
Local state directory: /var
Internal paths:
Package data directory: /usr/share/icinga2
State path: /var/lib/icinga2/icinga2.state
Modified attributes path: /var/lib/icinga2/modified-attributes.conf
Objects path: /var/cache/icinga2/icinga2.debug
Vars path: /var/cache/icinga2/icinga2.vars
PID path: /run/icinga2/icinga2.pid
####################################
Disabled features: compatlog elasticsearch gelf graphite influxdb livestatus opentsdb perfdata statusdata syslog
Enabled features: api checker command debuglog ido-mysql mainlog notification
###################################
all this is under: /var/lib/icinga2/api/zones
conf.d is excluded.
###########################
hosts.conf
object Host “fileserver” {
import “Win_Servers_Templ”
display_name = "fileserver"
address = "172.31.10.100"
}
##############################
host_templates.conf
template Host “Win_Servers_Templ” {
check_command = “hostalive”
check_period = “time_period”
enable_notifications = true
}
##############################
/agent_endpoints.conf
object Endpoint “fileserver” {
host = “172.31.10.100”
log_duration = 0s
}
##############################
user_templates.conf
template User “user_templ” {
enable_notifications = true
period = “time_period”
states = [ Down ]
}
##############################
timeperiods.conf
object TimePeriod “time_period” {
import “legacy-timeperiod”
import “Always_timeperiod”
display_name = "time_period"
ranges = {
}
}
##############################
/timeperiod_templates.conf
template TimePeriod “Always_timeperiod” {
import “legacy-timeperiod”
display_name = “All days monitoring”
ranges = {
“friday” = “00:00-24:00”
“monday” = “00:00-24:00”
“thursday” = “00:00-24:00”
“tuesday” = “00:00-24:00”
“wednesday” = “00:00-24:00”
}
}
#######################################
/commands.conf
object NotificationCommand “host notification” {
import “plugin-notification-command”
import “mail-host-notification_template”
}
#######################################
/notification_apply.conf
apply Notification “HostDown” to Host {
import “notif_templ”
assign where host.check_timeout == "3"
users = [ "Admins" ]
}
#############################
notification_templates.conf
template Notification “notif_templ” {
command = “host notification”
interval = 2m
period = “time_period”
states = [ Down, Up ]
types = [ Acknowledgement, Problem, Recovery ]
users = [ “Admins” ]
}