kiip/pynagios — pull request #5 by jimbrowne (2012-07-13 07:51:15+00:00)
Title: Add multi_response functionality

Curious if you are interested in including a multi_response functionality. For a number of our applications instead of using a dozen or more separate checks, we use a single check that collapses responses into a single test. Normally everything is OK, but when one or more values are not OK we see the WARNING or CRITICAL along with the other values that might be OK. Here's an example:

In this case everything is OK
```
internal_app OK - ** OK: JK is up, JK state is OK, checkDBconnect is up, dbusage / logging a:0 i:10 t:10 / readOnly a:0 i:10 t:10 / readWrite a:0 i:7 t:7 / , JVM free heap memory 2222, JVM threads 130, JVM DNS cache OK, Version is FOO-PRODLIVE-JOB1-227, Uptime is 2 days, 18 hours, 14 minutes, 21 seconds and 322 milliseconds **
```

In this case the two JK tests are CRITICAL, the JVM heap memory is WARNING, and everything else is OK. Note that all of the responses are collated and sorted by severity with the worst status being returned as the overall status.

```
internal_app CRITICAL - ** CRITICAL: JK is DOWN, JK state is UNK, WARN: JVM free heap memory 128, OK: checkDBconnect is up, dbusage / logging a:0 i:10 t:10 / readOnly a:0 i:10 t:10 / readWrite a:0 i:7 t:7 /, JVM threads 130, JVM DNS cache OK, Version is FOO-PRODLIVE-JOB1-227, Uptime is 2 days, 18 hours, 14 minutes, 21 seconds and 322 milliseconds **
```

A public example of where I have used this approach is at https://github.com/jimbrowne/awstools/blob/master/instance-events-check where potentially dozens of individual test status states are collapsed into one summary state, though that example is contrived at the moment because it will only return WARNING. (Soon I'll add time based severity and return WARNING or CRITICAL.)