rbicelli / pfsense-zabbix-template

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

Update to PFSense 2.6.0 : PHP ERROR with IPSEC #113

Closed stephanehofman closed 1 year ago

stephanehofman commented 2 years ago

Hello, I have upgraded one of my firewall to PFSense 2.6 version. Next I have updated your script to the last version available. I have this error on the dashboard : PHP ERROR: Type: 1, File: /root/scripts/pfsense_zbx.php, Line: 668, Message: Uncaught Error: Call to undefined function get_ipsecifnum() in /root/scripts/pfsense_zbx.php:668 Stack trace:

0 /root/scripts/pfsense_zbx.php(580): pfz_ipsec_status('2')

1 /root/scripts/pfsense_zbx.php(1274): pfz_ipsec_ph1('2', 'status')

2 {main}

What can I do ?

rbicelli commented 2 years ago

Please note that pfSense 2.6 is not yet supported, I'm working on it.

stephanehofman commented 2 years ago

No problem. I have already upgraded 3 firewalls, and I have the same error messages.

mrnafanya commented 2 years ago

Have the same issue after upgrade to 2.6.0.

ananiasfilho commented 2 years ago

@rbicelli need someone to test and validate things? im tottaly available to help. Let me know if you need anything that can help you on this update to 2.6.0.

moisesdfelix commented 2 years ago

Thanks for the contribution. I'm also having a problem with version 2.6.0

rednaxes commented 2 years ago

replaced it

if (get_ipsecifnum($ph1ent['ikeid'], 0)) {
            $cname = "con" . get_ipsecifnum($ph1ent['ikeid'], 0);

with this

if ($ph1ent['ikeid']) {
            $cname = "con" . $ph1ent['ikeid'];

It seems to work pfsense - 2.6.0. and zabbix 6

rbicelli commented 1 year ago

Solved with PR #118

jcattan commented 1 year ago

Hi i've update my pfsense to 2.7 and i've this message :

Notifications in this message: 1

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

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

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

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

3 {main}

thrown

azurek1te commented 1 year ago

Hi i've update my pfsense to 2.7 and i've this message :

Notifications in this message: 1

15:43:39 PHP ERROR: Type: 1, File: /root/scripts/pfsense_zbx.php, Line: 936, Message: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /root/scripts/pfsense_zbx.php:936 Stack trace: #0 /root/scripts/pfsense_zbx.php(982): pfz_dhcp_get('failover') #1 /root/scripts/pfsense_zbx.php(995): pfz_dhcp_check_failover() #2 /root/scripts/pfsense_zbx.php(1257): pfz_dhcp('failover', NULL) #3 {main} thrown

You need to re-download pfsense_zbx.php as per the instructions. This file needs manual updating. I had the same errors bacause I used the old file (before updating to 2.7.0).