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

-4 not set for check_ping for hostalive4 #6093

Closed bardahlm closed 6 years ago

bardahlm commented 6 years ago

Expected Behavior

check_ping should be run with -4 as parameter for hostalive4

Current Behavior

-4 seems to be ignored missing

Possible Solution

Steps to Reproduce (for bugs)

  1. Set up an object to be checked using hostalive4
  2. Check the command given under last_check_result using icinga2 console [...] command = [ "/usr/lib64/nagios/plugins/check_ping", "-H", "host.example.com", "-c", "5000,100%", "-w", "3000,80%" ] [...]
  3. Notice missing -4 on command line

Context

check_ping do not work when pinging its own FQDN (https://github.com/nagios-plugins/nagios-plugins/issues/326). Therefore, check_ping do not work when the node checks itself unless -4 is set.

If I understand command-plugins.conf (from icinga2-common) correct, -4 should be added as a command parametre:

object CheckCommand "ping4" {
  import "ping-common"

  command += [ "-4" ]

  vars.ping_address = "$address$"
}

This do not seem to work.

Your Environment

bardahlm commented 6 years ago

Might be an edge case. Problem disappeared when we moved some checks around.