Ability to set circuit UP instead of down if 3 pings succeed out of 4 sites

I have a question about pinging multiple sites globally and reporting UP or DOWN via the ping results.

Here is the scenario:
For example, say there are 4 sites across the globe in different regions of the world, such as USA, EU, South America and Australia.

Our current configuration is to monitor a circuit or internet line for each of those sites. Each of the sites are redundant of each other. Say for example we are monitoring the USA. We currently have a ping FROM the USA, EU, South America and Australia. What happens is, if a ping fails from ANY of those regions/sites, the status in Icinga will show DOWN. However, technically the site or services are UP due to redundancy, and the other 3 sites are pinging successfully.

What I want to be able to do is instead of showing DOWN for a USA internet line or site when a ping from the site fails, I want to still show the Site (internet, for example) UP, instead of down, if the other regions/sites are pinging successfully.

How can I configure it where I am able to do the multi ping, and keep the status of an internet line at the USA site UP, even though it shows down?

Apologies if this is confusing.

Here is currently what we have configured:

apply Service "ping-all" {
import "generic-service"
check_command = "dummy"
vars.dummy_state = 0
vars.dummy_text = "Multi Ping"
assign where host.vars.type=="network" && (host.vars.category == "core" || host.vars.category == "routers" || host.vars.category == "firewalls" && host.vars.type!="circuit") }
  • Icinga Web 2 version - 2.11.4
  • Used modules and their versions (System - About) - Grafana, Icingadb, Monitoring
  • Web browser used - Chrome, Edge, etc
  • Icinga 2 version used (icinga2 --version) - 2.11.4
  • PHP version used (php --version) - 8.1.2-1ubuntu2.13
  • Server operating system and version - Ubuntu Linux

if you use the business process module you can design this as a business process and use the check command for checking this businessprocess as up check

there is an approach using icinga dsl:

there is an approach using a check command to check check commands:

but you can also write yourself a wrapper in bash:
something that accepts multiple hosts to ping and runs check_ping fetches the return values and if one is 0 returns 0


Thanks for that! I’ll look into utilizing that and adjusting as needed, of course.

Question - Where exactly would I put the object CheckCommand? Would that be a template based on what I am seeing?

Or would that be in the same location as where the current apply Service “ping-all” resides?

EDIT: Actually, I see that this would resides in the zones.d/global-templates/checks.conf

I’ll work on this and reply back if I have any further questions.