Griesbacher / nagflux

A connector which copies performancedata from Nagios / Icinga(2) / Naemon to InfluxDB
GNU General Public License v2.0
67 stars 32 forks source link

"Line does not match the schememap", no data written to InfluxDB #23

Closed scream314 closed 7 years ago

scream314 commented 7 years ago

Nagflux says "Info: Line does not match the schememap" for all perfdata, and no measurements are written to InfluxDB.

No host_perfdata_file_template and service_perfdata_file_template defined in nagios.cfg:

2016-12-15 18:29:20 Info: Line does not match the schememap[0.202: USERS OK - 0 users currently logged in: users=0;5;10;0: [SERVICEPERFDATA]: 1481821918: myhost.mydomain: Check Users: 0.039:]

With

host_perfdata_file_template=DATATYPE::HOSTPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tHOSTPERFDATA::$HOSTPERFDATA$\tHOSTCHECKC
OMMAND::$HOSTCHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tHOSTOUTPUT::$HOSTOUTPUT$
service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVIC
EPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\t
SERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$\tSERVICEOUTPUT::$SERVICEOUTPUT$
2016-12-16 19:11:16 Info: Line does not match the schememap[[HOSTPERFDATA]: 1481822728: myhost.mydomain: 0.023: PING OK - Packet loss = 0%, RTA = 0.31 ms: rta=0.310000ms;5000.000000;5000.000000;0.000000 pl=0%;100;100;0:]

With

host_perfdata_file_template=[HOSTPERFDATA]\t$TIMET$\t$HOSTNAME$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$
service_perfdata_file_template=[SERVICEPERFDATA]\t$TIMET$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$
2016-12-16 19:19:54 Info: Line does not match the schememap[0.184: OK - load average: 0.00, 0.01, 0.05: load1=0.000;5.000;10.000;0; load5=0.010;4.000;6.000;0; load15=0.050;3.000;4.000;0;: [SERVICEPERFDATA]: 1481915962: localhost: Current Load: 0.005:]

This is a manual install (go get). Nagios 3 is used. InfluxDB v1.1.0 is running on a remote machine as a Docker container.

scream314 commented 7 years ago

The settings

host_perfdata_file_template=DATATYPE::HOSTPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tHOSTPERFDATA::$HOSTPERFDATA$\tHOSTCHECKC
OMMAND::$HOSTCHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tHOSTOUTPUT::$HOSTOUTPUT$
service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVIC
EPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\t
SERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$\tSERVICEOUTPUT::$SERVICEOUTPUT$

seem to work, Nagflux just needed to process the old data with the wrong (default) format.

Measurements are sent to InfluxDB.