Ping wrong ip-address

Hey,

i just setup Icinga 2, while i tried to migrate our old configuration. I add a host with the address:
object Host “ROUTER-EXAMPLE” {
address = “10.150.107.xxx”
check_command = “check-host-alive”
}

icinga2 tries to ping the address:
192.168.107*. instead the configurated ip-address.
In the icinga2 - Debug-Log and icinga2 - Log is no entry about the 192.168.107 network.
But i can see that my server tries to ping these network, on an other server.

Does somebody has a solution, why Icinga2 tries to ping this network?

Best regards ,
Fischeertrinken

Hi,

that looks fairly strange. Can you share the full log line output where this check happens? I’d say this originates from a different host object, or a service which specifically overrides the address attribute.

If it is a host, you can use the REST API to search for it, e.g. like this:

curl -k -s -u root:icinga -H 'Accept: application/json' -H 'X-HTTP-Method-Override: GET' -X POST 'https://localhost:5665/v1/objects/hosts' \
-d '{ "filter": "cidr_match(\"192.168.0.0/16\", host.address)", "pretty": true, "attrs": [ "__name", "address" ] }'

The filter uses the cidr_match function available in the DSL for expressions. You can also change the URL endpoint to /v1/objects/services for further troubleshooting.

Different example:

Cheers,
Michael

Hi Michael,

we solved the Problem, it wasn’t an issue from Icinga 2.
It was a network, which will be natted, in our company,
so it is all fine!
But thanks for the fast answer!

Best regards,
Felix

1 Like

Hi,

no worries, I now have a good example showcasing the power of the REST API and DSL again :slight_smile:

Cheers,
Michael