-
Notifications
You must be signed in to change notification settings - Fork 578
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
InfluxWriter should store one record containing all perfdata per data point #7060
Comments
I'm not a friend of config options making things work in one and another direction and schema. That will become hard to support. Since you'll write about the limitations of the InfluxDB query language, isn't that something this should be solved there? I've read that 2.0 changes quite a few things and introduces a new query language. That may be the better direction. @Mikesch-mp might also know more, I know as much of InfluxDB as I know how to ship simple data. |
@dnsmichi This is less about config options and more about the way data is stored in InfluxDB. Having a configurable option is just a suggestion on how to avoid incompatibility with existing consumers. While you are right that the query language should allow combining data across records, it's currently a fact that it doesn't and that effectively kills a valid use case. I'd be happy to wait and see what Influx 2.0 offers, but it may also get worse... I'd also be interested in why data is stored in separate records in the first place. Not putting everything gathered from a single check into a single record wastes space and may lead to ambiguities. |
Discussed this with @dnsmichi, the change itself wouldn't be complicated. This would however cause some extra work for:
Transition to a new default would involve multiple release cycles. What we're sending right now is something like this:
Not exactly like this, but similar. What @onitake expects is:
This would be a lot easier to handle in Grafana / in an InfluxDB query. When implementing this we should also take care of perfdata using the
Creating dynamic dashboards similar to we're building right now for Icinga vSphereDB would then become a lot easier. Cheers, |
Hi, thanks, now I understand things better. One thing to note for metadata and thresholds ... I am not sure how this could be stored in a changed format. Current behaviour
Desired behaviour
Something else, string prefix, or similar? Cheers, |
For the records, the syntax is roughly:
As far as I can recall, in Icinga 2
The proposed change would result in this output:
Now let's pick a more advanced example, a check plugin writing perfdata according to the
This should be transformed into:
That way we would have InfluxDB data structured in a way the plugin writer expected them to look like. As you can see, I left out the optional meta parameters (warn/crit/limits). When you opt in for them they must be prefixed with the related label, as they differ per field. This would read as follows:
@onitake: would this match you expect to see? |
This is pretty much what I'm looking for, yes. Thanks for the additional insights on the limits and duplication. One thing to note is that tags are stored efficiently (i.e. they are indexed), while fields are written as-is. So, if you store the limits as fields, they will likely increase database size significantly. |
... for enabling an alternative schema. refs #7060
For the record, I'd also benefit from this. Currently I have to visually subtract cached memory from used memory in Grafana. With e.g. #8177 Grafana could subtract this for me. |
... for enabling an alternative schema. refs #7060
Is your feature request related to a problem? Please describe.
The InfluxWriter addon writes performance data as individual metric-value pairs into InfluxDB.
This is fine for creating simple queries on individual data points, but makes it practically impossible to query across multiple metrics, even if they come from the same check.
Describe the solution you'd like
Instead of single values tagged with a metric, only a single record for each check should be created, with the metric fields keyed as the name of the metric instead of a generic "value" and a tag that specifies the metric.
So, instead of this:
We would have this:
Describe alternatives you've considered
Due to limitations in the InfluxDB query language, the only possibility to combine metrics would be some sort of meta-query, but that must be implemented in the system that display the results. In Grafana, such a feature is being considered, but remains missing at present.
Additional context
Discussion on the Grafana bug tracker: grafana/grafana#12324
I understand this may make other use cases (like automatically generated, separate graphs) more difficult to create, but it would greatly simplify build special-purpose graphs like for network bandwidth (as seen above). Perhaps a configuration option could be added to the addon to enable this kind of behaviour?
The text was updated successfully, but these errors were encountered: