rbicelli / pfsense-zabbix-template

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

PHP Error: Line 978 - dhcp failover #140

Closed morcegao closed 7 months ago

morcegao commented 1 year ago

Hello, Following https://github.com/rbicelli/pfsense-zabbix-template/issues/135 I have updated the script to last version, but I still have an error How to solve it ? Thks

PHP errors PHP ERROR: Type: 1, File: /root/scripts/pfsense_zbx.php, Line: 978, Message: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /root/scripts/pfsense_zbx.php:978 Stack trace:

0 /root/scripts/pfsense_zbx.php(1024): pfz_dhcp_get('failover')

1 /root/scripts/pfsense_zbx.php(1037): pfz_dhcp_check_failover()

2 /root/scripts/pfsense_zbx.php(1338): pfz_dhcp('failover', NULL)

3 {main}

thrown @ 2023-03-15 19:22:39

jonathanpisarczyk commented 1 year ago

I've got the same issue. Running pfsense 23.01

bceylon commented 1 year ago

Same here with pfsense 23.01. Noticed that the script expects leasesfile to be: /var/db/dhcpd.leases while in my system it seems to be: /var/dhcpd/var/db/dhcpd.leases

After changing that, next error is:

PHP ERROR: Type: 1, File: /root/scripts/pfsense_zbx.php, Line: 948, Message: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in /root/scripts/pfsense_zbx.php:948
Stack trace:
hannescl commented 1 year ago

Same error here on pfsense 23.0.1 and the latest version of the script.

AugustoRubio commented 1 year ago

Same error 23.01.

hemersonfds commented 1 year ago

Same error 23.01 and 23.05 RC / RELEASE

AugustoRubio commented 1 year ago

I changed the Timeout to 10 seconds, since then I no longer received the error and the information is being loaded.