You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Install method: dpkg install from manual package compilation
ONTAP Version: CDOT 9.5
To Reproduce
Steps to reproduce the behavior:
Declare a subtemplate of zapiperf collector (registered on defaults.yaml zapiperf collector configuration file, only this subtemplate for test) and try to add node, uuid, model and serial as influxdb tags:
DEBUG tag was added to original code to show content of instance_keys:
func (e *InfluxDB) Render(data *matrix.Matrix) ([][]byte, error) {
...
if x := data.GetExportOptions().GetChildS("instance_labels"); x != nil {
labels_to_include = x.GetAllChildContentS()
}
e.Logger.Trace().Msgf("DEBUG Keys: [%s]", strings.Join(keys_to_include, ", "))
...
// tag set
if include_all {
for label, value := range instance.GetLabels().Map() {
if value != "" {
m.AddTag(label, value)
}
}
} else {
for _, key := range keys_to_include {
e.Logger.Trace().Msgf("DEBUG Key: %s", key)
if value, has := instance.GetLabels().GetHas(key); has && value != "" {
m.AddTag(key, value)
}
}
}
...
When I delete the "export_options" from configuration file, it seems that program switch to "include_all" mode because all labels are included in influxdb tags :
Harvest expects that object names are unique for each collector
object is mapped to measurement in InfluxDB, which again has to be unique
Since the ZapiPerf collector already has a subtemplate for object node (system_node.yaml), it seems like that these two objects/measurements (and their tag-sets) collide in your InfluxDB.
What you can do is rename the object in your custom subtemplate and make sure it's unique. (Sometimes it's OK to have two subtemplates for the same object, as long as you make sure that the exported labels/fields are consistent).
Also be aware that the collector will rename instance_name to the value of object.
@albinpopote, as a side note: it's better to register your subtemplate in custom.yaml instead of default.yaml, so you don't loose changes after next update. See updated doc.
Describe the bug
When I declare instance keys on collector subtemplate, not all keys are set to Influxdb tags
Environment
Provide accurate information about the environment to help us reproduce the issue.
To Reproduce
Steps to reproduce the behavior:
Declare a subtemplate of zapiperf collector (registered on defaults.yaml zapiperf collector configuration file, only this subtemplate for test) and try to add node, uuid, model and serial as influxdb tags:
Launch the command :
Check the logs:
DEBUG tag was added to original code to show content of instance_keys:
When I delete the "export_options" from configuration file, it seems that program switch to "include_all" mode because all labels are included in influxdb tags :
It seems that the content of instance_keys was filtering but I don't know why....
The text was updated successfully, but these errors were encountered: