aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/inc
diff options
context:
space:
mode:
authorPim van den Berg2014-07-24 00:10:57 +0200
committerPim van den Berg2014-07-24 00:10:57 +0200
commit832cbb54f1d60c53f37012073b1c09263006cd91 (patch)
treea789eda8340c4de6dbf9b3dea599162abd5b315a /inc
parentRemove from all files the ending php tag (diff)
downloadapt-panopticon_cgp-832cbb54f1d60c53f37012073b1c09263006cd91.zip
apt-panopticon_cgp-832cbb54f1d60c53f37012073b1c09263006cd91.tar.gz
apt-panopticon_cgp-832cbb54f1d60c53f37012073b1c09263006cd91.tar.bz2
apt-panopticon_cgp-832cbb54f1d60c53f37012073b1c09263006cd91.tar.xz
inc/collectd: get_host_rrd_files: filter non-plugin .rrd files
Closes #92
Diffstat (limited to 'inc')
-rw-r--r--inc/collectd.inc.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/inc/collectd.inc.php b/inc/collectd.inc.php
index 761f7c4..201d8ce 100644
--- a/inc/collectd.inc.php
+++ b/inc/collectd.inc.php
@@ -33,7 +33,10 @@ function get_host_rrd_files($dir) {
33 '/\.rrd$/'); 33 '/\.rrd$/');
34 34
35 foreach($objects as $object) { 35 foreach($objects as $object) {
36 $files[] = str_replace($dir.'/', '', $object->getPathname()); 36 $relativePathName = str_replace($dir.'/', '', $object->getPathname());
37 if (!preg_match('/^.+\/.+\.rrd$/', $relativePathName))
38 continue;
39 $files[] = $relativePathName;
37 } 40 }
38 41
39 return $files; 42 return $files;