Adding Server to Default Host Groups

There is a default Host Group called Linux Servers where the Icinga server gets placed by default.
image

I would like to add other linux servers to this host group, but I can not find a way to assign them to this group is it doesn’t appear in the list of host groups.

image

I have created other host groups and have successfully assigned server based on imported variables from AWS.

image

I would like to do the same concept but assign the servers to that built in Host Group.

your Linux Server host group is defined in the conf files.

/etc/icinga2/conf.d/groups.conf.disabled 
/**
 * Host group examples.
 */

object HostGroup "linux-servers" {
  display_name = "Linux Servers"

  assign where host.vars.os == "Linux"
}

so you have two possibilities:

  • create a field ‘os’ and write “Linux” in it for these servers to satisfy the rule.
  • disable the rule and redefine them in Icinga Director to satisfy your needs

Do I have to go into the conf files or can this be managed from within Director?

the host var can be managed via director.

it is very similar to this explanation but you add the field named “os” to the host template
and then you go to the host or host template and write Linux in it