Notes on field names
Each data source in a plugin must be identified by a field name. The following describes the name of the field:
- The characters must be [a-zA-Z0-9_], while the first character must be [a-zA-Z_].
Previously we documented that there the datasource name cannot exceed 19 characters in length. This was a limit inherited by munin 1.0 from rrd. In munin 1.2 this limit has been circumvented.
In sed and perl these RE shold be applied to all field names to make them safe:
As of 1.3.3 and 1.2.6 there are support modules for shell and perl plugins.
A shell plugin would go:
... . $MUNIN_LIBDIR/plugins/plugin.sh ... fieldname="$(clean_fieldname "$dev")" ...
and a perl plugin:
... use Munin::Plugin; ... my $fieldname=clean_fieldname($dev); ...
- "root": a field must not be named "root" http://munin-monitoring.org/ticket/921. Graph generation would be stopped and bad data hard to clean.
Field names with nagios
What characters are allowed in a Nagios service definition?
service_description: This directive is used to define the description of the service, which may contain spaces, dashes, and colons (semicolons, apostrophes, and quotation marks should be avoided). No two services associated with the same host can have the same description. Services are uniquely identified with their host_name and service_description directives.