On Tue, 2017-05-16 at 14:30 -0700, Cullen Philippson wrote:
Docs:
https://www.percona.com/doc/percona-monitoring-plugins/LATEST/nagios/pmp-check-aws-rds.py.html
Hi Cullen,
I think it's to do with this bit: "This plugin that is supposed to be run by Nagios, i.e. under nagios user,
should have permissions to read the config /etc/boto.cfg or ~nagios/.boto."
Relax the permissions to wherever you put boto.cfg, as in 'chmod 666 /path/to/boto.cfg' and see if it works.
If it doesn't work after relaxing permissions then check around the nagios cron restarter ('su root' then 'crontab -l' to see it). You may be missing environment variables when it restarts.
In '/usr/bin/restart_nagios' you have some lines:
# Restart nagios straight away.
$NAGIOSBIN -v $NAG_DIR/nagios.cfg &> /dev/null && /etc/init.d/$NAG_INITD restart
Insert a line in there so it's:
# Restart nagios straight away.
env >/tmp/env.delme
$NAGIOSBIN -v $NAG_DIR/nagios.cfg &> /dev/null && /etc/init.d/$NAG_INITD restart
Compare the env that you use to restart nagios to the env that cron restarts nagios with.
Pretty sure the problem is in that sort of area.
Cheers!
Mark.