Corrected issue #49

This commit is contained in:
Riccardo Bicelli 2020-09-28 13:30:41 +02:00
parent a31687e2cb
commit a38c08bb1a
2 changed files with 7 additions and 5 deletions

View File

@ -283,17 +283,19 @@ function pfz_services_discovery(){
// Get service value // Get service value
// 2020-03-27: Added space replace in service name for issue #12 // 2020-03-27: Added space replace in service name for issue #12
// 2020-09-28: Corrected Space Replace
function pfz_service_value($name,$value){ function pfz_service_value($name,$value){
$services = get_services(); $services = get_services();
$name = str_replace("__"," ",$name);
//List of service which are stopped on CARP Slave. //List of service which are stopped on CARP Slave.
//For now this is the best way i found for filtering out the triggers //For now this is the best way i found for filtering out the triggers
//Waiting for a way in Zabbix to use Global Regexp in triggers with items discovery //Waiting for a way in Zabbix to use Global Regexp in triggers with items discovery
$stopped_on_carp_slave = array("haproxy","openvpn.","openvpn"); $stopped_on_carp_slave = array("haproxy","openvpn.","openvpn");
foreach ($services as $service){ foreach ($services as $service){
$namecfr=str_replace("__"," ",$service["name"]); $namecfr = $service["name"];
$carpcfr=str_replace("__"," ",$service["name"]); $carpcfr = $service["name"];
//OpenVPN //OpenVPN
if (!empty($service['id'])) { if (!empty($service['id'])) {

View File

@ -4,7 +4,7 @@
<date>2020-07-12T06:37:29Z</date> <date>2020-07-12T06:37:29Z</date>
<groups> <groups>
<group> <group>
<name>Templates/Network devices</name> <name>Templates/Network Devices</name>
</group> </group>
</groups> </groups>
<templates> <templates>
@ -20,7 +20,7 @@ Version 1.0.1&#13;
https://github.com/rbicelli/pfsense-zabbix-template</description> https://github.com/rbicelli/pfsense-zabbix-template</description>
<groups> <groups>
<group> <group>
<name>Templates/Network devices</name> <name>Templates/Network Devices</name>
</group> </group>
</groups> </groups>
<applications> <applications>