Comment 5 for bug 1979539

Revision history for this message
Edward Hope-Morley (hopem) wrote :

It has been brought to my attention that we do have some charms with nrpe checks for root owned resources and they are implemented using a cron job that runs as root and performs the check itself while the nrpe check checks the output of the cron check e.g. rabbitmq-server:

https://github.com/openstack/charm-rabbitmq-server/blob/3c155e2bdaeaec5090111749a2cf366b55875575/hooks/rabbit_utils.py#L1630

Another option is to use the update-status hook, which runs by default every 5 minutes, to perform the check then store the output in a location that the nrpe check can read.