pfsense-zabbix-template
pfsense-zabbix-template copied to clipboard
With OPNSense
Hi,
Thanks for your work.
I want to install it to OPNsense... (last version).
-
I've a Zabbix Agent and no Zabbix Active Agent. So, I've changed All Item with Zabbix Agent (no Active) --> OK
-
Zabbix Agent UserParameter web interface... dont work with specials characters (exemple : *) So, I've add all UserParameter into a new .conf file to /usr/local/etc/zabbix_agentd.conf.d/ folder --> OK
After this, I'll try with pfsense.value[gw_status] item, but I've an error on my Zaxxib Server :
Warning: require_once(globals.inc): failed to open stream: No such file or directory in /root/scripts/pfsense_zbx.php on line 10
Fatal error: require_once(): Failed opening required 'globals.inc' (include_path='/usr/local/etc/inc:/usr/local/www:/usr/local/opnsense/mvc:/usr/local/opnsense/contrib:/usr/local/share/pear:/usr/local/share') in /root/scripts/pfsense_zbx.php on line 10
PHP Script is on
/root/scripts/pfsense_zbx.php
I don't have globals.inc file to OPNsense
Script work it with OPNsense ?
This is my /usr/local/etc/inc folder include :
# ls -l /usr/local/etc/inc/
total 536
-rw-r--r-- 1 root wheel 25789 Mar 18 04:34 IPv6.inc
-rw-r--r-- 1 root wheel 5465 Mar 18 04:34 XMLRPC_Client.inc
-rw-r--r-- 1 root wheel 24618 Mar 18 04:34 auth.inc
-rw-r--r-- 1 root wheel 15066 Mar 18 04:34 authgui.inc
-rw-r--r-- 1 root wheel 20562 Mar 18 04:34 certs.inc
-rw-r--r-- 1 root wheel 9886 Mar 18 04:34 config.inc
-rw-r--r-- 1 root wheel 16210 Mar 18 04:34 console.inc
-rw-r--r-- 1 root wheel 29391 Mar 18 04:34 filter.inc
-rw-r--r-- 1 root wheel 28655 Mar 18 04:34 filter.lib.inc
-rw-r--r-- 1 root wheel 159906 Mar 18 04:34 interfaces.inc
-rw-r--r-- 1 root wheel 18210 Mar 18 04:34 interfaces.lib.inc
-rw-r--r-- 1 root wheel 6289 Mar 18 04:34 legacy_bindings.inc
-rw-r--r-- 1 root wheel 2944 Mar 18 04:34 notices.inc
-rw-r--r-- 1 root wheel 11162 Mar 18 04:34 plugins.inc
drwxr-xr-x 5 root wheel 1536 Mar 23 15:57 plugins.inc.d
-rw-r--r-- 1 root wheel 31779 Mar 18 04:34 rrd.inc
-rw-r--r-- 1 root wheel 37187 Mar 18 04:34 system.inc
-rw-r--r-- 1 root wheel 41943 Mar 18 04:34 util.inc
-rw-r--r-- 1 root wheel 9818 Mar 18 04:34 xmlparse.inc
drwxr-xr-x 2 root wheel 512 Mar 23 15:57 xmlrpc
-rw-r--r-- 1 root wheel 2652 Mar 18 04:34 xmlrpc.inc
I think pfSense works like OPNsense. But there must be some differences. Like that.
Do you think it's possible to adapt your script for OPNsense?
Hi, I think the script could be adapted, if someone with php skills and a bit of OPNsense knowledge will put some effort on it.
I opened an issue to OPNsense Git : https://github.com/opnsense/src/issues/55
I've find function to call :
OpenVPN functions :
openvpn_get_active_clients()
openvpn_get_active_servers()
Interfaces function :
get_interface_info()
get_interface_arr()
get_configured_interface_list()
get_configured_interface_with_descr()
Services functions :
get_services()
get_service_status()
is_service_enabled()
Other functions :
get_single_sysctl()
get_system_pkg_version()
return_gateways_status()
CARP functions :
get_carp_status()
get_carp_interface_status()
I think OPNsense has the same functions... but it may return different results.
Hi! FYI I'm working on porting the template to OPNSense, but I have to admit that I have some trouble finding the functions. I need someone wit working opnsense installation (expecially with openVPN in place) who could run the script in dump mode.
Cool, I've one/two OPNSense to my lab, if you want.
Do you have an update for OPNSense @rbicelli ?
Hi , Is there any positive results regarding IPSec monitoring for OPNsense firewall ? Thanks Hemant
What do you need in regards to this? I have a OPNSense box I'm willing to allow you to work on with openVPN in place.
I have php experience but it's been awhile so I'm rusty.