Skip to content
This repository has been archived by the owner on Mar 12, 2019. It is now read-only.

Notifications not being sent from Icinga2 #46

Open
savicacc-gnl opened this issue Apr 11, 2018 · 0 comments
Open

Notifications not being sent from Icinga2 #46

savicacc-gnl opened this issue Apr 11, 2018 · 0 comments

Comments

@savicacc-gnl
Copy link

savicacc-gnl commented Apr 11, 2018

Hi,

I followed your instructions and created both scripts in /etc/icinga2/scripts and created hipsaint.conf in /etc/icigna2/conf.d but critical/warning notifications are still not being sent to hipchat:

I receive a notification when I execute hipchat-host-notification.sh manually, meaning the connection is established between icinga server and HipChat:

hipsaint.conf

_object NotificationCommand "notify-host-by-hipchat" {
import "plugin-notification-command"

command = [ "/etc/icinga2/scripts/hipchat-host-notification.sh" ]

env = {
HOSTNAME = "$host.name$"
LONGDATETIME = "$icinga.long_date_time$"
NOTIFICATIONTYPE = "$notification.type$"
HOSTADDRESS = "$address$"
HOSTSTATE = "$host.state$"
HOSTOUTPUT = "$host.output$"
}
}

object NotificationCommand "notify-service-by-hipchat" {
import "plugin-notification-command"

command = [ "/etc/icinga2/scripts/hipchat-service-notification.sh" ]

env = {
SERVICEDESC = "$service.name$"
HOSTALIAS = "$host.display_name$"
LONGDATETIME = "$icinga.long_date_time$"
NOTIFICATIONTYPE = "$notification.type$"
HOSTADDRESS = "$address$"
SERVICESTATE = "$service.state$"
SERVICEOUTPUT = "$service.output$"
}
}

apply Notification "hipchat-icingaadmin" to Host {
command = "notify-host-by-hipchat"

user_groups = [ "icingaadmins" ]

assign where host.vars.sla == "24x7"
}

apply Notification "hipchat-icingaadmin" to Service {
command = "notify-service-by-hipchat"

user_groups = [ "icingaadmins" ]

assign where host.vars.sla == "24x7"
}_

client:

object Host "bdb02.ppc1.mlt3.gamesys.local" {
check_command = "hostalive"
address = "10.201.32.130"
vars.client_endpoint = name
vars.os = "Red Hat 7.4"
vars.sla = "24x7"
vars.notification["mail"] = { groups = [ "icingaadmins" ] }
}

Any ideas please?

Thanks,
GNL

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant