I've created a script to perform a check_http from multiple remote nrpe servers, and it returns it all as one check. The script works, returns the same human readable data from each server, one line per, and generates an exit code based on what each server comes back with. It then takes the perf data and tacks it all at the end with different names based on the name of the server used, like this:
Code: Select all
$ ./check_http_multiserver -H www.google.com -S nagiosxi-test,nagios-test-worker,nagios-aws
nagiosxi-test returned 0: HTTP OK: HTTP/1.1 200 OK - 13779 bytes in 0.196 second response time
nagios-test-worker returned 0: HTTP OK: HTTP/1.1 200 OK - 13785 bytes in 0.216 second response time
nagios-aws returned 0: HTTP OK: HTTP/1.1 200 OK - 13752 bytes in 0.035 second response time | time_nagiosxi-test=0.195603s;;;0.000000 size_nagiosxi-test=13779B;;;0 time_nagios-test-worker=0.216334s;;;0.000000 size_nagios-test-worker=13785B;;;0 time_nagios-aws=0.035009s;;;0.000000 size_nagios-aws=13752B;;;0