[icinga-users] Defining multiple services or importing from a single conf file.

Garrett Pye gvpye54 at gmail.com
Mon Jan 30 21:13:20 CET 2017


Little confused about the usage of multiple services in a host file. Below
is a sample from one host file where intent is the automate duplication for
308 servers all with different host_names. To invoke each service does the
host.conf file have to have each service separate?

My confusion with working in Icinga2 is defining the services in the
services.conf file and importing/calling it in each host file as a single
line item. Seems to me the same information is duplicated between the
template and service.conf files and each host_name.conf file.

------------------------------------------

object Service "HTTP" {
  host_name = "xxx"
  check_command = "http"
}
object Service "HTTPS" {
  host_name = "xxx"
  check_command = "http"
  vars.http_ssl = "true"
}

object Service "Current users" {
  host_name = "xxx"
  check_command = "users"
  vars.users_wgreater = "5"
}

object Service "SNMP-uptime" {
  host_name = "xxx"
  check_command = "snmp-uptime"
  vars.snmp_community = "wtacc5"
}

object Service "disk" {
  host_name = "xxx"
  check_command = "disk"

  vars.disk_all = "true"

}

object Service "Memory Usage" {
  host_name = "xxx"
  check_command = "mem"

  vars.mem_warning = "80"
  vars.mem_critical = "90"
}

apply Service "Total Processes" {
  import "generic-service"
  check_command = "procs"
  assign where host.name == "xxx"
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.icinga.org/pipermail/icinga-users/attachments/20170130/096bab0d/attachment.html>


More information about the icinga-users mailing list