Testing Notification

Hi!

I’m trying to send a simple e-mail notification with the send notification button in director. I configured all like it is in the docs documented. But as you can see in the log below it failed.

  • information/ExternalCommandListener: Executing external command:
    SEND_CUSTOM_HOST_NOTIFICATION;icingaagent;2;Admin;sdrhdghjfzhkdrsrtsaerghsfh

  • information/Checkable: Checking for configured notifications for object ‘icingaagent’

  • information/Checkable: Checkable ‘icingaagent’ does not have any notifications.

  • information/WorkQueue: #5 (IdoMysqlConnection, ido-mysql) items: 2, rate: 3.23333/s (194/min 1018/5min 2053/15min);

  • information/JsonRpcConnection: No messages for identity ‘icingaagent’ have been received in the last 60 seconds.

  • warning/JsonRpcConnection: API client disconnected for identity ‘icingaagent’

  • warning/JsonRpcConnection: API client disconnected for identity ‘icingaagent’

  • warning/ApiListener: Removing API client for endpoint ‘icingaagent’. 0 API clients left.

  • warning/ApiListener: Removing API client for endpoint ‘icingaagent’. 0 API clients left.

  • information/ApiListener: New client connection for identity ‘icingaagent’ from [10.0.0.28]:32810

  • warning/ApiListener: No data received on new API connection for identity ‘icingaagent’. Ensure that the remote endpoints are properly configured in a cluster setup.
    Context:
    (0) Handling new API client connection

" No data received on new API connection for identity ‘icingaagent’. Ensure that the remote endpoints are properly configured in a cluster setup." I don’t understand this! I’m already monitoring two agents.
Can someone give me an explaination what I’m doing wrong here.

kind regards

Could you let us see your configuration for the notification apply?

2 Likes

Can you specify your question a little? 'Which I set in director? Where?

looks like you have a problem with the agent connection. I think the message has nothing to do with your notifictaionproblem. I’am not very depth into notification, but maybe you have no notification contact applied to your host, so there is no one how could get the message. Please post the resolved version of the host config

1 Like

I would be interessted in what you have configured in the director notifications:

2 Likes

zones.d/master/notification_apply.conf

apply Notification “Benachrichtigungstest” to Host {
import “generic_notification

interval = 0s
assign where host.check_command == “Email”
states = [ Critical, Down ]
types = [ FlappingStart, Problem ]
users = [ “test_mail” ]
}

zones.d/master/users.conf

object User “test_mail” {
import “generic_user

display_name = “Test_Mail” email = “*****@ ***.de”
period = “Zeitraum_Test”
states = [ Down ]
types = [ Problem ]
}

zones.d/master/notification_templates.conf

template Notification “generic_notification” {
command = “mail-host-notification
interval = 0s
period = “Zeitraum_Test”
states = [ Down ] types = [ Recovery ]
users = [ “test_mail” ]
}

I’m not sure why but I have seen for a short time a picture with a filter something like host.check_command=Email I think that this isn’t the host checkCommand? You should assign the notification to some attribute of the server like host.check_command==hostalive

You can check your assign when you open your host in icingaweb2 and look into the section “Notification” or “Benachrichtigungen”, there you should see the assigned user for notification.

1 Like

Is there an explanation or several examples for “zuweisen wo” somewhere?

zones.d/master/hosts.conf

object Host “icingaagent” {
display_name = “icingaagent”
address = “10.0.0.28”
check_command = “ping4”
max_check_attempts = “10”
check_interval = 2s
retry_interval = 1s
check_timeout = 30s
enable_notifications = true
enable_active_checks = true
enable_passive_checks = true
enable_event_handler = true
enable_flapping = true
enable_perfdata = true
volatile = true
zone = “master”
}

zones.d/master/agent_endpoints.conf

object Endpoint “icingaagent” {
host = “10.0.0.28”
log_duration = 0s
}

zones.d/master/agent_zones.conf

object Zone “icingaagent” {
parent = “master”
endpoints = [ “icingaagent” ]

assign where host.vars.notification == “mail”

zones.d/master/hosts.conf

[…]
vars.notification = “mail”
[…]

Thats not a very good example as i would do this with an array to apply multiply notifications per host, but i wanted to write a simple code where i’am sure its working :wink:

1 Like