diff --git a/Makefile b/Makefile index ac4ed951f..aa157d595 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ PAGER?= less -PLUGIN_ABI= 19.1 +PLUGIN_ABI= 19.7 all: @cat ${.CURDIR}/README.md | ${PAGER} diff --git a/net-mgmt/zabbix-proxy/Makefile b/net-mgmt/zabbix-proxy/Makefile deleted file mode 100644 index 089e297d7..000000000 --- a/net-mgmt/zabbix-proxy/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -PLUGIN_NAME= zabbix-proxy -PLUGIN_VERSION= 1.1 -PLUGIN_COMMENT= Zabbix Proxy enables decentralized monitoring -PLUGIN_DEPENDS= zabbix3-proxy -PLUGIN_CONFLICTS= zabbix4-proxy -PLUGIN_MAINTAINER= m.muenz@gmail.com - -.include "../../Mk/plugins.mk" diff --git a/net-mgmt/zabbix-proxy/pkg-descr b/net-mgmt/zabbix-proxy/pkg-descr deleted file mode 100644 index d18a4485b..000000000 --- a/net-mgmt/zabbix-proxy/pkg-descr +++ /dev/null @@ -1,10 +0,0 @@ -Zabbix is an enterprise-class open source distributed monitoring solution. - -Zabbix is software that monitors numerous parameters of a network and the -health and integrity of servers. Zabbix uses a flexible notification -mechanism that allows users to configure e-mail based alerts for virtually -any event. This allows a fast reaction to server problems. Zabbix offers -excellent reporting and data visualisation features based on the stored -data. This makes Zabbix ideal for capacity planning. - -WWW: http://www.zabbix.com/ diff --git a/net-mgmt/zabbix-proxy/src/etc/inc/plugins.inc.d/zabbixproxy.inc b/net-mgmt/zabbix-proxy/src/etc/inc/plugins.inc.d/zabbixproxy.inc deleted file mode 100644 index d26017268..000000000 --- a/net-mgmt/zabbix-proxy/src/etc/inc/plugins.inc.d/zabbixproxy.inc +++ /dev/null @@ -1,49 +0,0 @@ - - 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 zabbixproxy_services() -{ - global $config; - - $services = array(); - - if (isset($config['OPNsense']['zabbixproxy']['general']['enabled']) && $config['OPNsense']['zabbixproxy']['general']['enabled'] == 1) { - $services[] = array( - 'description' => gettext('Zabbix Proxy'), - 'configd' => array( - 'restart' => array('zabbixproxy restart'), - 'start' => array('zabbixproxy start'), - 'stop' => array('zabbixproxy stop'), - ), - 'name' => 'zabbixproxy', - 'pidfile' => '/var/run/zabbix/zabbix_proxy.pid' - ); - } - - return $services; -} diff --git a/net-mgmt/zabbix-proxy/src/opnsense/mvc/app/controllers/OPNsense/Zabbixproxy/Api/GeneralController.php b/net-mgmt/zabbix-proxy/src/opnsense/mvc/app/controllers/OPNsense/Zabbixproxy/Api/GeneralController.php deleted file mode 100644 index 21532e210..000000000 --- a/net-mgmt/zabbix-proxy/src/opnsense/mvc/app/controllers/OPNsense/Zabbixproxy/Api/GeneralController.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * 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\Zabbixproxy\Api; - -use \OPNsense\Base\ApiControllerBase; -use \OPNsense\Zabbixproxy\General; -use \OPNsense\Core\Config; - -class GeneralController extends ApiControllerBase -{ - public function getAction() - { - // define list of configurable settings - $result = array(); - if ($this->request->isGet()) { - $mdlGeneral = new General(); - $result['general'] = $mdlGeneral->getNodes(); - } - return $result; - } - - public function setAction() - { - $result = array("result"=>"failed"); - if ($this->request->isPost()) { - // load model and update with provided data - $mdlGeneral = new General(); - $mdlGeneral->setNodes($this->request->getPost("general")); - - // perform validation - $valMsgs = $mdlGeneral->performValidation(); - foreach ($valMsgs as $field => $msg) { - if (!array_key_exists("validations", $result)) { - $result["validations"] = array(); - } - $result["validations"]["general.".$msg->getField()] = $msg->getMessage(); - } - - // serialize model to config and save - if ($valMsgs->count() == 0) { - $mdlGeneral->serializeToConfig(); - Config::getInstance()->save(); - $result["result"] = "saved"; - } - } - return $result; - } -} diff --git a/net-mgmt/zabbix-proxy/src/opnsense/mvc/app/controllers/OPNsense/Zabbixproxy/Api/ServiceController.php b/net-mgmt/zabbix-proxy/src/opnsense/mvc/app/controllers/OPNsense/Zabbixproxy/Api/ServiceController.php deleted file mode 100644 index 087acf88d..000000000 --- a/net-mgmt/zabbix-proxy/src/opnsense/mvc/app/controllers/OPNsense/Zabbixproxy/Api/ServiceController.php +++ /dev/null @@ -1,153 +0,0 @@ - - * - * 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\Zabbixproxy\Api; - -use \OPNsense\Base\ApiControllerBase; -use \OPNsense\Core\Backend; -use \OPNsense\Zabbixproxy\General; - -/** - * Class ServiceController - * @package OPNsense\Zabbixproxy - */ -class ServiceController extends ApiControllerBase -{ - /** - * start zabbixproxy service (in background) - * @return array - */ - public function startAction() - { - if ($this->request->isPost()) { - // close session for long running action - $this->sessionClose(); - $backend = new Backend(); - $response = $backend->configdRun("zabbixproxy start"); - return array("response" => $response); - } else { - return array("response" => array()); - } - } - - /** - * stop zabbixproxy service - * @return array - */ - public function stopAction() - { - if ($this->request->isPost()) { - // close session for long running action - $this->sessionClose(); - $backend = new Backend(); - $response = $backend->configdRun("zabbixproxy stop"); - return array("response" => $response); - } else { - return array("response" => array()); - } - } - - /** - * restart zabbixproxy service - * @return array - */ - public function restartAction() - { - if ($this->request->isPost()) { - // close session for long running action - $this->sessionClose(); - $backend = new Backend(); - $response = $backend->configdRun("zabbixproxy restart"); - return array("response" => $response); - } else { - return array("response" => array()); - } - } - - /** - * retrieve status of zabbixproxy - * @return array - * @throws \Exception - */ - public function statusAction() - { - $backend = new Backend(); - $mdlGeneral = new General(); - $response = $backend->configdRun("zabbixproxy status"); - - if (strpos($response, "not running") > 0) { - if ($mdlGeneral->enabled->__toString() == 1) { - $status = "stopped"; - } else { - $status = "disabled"; - } - } elseif (strpos($response, "is running") > 0) { - $status = "running"; - } elseif ($mdlGeneral->enabled->__toString() == 0) { - $status = "disabled"; - } else { - $status = "unkown"; - } - - return array("status" => $status); - } - - /** - * reconfigure zabbixproxy, generate config and reload - */ - public function reconfigureAction() - { - if ($this->request->isPost()) { - // close session for long running action - $this->sessionClose(); - - $mdlGeneral = new General(); - $backend = new Backend(); - - $runStatus = $this->statusAction(); - - // stop zabbixproxy if it is running or not - $this->stopAction(); - - // generate template - $backend->configdRun('template reload OPNsense/Zabbixproxy'); - - // (res)start daemon - if ($mdlGeneral->enabled->__toString() == 1) { - $this->startAction(); - } - - return array("status" => "ok"); - } else { - return array("status" => "failed"); - } - } -} diff --git a/net-mgmt/zabbix-proxy/src/opnsense/mvc/app/controllers/OPNsense/Zabbixproxy/GeneralController.php b/net-mgmt/zabbix-proxy/src/opnsense/mvc/app/controllers/OPNsense/Zabbixproxy/GeneralController.php deleted file mode 100644 index 925117107..000000000 --- a/net-mgmt/zabbix-proxy/src/opnsense/mvc/app/controllers/OPNsense/Zabbixproxy/GeneralController.php +++ /dev/null @@ -1,38 +0,0 @@ - - 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\Zabbixproxy; - -class GeneralController extends \OPNsense\Base\IndexController -{ - public function indexAction() - { - $this->view->generalForm = $this->getForm("general"); - $this->view->pick('OPNsense/Zabbixproxy/general'); - } -} diff --git a/net-mgmt/zabbix-proxy/src/opnsense/mvc/app/controllers/OPNsense/Zabbixproxy/forms/general.xml b/net-mgmt/zabbix-proxy/src/opnsense/mvc/app/controllers/OPNsense/Zabbixproxy/forms/general.xml deleted file mode 100644 index e680d0b3f..000000000 --- a/net-mgmt/zabbix-proxy/src/opnsense/mvc/app/controllers/OPNsense/Zabbixproxy/forms/general.xml +++ /dev/null @@ -1,137 +0,0 @@ -
diff --git a/net-mgmt/zabbix-proxy/src/opnsense/mvc/app/models/OPNsense/Zabbixproxy/ACL/ACL.xml b/net-mgmt/zabbix-proxy/src/opnsense/mvc/app/models/OPNsense/Zabbixproxy/ACL/ACL.xml deleted file mode 100644 index 6166a2c68..000000000 --- a/net-mgmt/zabbix-proxy/src/opnsense/mvc/app/models/OPNsense/Zabbixproxy/ACL/ACL.xml +++ /dev/null @@ -1,9 +0,0 @@ -