zabbix_ipsec_pfsense
zabbix_ipsec_pfsense copied to clipboard
Error When Execute zabbix-ipsec.py
When I call zabbix-ipsec.py script over "zabbix_get -s xxx.xxx.xxx.xxx -k ipsec.discover", I receive next error:
Traceback (most recent call last):
File "/usr/local/bin/zabbix-ipsec.py", line 109, in
I discovered the issue when checking the discovery rules for the host there is an error: "Value should be a JSON object." I use Python 3.7 and ZabbixAgentd 4.0.17. My pfSense version is 2.4.5-RELEASE-p1 (amd64)
You could help me?
Thanks!
the script is Python 2.7, Opnsense have only Python 3.7.9
Python 3.7.9 (default, Oct 20 2020, 22:48:05)
[Clang 8.0.1 (tags/RELEASE_801/final 366581)] on freebsd12
Type "help", "copyright", "credits" or "license" for more information.
>>>
Solved:
https://github.com/smejdil/zabbix_ipsec_pfsense/blob/master/scripts/zabbix-ipsec.py
Hi, Has anybody tried this on OPNSense firewall for VPN Monitoring ? Thanks ,Hemant
No, still not working:
Invalid discovery rule value: cannot parse as a valid JSON object: invalid object format, expected opening character '{' or '[' at: 'Traceback (most recent call last): File "/usr/local/bin/zabbix-ipsec.py", line 126, in <module> ret = getPayload() File "/usr/local/bin/zabbix-ipsec.py
@vinicaires @valireality I just fix some erros on zabbix-ipsec.py. Can you try the new script? Please, let me know if is working fine.
Hi, I have the same issue even if I use your new script. I use pfsense 2.5.2 with python3.8, I just modify the first line of your script to use it.
Traceback (most recent call last):
File "/usr/local/bin/zabbix-ipsec.py", line 126, in <module>
ret = getPayload()
File "/usr/local/bin/zabbix-ipsec.py", line 121, in getPayload
if conf[-1] == ',':
IndexError: string index out of range
EDIT : I don't use the correct path for IPSEC_CONF. I replace it by IPSEC_CONF = '/var/etc/ipsec/swanctl.conf'
but I have always the same issue.
I have this issue with the python 3.8 version.. did anyone manage to solve the problem?
Hello,
Has anyone found a solution to the problem?
Traceback (most recent call last):
File "/usr/local/bin/zabbix-ipsec.py", line 126, in
Hi @jankyk
It is working for me on the latest pfsense version : https://github.com/ecarat237/zabbix_ipsec_pfsense