Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Captn138 opened this issue Oct 31, 2022 · 0 comments

Comments

@Captn138
Copy link

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?)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant