For your reference, this is what I’m talking about. Now, you see some backup servers only back up 10 or less clients. If one of them fails, we are hitting the SLAs. The SLA is only interesting as a total, not per server.
I came across this Article, that seems to do something similar, but i’m not really sure how to adopt it to this case.
The road to go would be like in the blog post to utilize the functions of Icinga 2 to calculate the state internally, but this is only easy if you use the state and simply concat the output. In your case you would need to parse the output, store the relevant data in variables, use functions to calculate the state based on this variables and create some output.
While I think this is possible with Icinga 2’s functions, I think it is easier with a separate script which gets the data from the database and then does all the calculation, just because it is more flexible.
If the data are not only in the output but also stored as performance metrics this backend would be another option to query and then calculate the overall state. This option could be simpler as output parsing can be avoided and functions of the metric system could be used, but it depends on knowledge where most people are more familiar with old fashioned database I think.