From 0c3e752656bbfb812a4f13980fc23a2eaf5d8bed Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 23 Mar 2019 08:45:52 +0100 Subject: [PATCH] net-mgmt/netdata: new plugin (#1268) --- net-mgmt/netdata/Makefile | 8 + net-mgmt/netdata/pkg-descr | 9 + .../src/etc/inc/plugins.inc.d/netdata.inc | 49 +++ .../Netdata/Api/GeneralController.php | 37 +++ .../Netdata/Api/ServiceController.php | 39 +++ .../OPNsense/Netdata/GeneralController.php | 38 +++ .../OPNsense/Netdata/forms/general.xml | 20 ++ .../app/models/OPNsense/Netdata/ACL/ACL.xml | 9 + .../app/models/OPNsense/Netdata/General.php | 35 ++ .../app/models/OPNsense/Netdata/General.xml | 19 ++ .../app/models/OPNsense/Netdata/Menu/Menu.xml | 7 + .../app/views/OPNsense/Netdata/general.volt | 57 ++++ .../scripts/OPNsense/Netdata/setup.sh | 11 + .../conf/actions.d/actions_netdata.conf | 23 ++ .../templates/OPNsense/Netdata/+TARGETS | 2 + .../templates/OPNsense/Netdata/netdata | 7 + .../templates/OPNsense/Netdata/netdata.conf | 312 ++++++++++++++++++ 17 files changed, 682 insertions(+) create mode 100644 net-mgmt/netdata/Makefile create mode 100644 net-mgmt/netdata/pkg-descr create mode 100644 net-mgmt/netdata/src/etc/inc/plugins.inc.d/netdata.inc create mode 100644 net-mgmt/netdata/src/opnsense/mvc/app/controllers/OPNsense/Netdata/Api/GeneralController.php create mode 100644 net-mgmt/netdata/src/opnsense/mvc/app/controllers/OPNsense/Netdata/Api/ServiceController.php create mode 100644 net-mgmt/netdata/src/opnsense/mvc/app/controllers/OPNsense/Netdata/GeneralController.php create mode 100644 net-mgmt/netdata/src/opnsense/mvc/app/controllers/OPNsense/Netdata/forms/general.xml create mode 100644 net-mgmt/netdata/src/opnsense/mvc/app/models/OPNsense/Netdata/ACL/ACL.xml create mode 100644 net-mgmt/netdata/src/opnsense/mvc/app/models/OPNsense/Netdata/General.php create mode 100644 net-mgmt/netdata/src/opnsense/mvc/app/models/OPNsense/Netdata/General.xml create mode 100644 net-mgmt/netdata/src/opnsense/mvc/app/models/OPNsense/Netdata/Menu/Menu.xml create mode 100644 net-mgmt/netdata/src/opnsense/mvc/app/views/OPNsense/Netdata/general.volt create mode 100644 net-mgmt/netdata/src/opnsense/scripts/OPNsense/Netdata/setup.sh create mode 100644 net-mgmt/netdata/src/opnsense/service/conf/actions.d/actions_netdata.conf create mode 100644 net-mgmt/netdata/src/opnsense/service/templates/OPNsense/Netdata/+TARGETS create mode 100644 net-mgmt/netdata/src/opnsense/service/templates/OPNsense/Netdata/netdata create mode 100644 net-mgmt/netdata/src/opnsense/service/templates/OPNsense/Netdata/netdata.conf diff --git a/net-mgmt/netdata/Makefile b/net-mgmt/netdata/Makefile new file mode 100644 index 000000000..d44b0f2e0 --- /dev/null +++ b/net-mgmt/netdata/Makefile @@ -0,0 +1,8 @@ +PLUGIN_NAME= netdata +PLUGIN_VERSION= 0.1 +PLUGIN_COMMENT= Real-time performance monitoring +PLUGIN_DEPENDS= netdata +PLUGIN_MAINTAINER= m.muenz@gmail.com +PLUGIN_DEVEL= yes + +.include "../../Mk/plugins.mk" diff --git a/net-mgmt/netdata/pkg-descr b/net-mgmt/netdata/pkg-descr new file mode 100644 index 000000000..27825167a --- /dev/null +++ b/net-mgmt/netdata/pkg-descr @@ -0,0 +1,9 @@ +Netdata is distributed, real-time, performance and health monitoring +for systems and applications. It is a highly optimized monitoring agent +you install on all your systems and containers. + +Netdata provides unparalleled insights, in real-time, of everything +happening on the systems it runs (including web servers, databases, +applications), using highly interactive web dashboards. + +WWW: https://github.com/netdata/netdata diff --git a/net-mgmt/netdata/src/etc/inc/plugins.inc.d/netdata.inc b/net-mgmt/netdata/src/etc/inc/plugins.inc.d/netdata.inc new file mode 100644 index 000000000..e7b39e19e --- /dev/null +++ b/net-mgmt/netdata/src/etc/inc/plugins.inc.d/netdata.inc @@ -0,0 +1,49 @@ + + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +function netdata_services() +{ + global $config; + + $services = array(); + + if (isset($config['OPNsense']['netdata']['general']['enabled']) && $config['OPNsense']['netdata']['general']['enabled'] == 1) { + $services[] = array( + 'description' => gettext('netdata daemon'), + 'configd' => array( + 'restart' => array('netdata restart'), + 'start' => array('netdata start'), + 'stop' => array('netdata stop'), + ), + 'name' => 'netdata', + 'pidfile' => '/var/db/netdata/netdata.pid' + ); + } + + return $services; +} diff --git a/net-mgmt/netdata/src/opnsense/mvc/app/controllers/OPNsense/Netdata/Api/GeneralController.php b/net-mgmt/netdata/src/opnsense/mvc/app/controllers/OPNsense/Netdata/Api/GeneralController.php new file mode 100644 index 000000000..2dc95e1c9 --- /dev/null +++ b/net-mgmt/netdata/src/opnsense/mvc/app/controllers/OPNsense/Netdata/Api/GeneralController.php @@ -0,0 +1,37 @@ + + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +namespace OPNsense\Netdata\Api; + +use OPNsense\Base\ApiMutableModelControllerBase; + +class GeneralController extends ApiMutableModelControllerBase +{ + protected static $internalModelClass = '\OPNsense\Netdata\General'; + protected static $internalModelName = 'general'; +} diff --git a/net-mgmt/netdata/src/opnsense/mvc/app/controllers/OPNsense/Netdata/Api/ServiceController.php b/net-mgmt/netdata/src/opnsense/mvc/app/controllers/OPNsense/Netdata/Api/ServiceController.php new file mode 100644 index 000000000..471897807 --- /dev/null +++ b/net-mgmt/netdata/src/opnsense/mvc/app/controllers/OPNsense/Netdata/Api/ServiceController.php @@ -0,0 +1,39 @@ + + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +namespace OPNsense\Netdata\Api; + +use OPNsense\Base\ApiMutableServiceControllerBase; + +class ServiceController extends ApiMutableServiceControllerBase +{ + protected static $internalServiceClass = '\OPNsense\Netdata\General'; + protected static $internalServiceTemplate = 'OPNsense/Netdata'; + protected static $internalServiceEnabled = 'enabled'; + protected static $internalServiceName = 'netdata'; +} diff --git a/net-mgmt/netdata/src/opnsense/mvc/app/controllers/OPNsense/Netdata/GeneralController.php b/net-mgmt/netdata/src/opnsense/mvc/app/controllers/OPNsense/Netdata/GeneralController.php new file mode 100644 index 000000000..01ebce5cf --- /dev/null +++ b/net-mgmt/netdata/src/opnsense/mvc/app/controllers/OPNsense/Netdata/GeneralController.php @@ -0,0 +1,38 @@ + + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +namespace OPNsense\Netdata; + +class GeneralController extends \OPNsense\Base\IndexController +{ + public function indexAction() + { + $this->view->generalForm = $this->getForm('general'); + $this->view->pick('OPNsense/Netdata/general'); + } +} diff --git a/net-mgmt/netdata/src/opnsense/mvc/app/controllers/OPNsense/Netdata/forms/general.xml b/net-mgmt/netdata/src/opnsense/mvc/app/controllers/OPNsense/Netdata/forms/general.xml new file mode 100644 index 000000000..291848ab5 --- /dev/null +++ b/net-mgmt/netdata/src/opnsense/mvc/app/controllers/OPNsense/Netdata/forms/general.xml @@ -0,0 +1,20 @@ +
+ + general.enabled + + checkbox + Enable Netdata, you can reach the UI via address and port set below. + + + general.listen + + text + Set the IP addresses to listen to. + + + general.port + + text + Set the port to listen to. + +
diff --git a/net-mgmt/netdata/src/opnsense/mvc/app/models/OPNsense/Netdata/ACL/ACL.xml b/net-mgmt/netdata/src/opnsense/mvc/app/models/OPNsense/Netdata/ACL/ACL.xml new file mode 100644 index 000000000..09aea9aa5 --- /dev/null +++ b/net-mgmt/netdata/src/opnsense/mvc/app/models/OPNsense/Netdata/ACL/ACL.xml @@ -0,0 +1,9 @@ + + + Services: Netdata + + ui/netdata/* + api/netdata/* + + + diff --git a/net-mgmt/netdata/src/opnsense/mvc/app/models/OPNsense/Netdata/General.php b/net-mgmt/netdata/src/opnsense/mvc/app/models/OPNsense/Netdata/General.php new file mode 100644 index 000000000..d45760463 --- /dev/null +++ b/net-mgmt/netdata/src/opnsense/mvc/app/models/OPNsense/Netdata/General.php @@ -0,0 +1,35 @@ + + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +namespace OPNsense\Netdata; + +use OPNsense\Base\BaseModel; + +class General extends BaseModel +{ +} diff --git a/net-mgmt/netdata/src/opnsense/mvc/app/models/OPNsense/Netdata/General.xml b/net-mgmt/netdata/src/opnsense/mvc/app/models/OPNsense/Netdata/General.xml new file mode 100644 index 000000000..dc986088e --- /dev/null +++ b/net-mgmt/netdata/src/opnsense/mvc/app/models/OPNsense/Netdata/General.xml @@ -0,0 +1,19 @@ + + //OPNsense/netdata/general + Netdata configuration + 0.0.1 + + + 0 + Y + + + 127.0.0.1 + Y + + + 19999 + Y + + + diff --git a/net-mgmt/netdata/src/opnsense/mvc/app/models/OPNsense/Netdata/Menu/Menu.xml b/net-mgmt/netdata/src/opnsense/mvc/app/models/OPNsense/Netdata/Menu/Menu.xml new file mode 100644 index 000000000..37f2028df --- /dev/null +++ b/net-mgmt/netdata/src/opnsense/mvc/app/models/OPNsense/Netdata/Menu/Menu.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/net-mgmt/netdata/src/opnsense/mvc/app/views/OPNsense/Netdata/general.volt b/net-mgmt/netdata/src/opnsense/mvc/app/views/OPNsense/Netdata/general.volt new file mode 100644 index 000000000..2d10822ae --- /dev/null +++ b/net-mgmt/netdata/src/opnsense/mvc/app/views/OPNsense/Netdata/general.volt @@ -0,0 +1,57 @@ +{# + # Copyright (c) 2019 Deciso B.V. + # Copyright (c) 2019 Michael Muenz + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without modification, + # are permitted provided that the following conditions are met: + # + # 1. Redistributions of source code must retain the above copyright notice, + # this list of conditions and the following disclaimer. + # + # 2. Redistributions in binary form must reproduce the above copyright notice, + # this list of conditions and the following disclaimer in the documentation + # and/or other materials provided with the distribution. + # + # THIS SOFTWARE IS PROVIDED “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, + # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + # AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + # AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + # OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + # POSSIBILITY OF SUCH DAMAGE. + #} + +
+ {{ partial("layout_partials/base_form",['fields':generalForm,'id':'frm_general_settings'])}} +
+
+ +
+
+ + diff --git a/net-mgmt/netdata/src/opnsense/scripts/OPNsense/Netdata/setup.sh b/net-mgmt/netdata/src/opnsense/scripts/OPNsense/Netdata/setup.sh new file mode 100644 index 000000000..d50fc35b1 --- /dev/null +++ b/net-mgmt/netdata/src/opnsense/scripts/OPNsense/Netdata/setup.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +mkdir -p /var/cache/netdata/ +mkdir -p /var/db/netdata/ +mkdir -p /var/log/netdata/ +chown netdata:netdata /var/cache/netdata +chown netdata:netdata /var/db/netdata +chown netdata:netdata /var/log/netdata +chmod 750 /var/cache/netdata +chmod 750 /var/db/netdata +chmod 750 /var/log/netdata diff --git a/net-mgmt/netdata/src/opnsense/service/conf/actions.d/actions_netdata.conf b/net-mgmt/netdata/src/opnsense/service/conf/actions.d/actions_netdata.conf new file mode 100644 index 000000000..946afec16 --- /dev/null +++ b/net-mgmt/netdata/src/opnsense/service/conf/actions.d/actions_netdata.conf @@ -0,0 +1,23 @@ +[start] +command:/usr/local/opnsense/scripts/OPNsense/Netdata/setup.sh;/usr/local/etc/rc.d/netdata start +parameters: +type:script +message:starting Netdata + +[stop] +command:/usr/local/etc/rc.d/netdata stop +parameters: +type:script +message:stopping Netdata + +[restart] +command:/usr/local/opnsense/scripts/OPNsense/Netdata/setup.sh;/usr/local/etc/rc.d/netdata restart +parameters: +type:script +message:restarting Netdata + +[status] +command:/usr/local/etc/rc.d/netdata status;exit 0 +parameters: +type:script_output +message:request Netdata status diff --git a/net-mgmt/netdata/src/opnsense/service/templates/OPNsense/Netdata/+TARGETS b/net-mgmt/netdata/src/opnsense/service/templates/OPNsense/Netdata/+TARGETS new file mode 100644 index 000000000..da4c5a1b0 --- /dev/null +++ b/net-mgmt/netdata/src/opnsense/service/templates/OPNsense/Netdata/+TARGETS @@ -0,0 +1,2 @@ +netdata:/etc/rc.conf.d/netdata +netdata.conf:/usr/local/etc/netdata/netdata.conf diff --git a/net-mgmt/netdata/src/opnsense/service/templates/OPNsense/Netdata/netdata b/net-mgmt/netdata/src/opnsense/service/templates/OPNsense/Netdata/netdata new file mode 100644 index 000000000..d19d1eb8c --- /dev/null +++ b/net-mgmt/netdata/src/opnsense/service/templates/OPNsense/Netdata/netdata @@ -0,0 +1,7 @@ +{% if helpers.exists('OPNsense.netdata.general.enabled') and OPNsense.netdata.general.enabled == '1' %} +netdata_var_script="/usr/local/opnsense/scripts/OPNsense/Netdata/setup.sh" +netdata_enable="YES" +{% else %} +netdata_enable="NO" +{% endif %} +netdata_var_mfs="/var/cache/netdata /var/db/netdata /var/log/netdata" diff --git a/net-mgmt/netdata/src/opnsense/service/templates/OPNsense/Netdata/netdata.conf b/net-mgmt/netdata/src/opnsense/service/templates/OPNsense/Netdata/netdata.conf new file mode 100644 index 000000000..4b5504a5b --- /dev/null +++ b/net-mgmt/netdata/src/opnsense/service/templates/OPNsense/Netdata/netdata.conf @@ -0,0 +1,312 @@ +{% if helpers.exists('OPNsense.netdata.general.enabled') and OPNsense.netdata.general.enabled == '1' %} +# $FreeBSD$ + +# netdata configuration +# +# You can uncomment and change any of the options below. +# The value shown in the commented settings, is the default value. +# + +# global netdata configuration +[global] + history = 86400 + bind to = {{ OPNsense.netdata.general.listen }} + disconnect idle web clients after seconds = 3600 + run as user = netdata + web files owner = netdata + web files group = netdata + default port = {{ OPNsense.netdata.general.port }} + respect web browser do not track policy = yes + +[plugins] + freebsd = yes + +[registry] + +[health] + +[backend] + + + +[plugin:tc] + +[plugin:idlejitter] + +[plugin:freebsd] + netdata server resources = yes + sysctl = yes + +[plugin:cgroups] + +[plugin:node.d] + +[plugin:fping] + +[plugin:apps] + +[plugin:python.d] + +[plugin:charts.d] + +[plugin:freebsd:sysctl] + + + +[system.idlejitter] + +[system.load] + +[system.active_processes] + +[system.processes] + +[mem.committed] + +[system.cpu] + +[cpu.cpu0] + +[system.intr] + +[system.dev_intr] + +[system.soft_intr] + +[system.ctxt] + +[netdata.plugin_cgroups_cpu] + +[system.forks] + +[system.io] + +[system.swap] + +[system.ram] + +[system.swapio] + +[netdata.apps_cpu] + +[netdata.apps_files] + +[netdata.apps_fix] + +[netdata.apps_children_fix] + +[mem.pgfaults] + +[system.ipc_semaphores] + +[system.ipc_semaphore_arrays] + +[system.ipc_shared_mem_segs] + +[system.ipc_shared_mem_size] + +[system.ipc_msq_queues] + +[system.ipc_msq_messages] + +[system.ipc_msq_size] + +[system.softnet_stat] + +[cpu.cpu0_softnet_stat] + +[system.ipv4] + +[system.ipv6] + +[net.vtnet0] + +[net_packets.vtnet0] + +[net_errors.vtnet0] + +[net_drops.vtnet0] + +[net_events.vtnet0] + +[net.vtnet1] + +[net_packets.vtnet1] + +[net_errors.vtnet1] + +[net_drops.vtnet1] + +[net_events.vtnet1] + +[net.lo0] + +[net_packets.lo0] + +[net_errors.lo0] + +[net_drops.lo0] + +[net_events.lo0] + +[netdata.plugin_proc_cpu] + +[netdata.server_cpu] + +[netdata.clients] + +[netdata.requests] + +[netdata.net] + +[netdata.response_time] + +[netdata.compression_ratio] + +[system.interrupts] + +[disk.vtbd0] + +[disk_ops.vtbd0] + +[disk_qops.vtbd0] + +[disk_util.vtbd0] + +[disk_iotime.vtbd0] + +[ipv4.tcpsock] + +[ipv4.tcppackets] + +[ipv4.tcperrors] + +[ipv4.tcphandshake] + +[ipv4.tcpconnaborts] + +[ipv4.tcpofo] + +[ipv4.tcpsyncookies] + +[ipv4.ecnpkts] + +[ipv4.udppackets] + +[ipv4.udperrors] + +[ipv4.icmp] + +[ipv4.icmp_errors] + +[ipv4.icmpmsg] + +[ipv4.packets] + +[ipv4.fragsout] + +[ipv4.fragsin] + +[ipv4.errors] + +[ipv6.packets] + +[ipv6.errors] + +[ipv6.icmp] + +[ipv6.icmpneighbor] + +[ipv6.icmptypes] + +[disk_space./] + +[disk_inodes./] + +[disk_space./tmp] + +[disk_inodes./tmp] + +[disk_space./usr] + +[disk_inodes./usr] + +[disk_space./usr/home] + +[disk_inodes./usr/home] + +[disk_space./usr/ports] + +[disk_inodes./usr/ports] + +[disk_space./usr/ports/distfiles] + +[disk_inodes./usr/ports/distfiles] + +[disk_space./usr/ports/packages] + +[disk_inodes./usr/ports/packages] + +[disk_space./usr/src] + +[disk_inodes./usr/src] + +[disk_space./var] + +[disk_inodes./var] + +[disk_space./var/crash] + +[disk_inodes./var/crash] + +[disk_space./var/db] + +[disk_inodes./var/db] + +[disk_space./var/db/pkg] + +[disk_inodes./var/db/pkg] + +[disk_space./var/empty] + +[disk_inodes./var/empty] + +[disk_space./var/log] + +[disk_inodes./var/log] + +[disk_space./var/mail] + +[disk_inodes./var/mail] + +[disk_space./var/run] + +[disk_inodes./var/run] + +[disk_space./var/tmp] + +[disk_inodes./var/tmp] + +[system.uptime] + +[disk_await.vtbd0] + +[disk_avgsz.vtbd0] + +[disk_svctm.vtbd0] + +[nginx_local.connections] + +[nginx_local.requests] + +[nginx_local.connection_status] + +[nginx_local.connect_rate] + +[netdata.plugin_pythond_nginx_local] + +[nginx_log_local.codes] + +[netdata.plugin_pythond_nginx_log_local] + +{% endif %}