That error is caused because a host does not have an "OK" state (that's a 
service state).
Hosts have states such as up, down, unreachable (and maybe more that i can't 
remember right now).

Regards,
Markus

Sent from my iPhone

On 27 May 2015, at 09:06, Henti Smith <[email protected] 
<mailto:[email protected]> > wrote:

Hi Markus, 

I changed to : 

assign where match("*.int.domain.com <http://int.domain.com> ", host.name 
<http://host.name> )

and now I get the following error with checkconfig 

critical/config: Error: Validation failed for Object 'int-dep' (Type: 
'Dependency') at /etc/icinga2/conf.d/deps.d/network.conf:10: State filter is 
invalid for host dependency.

Also, I used "==" based on examples in the docs 
http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/object-types#objecttype-dependency
 
<http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/object-types#objecttype-dependency>
 

I'm also using a 
http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/icinga2-client#icinga2-client-configuration-local
 
<http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/icinga2-client#icinga2-client-configuration-local>
 configuration where the clients configs are imported to the master, hence I'm 
trying to get the deps in place on the master. 

Regards
Henti


On Wed, May 27, 2015 at 8:51 AM, Henti Smith <[email protected] 
<mailto:[email protected]> > wrote:
Hi Markus, 

Thanks. that would explain the warnings in the startup.log I just found 
"'Dependency' does not match anywhere!"

Regards
Henti

On Wed, May 27, 2015 at 8:49 AM, Markus Joosten <[email protected] 
<mailto:[email protected]> > wrote:
Wildcard matching is as far as i know not supported by ==.
You need to use the match() function, it's described in the docs.

Regards,
Markus

Sent from my iPhone

On 27 May 2015, at 08:20, Henti Smith <[email protected] 
<mailto:[email protected]> > wrote:

Good day all. 

I'm trying to get some dependencies in place for our monitoring. 

We have a DC network and an Internal network at the office. the networks are 
connected via two gateways. 

All hosts in the DC network has dc.domain.com <http://dc.domain.com> suffix, 
while the internal network is int.domain.com <http://int.domain.com> . 

The monitoring server is in the DC. 

I've added the following config so all *.dc.domain.com <http://dc.domain.com> 
hosts depends on the parent gw.dc.domain.com <http://gw.dc.domain.com> and all 
*.int.domain.com <http://int.domain.com> hosts depend on parent 
gw.int.domain.com <http://gw.int.domain.com> . 

apply Dependency "dc-dep" to Host {
  parent_host_name = "gw.dc.domain.com <http://gw.dc.domain.com> "
  assign where host.name <http://host.name> == "*.dc.domain.com 
<http://dc.domain.com> "
  states = [ OK ]
  disable_checks = true
  disable_notifications = true
}

apply Dependency "int-dep" to Host {
  parent_host_name = "gw.int.domain.com <http://gw.int.domain.com> "
  assign where host.name <http://host.name> == "*.int.domain.com 
<http://int.domain.com> "
  states = [ OK ]
  disable_checks = true
  disable_notifications = true
}

My logic being that is the GW in INT is not accessible, I don't want 
notifications from the hosts in INT. 

Last night we had an outage, we received a DOWN notification for 
gw.int.domain.com <http://gw.int.domain.com> , but I also received 
notifications for all the *.int.domain.com <http://int.domain.com> hosts. 

what am I missing ? 

Regards
Henti

-- 
--

_______________________________________________

icinga-users mailing list

[email protected] <mailto:[email protected]> 

https://lists.icinga.org/mailman/listinfo/icinga-users




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




-- 
--



-- 
--

_______________________________________________

icinga-users mailing list

[email protected] <mailto:[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