wiki:notes_on_datasource_names

Notes on field names

Attention:The content of this page has been moved to the Munin Guide Data source attributes and Validate fieldnames This wiki page has therefore been set to "Read only" and later will be purged.

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:

s/^[^A-Za-z_]/_/
s/[^A-Za-z0-9_]/_/g

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);

...

Reserved keyword(s)

Field names with nagios

What characters are allowed in a Nagios service definition?

From https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/3/en/objectdefinitions.html#host

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.

Last modified at 2016-10-21T14:47:49+02:00 Last modified on 2016-10-21T14:47:49+02:00