Your check_command will be run when the check_results go stale.

This should set the status to warning or critical and write a message, stating the results are not fresh.

example below
<-------snip----->
#!/bin/bash
#
# Alert on freshness expiry
host=$1;shift
serv="$*"
echo "host $host service $serv expiry"
exit 2
<-------snip----->

 Brian


On 11/09/2014 2:53 a.m., Alan Bunch wrote:
I have several services that are passive only. I am using nsca on the server and nsca-send on the client.

Icinga2 installed from the icinga repo's
[root@icinp001 ~]# rpm -q -a | grep icinga2 | sort
icinga2-2.1.0-1.el6.x86_64
icinga2-bin-2.1.0-1.el6.x86_64
icinga2-classicui-config-2.1.0-1.el6.x86_64
icinga2-common-2.1.0-1.el6.x86_64
icinga2-ido-mysql-2.1.0-1.el6.x86_64
python-icinga2-2.1.0-1.el6.x86_64

My problem is getting alerts to fire when there has not been a passive update in a defined time. I read the docs on http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/monitoring-basics#check-result-freshness and I think I have my thresholds correct.

Here are the config bits.
apply Service "SSH Keys" {
  import "st-generic-service"

  assign where host.vars.ssh-keys == true
  ignore where host.address == ""

  check_command = "passive"
# 1 hours in seconds
  check_interval = 3600
# 1 hour in seconds
  retry_interval = 3600
  enable_active_checks = false
}
template Service "st-generic-service" {
  vars.sla = "$host.vars.sla$"
  max_check_attempts = 4
  check_interval = 5m
  retry_interval = 30s
}

I have some passive services that have not had an update in 5 or 6 days. What I want is to generate a notification when passive services go "stale".

Any help would be appreciated.

Alan


_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users



_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to