Skip to content

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

@Captn138

Description

@Captn138

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:

  • Nagflux : 0.4.1, binary from releases section (I can't compile due to apparently deprecated command and I don't know anything about go)
  • Nagios : 4.4.8, compiled from source
  • InfluxDB : 1.8.10, installad from yum (I see there is a version 2 of InfluxDB, could my issue come from there?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions