diff options
author | Pim van den Berg | 2009-11-04 21:05:37 +0100 |
---|---|---|
committer | Pim van den Berg | 2009-11-04 21:05:37 +0100 |
commit | aa454ff4b3d4d5be9d5cc9dff4b4246c6e655f3e (patch) | |
tree | 82b5e617ead0c3b50bbb0fb296f280be0b90a61e /plugin | |
parent | make dynamic title more detailed (diff) | |
download | apt-panopticon_cgp-aa454ff4b3d4d5be9d5cc9dff4b4246c6e655f3e.zip apt-panopticon_cgp-aa454ff4b3d4d5be9d5cc9dff4b4246c6e655f3e.tar.gz apt-panopticon_cgp-aa454ff4b3d4d5be9d5cc9dff4b4246c6e655f3e.tar.bz2 apt-panopticon_cgp-aa454ff4b3d4d5be9d5cc9dff4b4246c6e655f3e.tar.xz |
remove path_format from plugins
The relative path to an rrd file can be generated based on host, plugin,
plugin instance, type and type instance. In this case path_format is not
needed anymore.
This commit includes code based on the collectd_identifier function from
php-collection by Bruno Prémont.
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/cpu.php | 1 | ||||
-rw-r--r-- | plugin/df.php | 1 | ||||
-rw-r--r-- | plugin/disk.php | 1 | ||||
-rw-r--r-- | plugin/entropy.php | 1 | ||||
-rw-r--r-- | plugin/interface.php | 1 | ||||
-rw-r--r-- | plugin/irq.php | 1 | ||||
-rw-r--r-- | plugin/load.php | 1 | ||||
-rw-r--r-- | plugin/memory.php | 1 | ||||
-rw-r--r-- | plugin/processes.php | 1 | ||||
-rw-r--r-- | plugin/sensors.php | 1 | ||||
-rw-r--r-- | plugin/swap.php | 1 | ||||
-rw-r--r-- | plugin/users.php | 1 |
12 files changed, 0 insertions, 12 deletions
diff --git a/plugin/cpu.php b/plugin/cpu.php index 04ef3a4..d750a3a 100644 --- a/plugin/cpu.php +++ b/plugin/cpu.php | |||
@@ -22,7 +22,6 @@ $tinstance = collectd_plugindetail($host, $plugin, 'ti'); | |||
22 | 22 | ||
23 | $obj = new Type_GenericStacked; | 23 | $obj = new Type_GenericStacked; |
24 | $obj->datadir = $CONFIG['datadir']; | 24 | $obj->datadir = $CONFIG['datadir']; |
25 | $obj->path_format = '{host}/{plugin}-{pinstance}/{type}-{tinstance}.rrd'; | ||
26 | $obj->args = array( | 25 | $obj->args = array( |
27 | 'host' => $host, | 26 | 'host' => $host, |
28 | 'plugin' => $plugin, | 27 | 'plugin' => $plugin, |
diff --git a/plugin/df.php b/plugin/df.php index 780ca0c..f4dd5d6 100644 --- a/plugin/df.php +++ b/plugin/df.php | |||
@@ -12,7 +12,6 @@ require_once 'type/GenericStacked.class.php'; | |||
12 | 12 | ||
13 | $obj = new Type_GenericStacked; | 13 | $obj = new Type_GenericStacked; |
14 | $obj->datadir = $CONFIG['datadir']; | 14 | $obj->datadir = $CONFIG['datadir']; |
15 | $obj->path_format = '{host}/{plugin}/{type}-{tinstance}.rrd'; | ||
16 | $obj->args = array( | 15 | $obj->args = array( |
17 | 'host' => $host, | 16 | 'host' => $host, |
18 | 'plugin' => $plugin, | 17 | 'plugin' => $plugin, |
diff --git a/plugin/disk.php b/plugin/disk.php index e73cbac..0c18016 100644 --- a/plugin/disk.php +++ b/plugin/disk.php | |||
@@ -14,7 +14,6 @@ require_once 'type/GenericIO.class.php'; | |||
14 | 14 | ||
15 | $obj = new Type_GenericIO; | 15 | $obj = new Type_GenericIO; |
16 | $obj->datadir = $CONFIG['datadir']; | 16 | $obj->datadir = $CONFIG['datadir']; |
17 | $obj->path_format = '{host}/{plugin}-{pinstance}/{type}.rrd'; | ||
18 | $obj->args = array( | 17 | $obj->args = array( |
19 | 'host' => $host, | 18 | 'host' => $host, |
20 | 'plugin' => $plugin, | 19 | 'plugin' => $plugin, |
diff --git a/plugin/entropy.php b/plugin/entropy.php index 58d810b..dcfbcc8 100644 --- a/plugin/entropy.php +++ b/plugin/entropy.php | |||
@@ -10,7 +10,6 @@ require_once 'type/Default.class.php'; | |||
10 | 10 | ||
11 | $obj = new Type_Default; | 11 | $obj = new Type_Default; |
12 | $obj->datadir = $CONFIG['datadir']; | 12 | $obj->datadir = $CONFIG['datadir']; |
13 | $obj->path_format = '{host}/{plugin}/{type}.rrd'; | ||
14 | $obj->args = array( | 13 | $obj->args = array( |
15 | 'host' => $host, | 14 | 'host' => $host, |
16 | 'plugin' => $plugin, | 15 | 'plugin' => $plugin, |
diff --git a/plugin/interface.php b/plugin/interface.php index bda0550..a3fca3d 100644 --- a/plugin/interface.php +++ b/plugin/interface.php | |||
@@ -13,7 +13,6 @@ require_once 'type/GenericIO.class.php'; | |||
13 | 13 | ||
14 | $obj = new Type_GenericIO; | 14 | $obj = new Type_GenericIO; |
15 | $obj->datadir = $CONFIG['datadir']; | 15 | $obj->datadir = $CONFIG['datadir']; |
16 | $obj->path_format = '{host}/{plugin}/{type}-{tinstance}.rrd'; | ||
17 | $obj->args = array( | 16 | $obj->args = array( |
18 | 'host' => $host, | 17 | 'host' => $host, |
19 | 'plugin' => $plugin, | 18 | 'plugin' => $plugin, |
diff --git a/plugin/irq.php b/plugin/irq.php index 6a05245..e442142 100644 --- a/plugin/irq.php +++ b/plugin/irq.php | |||
@@ -16,7 +16,6 @@ sort($tinstance); | |||
16 | 16 | ||
17 | $obj = new Type_GenericStacked; | 17 | $obj = new Type_GenericStacked; |
18 | $obj->datadir = $CONFIG['datadir']; | 18 | $obj->datadir = $CONFIG['datadir']; |
19 | $obj->path_format = '{host}/{plugin}/{type}-{tinstance}.rrd'; | ||
20 | $obj->args = array( | 19 | $obj->args = array( |
21 | 'host' => $host, | 20 | 'host' => $host, |
22 | 'plugin' => $plugin, | 21 | 'plugin' => $plugin, |
diff --git a/plugin/load.php b/plugin/load.php index 17002ea..0246edc 100644 --- a/plugin/load.php +++ b/plugin/load.php | |||
@@ -10,7 +10,6 @@ require_once 'type/Default.class.php'; | |||
10 | 10 | ||
11 | $obj = new Type_Default; | 11 | $obj = new Type_Default; |
12 | $obj->datadir = $CONFIG['datadir']; | 12 | $obj->datadir = $CONFIG['datadir']; |
13 | $obj->path_format = '{host}/{plugin}/{type}.rrd'; | ||
14 | $obj->args = array( | 13 | $obj->args = array( |
15 | 'host' => $host, | 14 | 'host' => $host, |
16 | 'plugin' => $plugin, | 15 | 'plugin' => $plugin, |
diff --git a/plugin/memory.php b/plugin/memory.php index 29f93fe..6cef5a7 100644 --- a/plugin/memory.php +++ b/plugin/memory.php | |||
@@ -18,7 +18,6 @@ $tinstance = collectd_plugindetail($host, $plugin, 'ti'); | |||
18 | 18 | ||
19 | $obj = new Type_GenericStacked; | 19 | $obj = new Type_GenericStacked; |
20 | $obj->datadir = $CONFIG['datadir']; | 20 | $obj->datadir = $CONFIG['datadir']; |
21 | $obj->path_format = '{host}/{plugin}/{type}-{tinstance}.rrd'; | ||
22 | $obj->args = array( | 21 | $obj->args = array( |
23 | 'host' => $host, | 22 | 'host' => $host, |
24 | 'plugin' => $plugin, | 23 | 'plugin' => $plugin, |
diff --git a/plugin/processes.php b/plugin/processes.php index 32a925d..c741a02 100644 --- a/plugin/processes.php +++ b/plugin/processes.php | |||
@@ -20,7 +20,6 @@ $tinstance = collectd_plugindetail($host, $plugin, 'ti'); | |||
20 | 20 | ||
21 | $obj = new Type_GenericStacked; | 21 | $obj = new Type_GenericStacked; |
22 | $obj->datadir = $CONFIG['datadir']; | 22 | $obj->datadir = $CONFIG['datadir']; |
23 | $obj->path_format = '{host}/{plugin}/{type}-{tinstance}.rrd'; | ||
24 | $obj->args = array( | 23 | $obj->args = array( |
25 | 'host' => $host, | 24 | 'host' => $host, |
26 | 'plugin' => $plugin, | 25 | 'plugin' => $plugin, |
diff --git a/plugin/sensors.php b/plugin/sensors.php index c7f038b..b1b15cf 100644 --- a/plugin/sensors.php +++ b/plugin/sensors.php | |||
@@ -17,7 +17,6 @@ $tinstance = collectd_plugindetail($host, $plugin, 'ti', array('t' => $type)); | |||
17 | 17 | ||
18 | $obj = new Type_Default; | 18 | $obj = new Type_Default; |
19 | $obj->datadir = $CONFIG['datadir']; | 19 | $obj->datadir = $CONFIG['datadir']; |
20 | $obj->path_format = '{host}/{plugin}-{pinstance}/{type}-{tinstance}.rrd'; | ||
21 | $obj->args = array( | 20 | $obj->args = array( |
22 | 'host' => $host, | 21 | 'host' => $host, |
23 | 'plugin' => $plugin, | 22 | 'plugin' => $plugin, |
diff --git a/plugin/swap.php b/plugin/swap.php index d1ba823..7160ec3 100644 --- a/plugin/swap.php +++ b/plugin/swap.php | |||
@@ -17,7 +17,6 @@ $tinstance = collectd_plugindetail($host, $plugin, 'ti'); | |||
17 | 17 | ||
18 | $obj = new Type_GenericStacked; | 18 | $obj = new Type_GenericStacked; |
19 | $obj->datadir = $CONFIG['datadir']; | 19 | $obj->datadir = $CONFIG['datadir']; |
20 | $obj->path_format = '{host}/{plugin}/{type}-{tinstance}.rrd'; | ||
21 | $obj->args = array( | 20 | $obj->args = array( |
22 | 'host' => $host, | 21 | 'host' => $host, |
23 | 'plugin' => $plugin, | 22 | 'plugin' => $plugin, |
diff --git a/plugin/users.php b/plugin/users.php index 41d4c25..00874a2 100644 --- a/plugin/users.php +++ b/plugin/users.php | |||
@@ -10,7 +10,6 @@ require_once 'type/Default.class.php'; | |||
10 | 10 | ||
11 | $obj = new Type_Default; | 11 | $obj = new Type_Default; |
12 | $obj->datadir = $CONFIG['datadir']; | 12 | $obj->datadir = $CONFIG['datadir']; |
13 | $obj->path_format = '{host}/{plugin}/{type}.rrd'; | ||
14 | $obj->args = array( | 13 | $obj->args = array( |
15 | 'host' => $host, | 14 | 'host' => $host, |
16 | 'plugin' => $plugin, | 15 | 'plugin' => $plugin, |