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

Nagflux doesn't register HOSTSTATE, HOSTSTATETYPE, SERVICESTATE and SERVICESTATETYPE to InfluxDB #59

Open Captn138 opened 2 years ago

Captn138 commented 2 years ago

I have a Nagios + Nagflux + InfluxDB installed and configured. In my nagios.cfg file, i have service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$. When I take a look at my service-perfdata file, I can clearly see that all the fields have correctly been exported : DATATYPE::SERVICEPERFDATA TIMET::1667206809 HOSTNAME::MYHOST SERVICEDESC::PING SERVICEPERFDATA::rta=1.071000ms;100.000000;500.000000;0.000000 pl=0%;20;60;0 SERVICECHECKCOMMAND::check_ping!100.0,20%!500.0,60% HOSTSTATE::UP HOSTSTATETYPE::HARD SERVICESTATE::OK SERVICESTATETYPE::HARD.

But when I take a look at my InfluxDB, I can only see a part of all these fields :

> use nagflux
Using database nagflux
> show measurements
name: measurements
name
----
metrics
> show tag keys
name: metrics
tagKey
------
command
crit-fill
host
performanceLabel
service
unit
warn-fill
> SELECT * FROM "metrics" WHERE ("service" = 'PING' AND "host" = 'MYHOST') LIMIT 1
name: metrics
time                command    crit crit-fill host   max min performanceLabel service unit value warn warn-fill
----                -------    ---- --------- ----   --- --- ---------------- ------- ---- ----- ---- ---------
1667206509000000000 check_ping 60   none      MYHOST     0   pl               PING    %    0     20   none

Is there something I misconfigured? Is it something that is not supported? I really need to get a filter to get all my services by status.

Versions: