Skip to content

Latest commit

 

History

History
138 lines (76 loc) · 2.89 KB

naemon2influx-grafana-helper.rules.pod

File metadata and controls

138 lines (76 loc) · 2.89 KB

NAME

naemon2influx-grafana-helper.rules

DESCRIPTION

naemon2influx.cfgiguration file. Configuration is line based. Comments can be added by prefixing with "#". The default location for this file is /etc/naemon/naemon2influx.cfg.

OPTIONS

Options are case insensitive.

database

This option is required when writing to InfluxDB's TCP listener.

debug

The debug verbosity to be used if not specified on the command line.

global_prefix

If specified, all metrics will be prefixed with this value and a ".".

output

stdout: parsed results are written to stdout. This is the expected mechanism to write to InfluxDB's UDP listener.

The URL (in the form http://host:port) of InfluxDB's TCP listener.

username password

Required when writing to InfluxDB's TCP listener with authentication enabled.

perfdata

The locaiton of the Nagios performance datafile.

perfdelimiter

A regular experession used to break a performance datafile line into component fields.

perfformat

The format of the performance dataline line. Delimiters here must be literals.

Columns can be described in one of the following ways.

data

The performace data. Metics must follow the Nagios performace data standard. See Nagios documentation for further details.

label

The name on the metric. This is usually the service name.

tag=name

A field used to tag the metric with the value given be name.

time

The timestamp field .

void

A field to be discarded.

EXAMPLES

To process the Nagios default installed performace datafile of format:

$LASTSERVICECHECK$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICESTATE$\t$SERVICEATTEMPT$\t$SERVICESTATETYPE$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$

Results are written to InfluxDB's Nagios database (via local TCP listener).

database=Nagios
debug=0
global_prefix=naemon
output=http://localhost:8086
username=naemon
password=naemon
perfdata=/var/naemon/service-perfdata.out
perfdelimiter=\t
perfformat=time tag=hostname    label   tag=state       void    void    void    void    void    data

Note: the format here uses tabs.

To process the preformace data format used by the naemongraphs plugin specified as

$LASTSERVICECHECK$||$HOSTNAME$||$SERVICEDESC$||$SERVICEOUTPUT$||$SERVICEPERFDATA$

debug=0
perfdata=/var/spool/naemon/perfdata.log
perfdelimiter=\|\|
perfformat=time||tag=hostname||label||void||data
output=stdout

Metrics are written to stdout.

If the -n (or --preserve) option is used on the command line, the datafile can be processes by naemongraph after being processed by naemon2influx. Note the need to esacape the delimiter.

ENVIRONMENT

None.

FILES

/usr/bin/naemon2influx

AUTHOR

Andrew Pickin

SEE ALSO

naemon2influx(1)