| Commit message (Collapse) | Author | Files | Lines |
|
Closes #89
|
|
|
|
If a datadir would contain characters with a special meaning in regex
(e.g. `/tmp/logs (new)`), then the function would blow up.
|
|
... for instance, when using an overly large "s" parameter.
|
|
Previously, a command is built by string concatenation. Here, the
distinction between a value and multiple params got lost. Solve this
by using an array for shell arguments. As the escaping is now removed
from the `rrd_gen_graph` function, the canvas style needs to manually
add those quotes to make the JS code still work. That only supports
double-quotes, so hopefully nobody creates a name with a double quote
as that would break the fragile JS command line parser.
Separate the rrdtool options from the rrdtool graph command to make the
`$graph_type == 'canvas'` option work (it would otherwise not understand
the `rrdtool graph - -a PNG` option).
Merge the SVG and PNG cases as they are the same except for the
Content-Type header.
Fix a missing html escape in a debug style.
|
|
index.php expects that collectd_hosts() always return an array for
array_diff. Since an empty array evaluates to FALSE anyway, do not
change the type and just return the empty array.
In base.php, if no files are returned, the loop is never called and
three variables are not initialized. Do it now.
|
|
Make build_url return an URL, not HTML. This separates presentation
from data.
plugin_header's return value is unused, remove the unnecessary return.
At places where `printf("<tag att='%s'>", $x);` is used, it is now
converted to `printf("<tag att=\"%s\">", htmlentities($x));` since
the single quote is not escaped by default by htmlentities.
In case the canvas style is used, JS should use `textContent` instead
of `innerHTML` to avoid reading `"` instead of `"`. Nobody (should)
use(s) IE6 anymore, so it is a safe change.
While at it, use the standard charset attribute of meta to specify
the character set (UTF-8).
|
|
Closes #86
|
|
Closes #73
|
|
array_merge resets the index, while in case of $this->colors and
$this->legend, we'd like to keep the index. An irq plugin sample:
array(1 => 1, 'ERR' => 'ERR') must not become
array(0 => 1, 'ERR' => 'ERR') after an array_merge.
|
|
Set $CONFIG['percentile'] to a number and a XXth percentile line + legend
will be added to all network traffic (if_octets) graphs.
Closes #81
|
|
|
|
|
|
Since the previous commit [type/base: show tinstances not defined in
$this->order in graph] all type instances that are not defined in the
plugin, are colored black. This way you always have nice colors.
|
|
Previously if $this->order was defined in a graph, only type instances
that were defined in $this->order showed up in the graph. Now it merges
$this->order and the type instances.
|
|
This had nothing to do with an RRD data source.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The IPMI collectd plugin uses parentheses in filenames (`fanspeed-FAN 1 fan_cooling (29.1).rrd`), so we need to escape them before passing them to rrdtool.
|
|
From the docs:
"No warning is generated if the variable does not exist. That means empty() is
essentially the concise equivalent to !isset($var) || $var == false."
This reverts commit f2a4593558b3a3ec696e9cc1de93fa898b9521bb.
Reported-By: Benoit Monin (https://github.com/pommi/CGP/commit/f2a4593)
|
|
|
|
Fix php notices emitted when generating graphs of ping, sensors and
hddtemp plugins.
|
|
|
|
Since commit v0.3-97-g5793a8c [integrate jsrrdgraph in CGP], double quotes have
been removed around filenames and legend because it shouldn't be necessary (and
jsrrdgraph didn't support it).
This broke graphs rendered using jsrrdgraph with files including spaces in it's
name. Hopefully this is fixed now by rawurlencoding them (but the /).
|
|
Since commit v0.3-97-g5793a8c [integrate jsrrdgraph in CGP], double quotes have
been removed around filenames and legend because it shouldn't be necessary (and
jsrrdgraph didn't support it).
This broke graphs rendered by rrdtool with files including a colon in it's
name. Hopefully this is fixed now by double escaping them.
Reported-by: Poil <poil@quake.fr> (https://github.com/pommi/CGP/issues/20)
|
|
It caused an "Unknown argument: undefined" error when using canvas.
|
|
Use $_SERVER['PATH_INFO'] instead.
|
|
|
|
|
|
|
|
|
|
|
|
Reference: http://rrdtool.mirror.graemef.net/doc/rrdfetch.en.html#IAT_STYLE_TIME_SPECIFICATION
|
|
Reported-by: Philipp Hellmich <Philipp.Hellmich@Bertelsmann.de>
|
|
Reported-by: Philipp Hellmich <Philipp.Hellmich@Bertelsmann.de>
|
|
This problem showed up with IPv6 addresses in the NTP plugin.
Forgotten in commit:
v0.3-51-g330c94f [type: escape colons in filenames used in rrd commandline]
|
|
|
|
this should keep the error.log clean
|
|
|
|
Since commit collectd-4.10.0-88-g02e12db the varnish plugin groups collected
values in categories. The collectd filestructure used for varnish is now:
<plugin>-<category>-<plugin_instance>/<type>-<type_instance>
Because this isn't distinguishable from a regular plugin like df, ...
df-var-tmp/df_complex-free.rrd ("var" isn't the category here)
... the category is only set with the varnish plugin.
Reported-by: Jonathan Huot <jonathan.huot@gmail.com>
|
|
|
|
A colon ':' in a legend argument will mark the end of the legend:
http://oss.oetiker.ch/rrdtool/doc/rrdgraph_graph.en.html#INOTES_on_legend_arguments
Reported-by: Benjamin Dupuis <poil@quake.fr>
|