rbicelli / pfsense-zabbix-template

Zabbix Template for pfSense
Apache License 2.0
238 stars 107 forks source link

Fix stale "Service SSH Daemon is running" trigger #142

Closed edeckers closed 1 year ago

edeckers commented 1 year ago

The Service Secure Shell Daemon is running trigger is broken: when you turn off the SSH Daemon, the trigger stays active.

This is caused by the service_value returning an empty string "" instead of 0 for disabled services, on which the Zabbix template trips. E.g.:

/usr/local/bin/php /opt/scripts/pfsense_zbx.php service_value sshd status

# Returns 1 when the daemon is enabled, but "" when it's not. It should return 0 for 
# the Zabbix template to work though.

Notice that this problem is not limited to the SSH Daemon, but goes for every other disabled / enabled service.