I had this same problem last year but with dns resolution checks. I
contemplated submitting a patch to do 'ansible' like templating in the
commands (currently you can only do very basic token substitution) ... but,
I ended up just writing a python check looping over the hosts and resolving
each one reporting warnings/errors counters depending on which failed etc.
If you're using ansible/salt or some other configuration manager you could
use templates to auto generate multiple check json definitions without
having to actually write the checks separately yourself, so the check name
would be auto-generated as well, like:
Should be trivial with any configuration management tool. For my DNS use
case that was not a good fit, so a single check script worked (we pull the
list of domains dynamically from a db).
On Tue, Feb 28, 2017 at 6:39 PM, Hany Fahim <email@example.com> wrote:
I have a check definition configured on the master to check for an SSL
certificate expiry. On my client, I may have a variable number of SSL
certificates that I'd like to monitor the expiry times for. What is the
best way to approach this without having to create multiple check
definitions on the server that do the same thing? Is there a way to "loop"
over a variable number of certs?