mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net-mgmt/collectd: rename s/collectd/Collectd/g as discussed
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
PLUGIN_NAME= collectd
|
||||
PLUGIN_VERSION= 0.1
|
||||
PLUGIN_COMMENT= Collect system and application performance metrics periodically
|
||||
PLUGIN_DEPENDS= collectd5
|
||||
PLUGIN_MAINTAINER= m.muenz@gmail.com
|
||||
PLUGIN_DEVEL= yes
|
||||
PLUGIN_NAME= collectd
|
||||
PLUGIN_VERSION= 0.1
|
||||
PLUGIN_COMMENT= Collect system and application performance metrics periodically
|
||||
PLUGIN_DEPENDS= collectd5
|
||||
PLUGIN_MAINTAINER= m.muenz@gmail.com
|
||||
PLUGIN_DEVEL= yes
|
||||
|
||||
.include "../../Mk/plugins.mk"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
collectd is a daemon which collects system and application
|
||||
performance metrics periodically and provides mechanisms
|
||||
to store the values in a variety of ways, for example
|
||||
collectd is a daemon which collects system and application
|
||||
performance metrics periodically and provides mechanisms
|
||||
to store the values in a variety of ways, for example
|
||||
in RRD files.
|
||||
|
||||
WWW: http://www.collectd.org
|
||||
|
||||
+4
-3
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright (C) 2015 - 2017 Deciso B.V.
|
||||
* Copyright (C) 2017 Michael Muenz
|
||||
@@ -28,10 +29,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace OPNsense\collectd\Api;
|
||||
namespace OPNsense\Collectd\Api;
|
||||
|
||||
use \OPNsense\Base\ApiControllerBase;
|
||||
use \OPNsense\collectd\General;
|
||||
use \OPNsense\Collectd\General;
|
||||
use \OPNsense\Core\Config;
|
||||
|
||||
class GeneralController extends ApiControllerBase
|
||||
@@ -46,7 +47,7 @@ class GeneralController extends ApiControllerBase
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
public function setAction()
|
||||
{
|
||||
$result = array("result"=>"failed");
|
||||
+4
-4
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright (C) 2015 - 2017 Deciso B.V.
|
||||
* Copyright (C) 2017 Michael Muenz
|
||||
@@ -28,15 +29,15 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace OPNsense\collectd\Api;
|
||||
namespace OPNsense\Collectd\Api;
|
||||
|
||||
use \OPNsense\Base\ApiControllerBase;
|
||||
use \OPNsense\Core\Backend;
|
||||
use \OPNsense\collectd\General;
|
||||
use \OPNsense\Collectd\General;
|
||||
|
||||
/**
|
||||
* Class ServiceController
|
||||
* @package OPNsense\collectd
|
||||
* @package OPNsense\Collectd
|
||||
*/
|
||||
class ServiceController extends ApiControllerBase
|
||||
{
|
||||
@@ -145,4 +146,3 @@ class ServiceController extends ApiControllerBase
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-3
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Copyright (C) 2017 Michael Muenz
|
||||
All rights reserved.
|
||||
@@ -25,14 +26,14 @@
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
namespace OPNsense\collectd;
|
||||
namespace OPNsense\Collectd;
|
||||
|
||||
class GeneralController extends \OPNsense\Base\IndexController
|
||||
{
|
||||
public function indexAction()
|
||||
{
|
||||
$this->view->title = gettext("collectd settings");
|
||||
$this->view->title = gettext("Collectd settings");
|
||||
$this->view->generalForm = $this->getForm("general");
|
||||
$this->view->pick('OPNsense/collectd/general');
|
||||
$this->view->pick('OPNsense/Collectd/general');
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
<id>general.enabled</id>
|
||||
<label>Enable</label>
|
||||
<type>checkbox</type>
|
||||
<help>This will activate the collectd service.</help>
|
||||
<help>This will activate the Collectd service.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>general.hostname</id>
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<acl>
|
||||
<page-services-collectd>
|
||||
<name>Services: collectd</name>
|
||||
<name>Services: Collectd</name>
|
||||
<patterns>
|
||||
<pattern>ui/collectd/*</pattern>
|
||||
<pattern>api/collectd/*</pattern>
|
||||
+4
-3
@@ -1,7 +1,4 @@
|
||||
<?php
|
||||
namespace OPNsense\collectd;
|
||||
|
||||
use OPNsense\Base\BaseModel;
|
||||
|
||||
/*
|
||||
Copyright (C) 2017 Michael Muenz
|
||||
@@ -29,6 +26,10 @@ use OPNsense\Base\BaseModel;
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
namespace OPNsense\Collectd;
|
||||
|
||||
use OPNsense\Base\BaseModel;
|
||||
|
||||
class General extends BaseModel
|
||||
{
|
||||
}
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<model>
|
||||
<mount>//OPNsense/collectd/general</mount>
|
||||
<description>collectd configuration</description>
|
||||
<description>Collectd configuration</description>
|
||||
<items>
|
||||
<enabled type="BooleanField">
|
||||
<default>0</default>
|
||||
-1
@@ -57,4 +57,3 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
mkdir -p /var/db/collectd
|
||||
chown -R root:wheel /var/db/collectd
|
||||
chmod 750 /var/db/collectd
|
||||
chmod 750 /var/db/collectd
|
||||
|
||||
@@ -2,28 +2,28 @@
|
||||
command:/usr/local/opnsense/scripts/collectd/setup.sh;/usr/local/etc/rc.d/collectd start
|
||||
parameters:
|
||||
type:script
|
||||
message:starting collectd
|
||||
message:starting Collectd
|
||||
|
||||
[stop]
|
||||
command:/usr/local/etc/rc.d/collectd stop; exit 0
|
||||
parameters:
|
||||
type:script
|
||||
message:stopping collectd
|
||||
message:stopping Collectd
|
||||
|
||||
[restart]
|
||||
command:/usr/local/opnsense/scripts/collectd/setup.sh;/usr/local/etc/rc.d/collectd restart
|
||||
parameters:
|
||||
type:script
|
||||
message:restarting collectd
|
||||
message:restarting Collectd
|
||||
|
||||
[reconfigure]
|
||||
command:/usr/local/opnsense/scripts/collectd/setup.sh;/usr/local/etc/rc.d/collectd restart
|
||||
parameters:
|
||||
type:script
|
||||
message:reconfigure collectd
|
||||
message:reconfigure Collectd
|
||||
|
||||
[status]
|
||||
command:/usr/local/etc/rc.d/collectd status;exit 0
|
||||
parameters:
|
||||
type:script_output
|
||||
message:request collectd status
|
||||
message:request Collectd status
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{% if helpers.exists('OPNsense.collectd.general.enabled') and OPNsense.collectd.general.enabled == '1' %}
|
||||
collectd_opnsense_bootup_run="/usr/local/opnsense/scripts/OPNsense/Collectd/setup.sh"
|
||||
collectd_enable="YES"
|
||||
{% else %}
|
||||
collectd_enable="NO"
|
||||
{% endif %}"
|
||||
@@ -1 +0,0 @@
|
||||
collectd_enable="{% if helpers.exists('OPNsense.collectd.general.enabled') and OPNsense.collectd.general.enabled == '1' %}YES{% else %}NO{% endif %}"
|
||||
Reference in New Issue
Block a user