Customize Ping Variables in Director

I am trying to customize the threshold values for ping command.
I’ve cloned the built in ping4 command but I can’t find a way to edit the thresholds in Director.
Is it possible to do?

I want to edit these values

Hi Michael,
the thresholds in the command are default values, which can be overwritten at different places. Responsible is the Icinga Evaluation Order.

Cheers,
Marcus

1 Like

you need to add a field to the command for example ping_cpl
this field will be appended to the host or service which uses the command and you can overwrite this value

Where do I add these fields?
I’ve tried under Command->Fields and when I apply it to a Host Template it falls apart.

what do you mean by falls apart?

Here is what I did step by step.

  1. Clone existing ping command (named it ping-test)

  2. Edited the new ping-test command on the Fields tab I added the three fields shown in images

  3. Deployed changes

  4. Added a new service for the ping-test command

  5. Assigned that service to a hostgroup

  6. Deployed changes

  7. I get the error shown in the image
    image

your command ping4-urient
calls check_ping which is seem reasonable, but as seen in the error message requires a host to ping which is set via a variable definded as ping_address!
you need to set a field named ping address as well in oder for command to work.

did that work for you?

No, I’m still having the same issue.
Here is how I set it up.

Command Definition

Service Template

Host Template

This is error I get on the hosts
host_error

try ping_address = $host.address$
also set host address in the host

Okay, so I got it to work with my values by putting the$host.address$ in the service template.

However, now I’m in the situation that the ping is reporting correctly with my adjusted values, but the host has a second ping from the hostalive command that is still reporting as a warning with the old values.
image

Can I replace the hostalive command with my ping-test command?

I went a head and tried replacing the hostalive with my ping-test command and it all seems happy.
If there is some reason NOT to do this, let me know. Otherwise I’ll consider this resolved.

Thanks!

yes you can replace hostalive with your ping-test as the host(-is-up)-check command, if you need the thresholds adjustable