Hello all. So I created a new plugin to check /var/log/auth.log for updates on a VNC connection and then update the service to “WARNING” state when someone is logged on. The plugin works great and I’ve manually tested it to make sure the correct output and exit code is returned.
I noticed however, that the debug logs seem to show a different exit code run literally seconds after manually testing the plugin. It just doesn’t make sense. I am certain that all the arguments are included aswell.
[2020-08-27 01:37:45 -0400] notice/Process: PID 9488 ('/usr/lib/nagios/plugins/check_vnc.py' '-f' '/var/log/auth.log') terminated with exit code 0
root@dell999:/etc/icinga2/conf.d# /usr/lib/nagios/plugins/check_vnc.py -f /var/log/auth.log WARNING root@dell999:/etc/icinga2/conf.d# echo $? 1
Could anyone tell me why that is? I’ve even updated the check intervals to every 10 seconds.