Hello,
I think I need your help guys. I would say I have a much experience in Icinga but this problem is freacking me out.
In my servers.conf I have defined this.
object HostGroup "department" {
display_name = "department"
vars.sparte = "demartment"
vars.responsible = "user1"
vars.techdataowner = "user2"
}
object Host "servername" {
import "generic-host"
address = "ipaddress"
a few more vars and things
vars.applications = ["applicationname"]
groups = ["department"]
}
In my notificationcommand.conf I have this one:
object NotificationCommand "msend-service" {
import "plugin-notification-command"
command = [
"path/msend-service.sh"
]
env += {
NOTIFICATIONTYPE = "$notification.type$"
SERVICEDESC = "$service.name$"
HOSTALIAS = "$host.display_name$"
HOSTADDRESS = "$address$"
SERVICESTATE = "$service.state$"
SERVICESTATETYPE = "$service.state_type$"
LONGDATETIME = "$icinga.long_date_time$"
SERVICEOUTPUT = "$service.output$"
HOSTDISPLAYNAME = "$host.display_name$"
SERVICEDISPLAYNAME = "$service.display_name$"
SERVICEPERFDATA = "$service.perfdata$"
RESPONSIBLES = "$host.vars.responsible$"
HOSTENV = "$host.vars.environment$"
APPLICATION = "$host.vars.applications$"
SPARTE = "$host.vars.sparte$"
}
}
But when I get an Mail the value “SPARTE” and “responsible” is empty. How to I get this values.
I have tried: host.vars.sparte; hostgroup.vars.sparte; host.group.vars.sparte; and nothing worked.
Thanks for your help
Sincerely
FallingSky