Icinga / icinga2

The core of our monitoring platform with a powerful configuration language and REST API.
https://icinga.com/docs/icinga2/latest
GNU General Public License v2.0
2.03k stars 578 forks source link

Different result for passive checks when using host name or IP address #6752

Closed RudiSchloesser closed 6 years ago

RudiSchloesser commented 6 years ago

When using a passive check via NSCA, 1st using the host name assigned within Icinga2, 2nd the IP address of the host instead, Icinga shows different behaviour: With the host name the message is processed as expected, with the IP adress Icinga reports, that the service is unknown.

Icinga log:

[2018-11-03 18:54:10 +0100] information/ExternalCommandListener: Executing external command: [1541267650] PROCESS_SERVICE_CHECK_RESULT;192.168.0.1;ping4;0;up
[2018-11-03 18:54:10 +0100] warning/ExternalCommandListener: External command failed: Error: Cannot process passive service check result for non-existent service 'ping4' on host '192.168.0.1'

Expected Behavior

Current Behavior

Possible Solution

Steps to Reproduce (for bugs)

1. 2. 3. 4.

Context

Your Environment

Copyright (c) 2012-2017 Icinga Development Team (https://www.icinga.com/) License GPLv2+: GNU GPL version 2 or later http://gnu.org/licenses/gpl2.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

Application information: Installation root: /usr Sysconf directory: /etc Run directory: /run Local state directory: /var Package data directory: /usr/share/icinga2 State path: /var/lib/icinga2/icinga2.state Modified attributes path: /var/lib/icinga2/modified-attributes.conf Objects path: /var/cache/icinga2/icinga2.debug Vars path: /var/cache/icinga2/icinga2.vars PID path: /run/icinga2/icinga2.pid

System information: Platform: Ubuntu Platform version: 16.04.3 LTS (Xenial Xerus) Kernel: Linux Kernel version: 4.4.0-138-generic Architecture: x86_64

Build information: Compiler: GNU 5.3.1 Build host: 9c880c2f42f5

dnsmichi commented 6 years ago

You need to pass the host object name as unique identifier, you cannot use its address attribute. This is not a bug.