Business Process: Is it possible to have a single service to check all nodes of a BP object

Question on this module for setting up a service check (NOTE: I’m still playing around with this module)
Is it possible to have a single service to check all nodes of a BP object? Or with how I am currently setup, would I need to create a service definition for each subprocess Node?

The “*” doesn’t work… unsure if I needed to have 1 more level before I start splitting things out into App, DB, OS, Web…etc.

Here is my service definition…

apply Service "Icinga 2 Cluster Status Process" {
    import "service-check-alarm-settings"
    check_command = "check_business_process"
    vars.business_process_config_file = "Icinga2Overview"
    vars.business_process_check_node = "*"
    vars.business_process_show_details = true
    vars.grafana_graph_disable = true
    assign where match("icinga*", host.name)
}

My config (graphically) looks like this:

Hi fireheadman,

I sadly have to report that the most easiest way to achieve what you want is actually not possible with the businessprocess module.

But as always there is a way to work around it :slight_smile:

You can use the check_many plugin to aggregate the results of those single businessprocess checks.

You would create checks with the following commandlines which give you the single results:
icingacli businessprocess process check “Database Servers”
icingacli businessprocess process check “Application Servers”

If you need more instructions just ask :slight_smile:

Regards

David

Small addition to check_many because it doesn’t seem obvious …

you need to create a textfile with the single checks in it to use it like:

localhost#: vi test.txt
icingacli businessprocess process check "Database Servers"
icingacli businessprocess process check "Application Servers"

How to initiate the check itself:

localhost#: ./check_many < test.txt
OK All checks OK.|0/2 total checks failed
OK (?): Business Process OK: Database Servers
OK (?): Business Process OK: Application Servers
|-

Hope this helps

David

What about creating a root node “icinga2 Monitoring Cluster(overview)”, put all other nodes in it and then check against this one?

3 Likes

Tried this today…
Seems like it will work.
I created a test “IcingaRoot (Icing2 Root)” tier, then re-added all the subprocess nodes as before.

After this I downed a service and was able to see everything in the check
I had to play with toggles on the AND | OR for each subprocess node.
This allows me to create a single service check

apply Service "Icinga 2 Monitoring App Status" {
    import "service-check-alarm-settings"
    check_command = "check_business_process"
    vars.business_process_config_file = "Icinga2Overview"
    vars.business_process_check_node = "Icinga2Root"
    vars.business_process_show_details = true
    vars.grafana_graph_disable = true
    assign where match("icingap*", host.name)
}

[user@icinga02 ~ 2849]$ sudo icingacli businessprocess process check --config Icinga2Overview Icinga2Root --details --colors
Business Process CRITICAL: Icinga2 Root
& [CRITICAL] Database Servers
  & [CRITICAL] icinga02 DB
    - [CRITICAL] icinga02: MySQL Connect: Databases Connection Time
    - [CRITICAL] icinga02: Threads Connected
    - [CRITICAL] icinga02: Uptime

image

@dokon --> EXCELLENT MODULE! THanks!

1 Like

Haven’t tried this before, … lack of time on my side but good to know it works.

Thanks for trying it out and sharing the outcome.

Best

David

Recently I found out, that i can move nodes around in the Tile View :slight_smile:

Drag and Drop was a feature in the last release ! :slight_smile: enjoy

David

2 Likes