Is it possible to specify a check to be run only if a client matches multiple subscriptions?
As for the background, I am trying to allow one customer read-only access to our monitoring UI. Currently we have a carbon cache/grafana server set up for internal use, however it is impossible to prevent a user from viewing other Dashboards. Worse still, even if access could be blocked to other dashboards, the ‘viewer’ user role can still poke around and have full access to the graphite data and see stats for systems servicing other customers.
As such, i’ve set up a second carbon cache/grafana server for this particular customer and have added a separate handler within Sensu to send data to that server as well. This keeps the database clean on that server with only data relevant to this particular customer getting logged. While I’d like to avoid redundant checks, one for our internal monitoring UI and one for the customer-facing UI, I have not been able to figure out how to do it.
For instance, each client subscribes to “CustomerA”, “CustomerB”, etc in addition to things like “webserver”, “disk”, “cpu”, “app1” and so on. Even though checks were not previously sent on a per-customer subscription basis, the subscriptions made things easy on us for identifying servers belonging to specific customers within Uchiwa. Now, however, I’d like to send disk stats to the new carbon cache server via the handler, but I can’t figure out how to limit it to “disk”+“CustomerB” subscribers. Do I need to bite the bullet and create a new “CustomerB_disk” subscription? Am I going about this in entirely the wrong way?