[0.12.* -> 0.13.*] Additional Changed Upgrade Behaviour with tagpass
[[inputs.]] [inputs..tagpass] tag = ["bar"]
Will no longer match "tag=foobar" whereas behaviour in 0.12.* this was possible.
In order to match now it must be changed to: (Note missing trailing asterisk)
[[inputs.]] [inputs..tagpass] tag = ["*bar"]
Can cause data capture loss on upgrade
EDIT: Please note issue no longer persists in v1.0.0-beta1
that sounds like it might be a bug in the glob library https://github.com/gobwas/glob, bar* should match bar in standard wildcard syntax, but I can investigate an open an issue with that project if it's not the case.
@Will-Beninger I haven't been able to reproduce the issue, are you sure there is not something else wrong with your tag matching?
for example, this config:
# Read metrics about cpu usage
[[inputs.cpu]]
## Whether to report per-cpu stats or not
percpu = true
## Whether to report total system cpu stats or not
totalcpu = true
## Comment this line if you want the raw CPU time metrics
# fielddrop = ["time_*"]
fieldpass = ["usage_idle", "usage_system", "usage_user"]
[inputs.cpu.tagpass]
cpu = ["*cpu-total*"]
produces this output (see that it matches cpu-total, even with the trailing *
cpu,cpu=cpu-total,host=tyrion usage_idle=91.15221194701324,usage_system=4.348912771807048,usage_user=4.498875281179705 1463572000005477307
feel free to re-open if the issue is not solved.
@sparrc Sorry about ghosting on you there, I wasn't receiving notifications for this issue for some reason... I'm not a collaborator so I'll need you to re-open the issue.
I'm able to reproduce (0.13.1) via the ipmi_sensor plugin with the following config:
[[inputs.ipmi_sensor]]
servers = ["root:calvin1234@lanplus(host)"]
[inputs.ipmi_sensor.tagpass]
name = ["*inlet*","*cpu*","*exhaust"]
Gives me the following:
]# telegraf -config mytest.conf -test
* Plugin: ipmi_sensor, Collection 1
> ipmi_sensor,host=host,name=01-inlet_ambient,server=host,unit=degrees_c status=1i,value=17 1464984686991230161
> ipmi_sensor,host=host,name=02-cpu_1,server=host,unit=degrees_c status=1i,value=40 1464984686991313389
> ipmi_sensor,host=host,name=03-cpu_2,server=host,unit=degrees_c status=1i,value=40 1464984686991341250
> ipmi_sensor,host=host,name=21-sys_exhaust,server=host,unit=degrees_c status=1i,value=29 1464984686991431736
Whereas with this config, I lose "exhaust":
[[inputs.ipmi_sensor]]
servers = ["root:calvin1234@lanplus(host)"]
[inputs.ipmi_sensor.tagpass]
name = ["*inlet*","*cpu*","*exhaust*"]
# telegraf -config mytest.conf -test
* Plugin: ipmi_sensor, Collection 1
> ipmi_sensor,host=host,name=01-inlet_ambient,server=host,unit=degrees_c status=1i,value=17 1464984704430049797
> ipmi_sensor,host=host,name=02-cpu_1,server=host,unit=degrees_c status=1i,value=40 1464984704430134308
> ipmi_sensor,host=host,name=03-cpu_2,server=host,unit=degrees_c status=1i,value=40 1464984704430178440
@Will-Beninger It could be that the ipmi_sensor plugin is missing some stats when running in "test" mode. Do you see this when you're running at regular intervals?
I'm trying to reproduce but not having any luck, I'm outputting the same metrics using the exec plugin:
/tmp/ipmi.sh:
#!/bin/sh
printf "ipmi_sensor,host=host,name=01-inlet_ambient,server=host,unit=degrees_c status=1i,value=17 1464984686991230161
ipmi_sensor,host=host,name=02-cpu_1,server=host,unit=degrees_c status=1i,value=40 1464984686991313389
ipmi_sensor,host=host,name=03-cpu_2,server=host,unit=degrees_c status=1i,value=40 1464984686991341250
ipmi_sensor,host=host,name=21-sys_exhaust,server=host,unit=degrees_c status=1i,value=29 1464984686991431736
"
telegraf.conf:
# Read metrics from one or more commands that can output to stdout
[[inputs.exec]]
## Commands array
commands = [
"/tmp/ipmi.sh",
]
## Timeout for each command to complete.
timeout = "5s"
## Data format to consume.
## Each data format has it's own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
data_format = "influx"
[inputs.exec.tagpass]
name = ["*inlet*","*cpu*","*exhaust*"]
output:
% telegraf -config ~/db/ws/telegraf.conf -input-filter exec -test
* Plugin: exec, Collection 1
> ipmi_sensor,host=host,name=01-inlet_ambient,server=host,unit=degrees_c status=1i,value=17 1464984686991230161
> ipmi_sensor,host=host,name=02-cpu_1,server=host,unit=degrees_c status=1i,value=40 1464984686991313389
> ipmi_sensor,host=host,name=03-cpu_2,server=host,unit=degrees_c status=1i,value=40 1464984686991341250
> ipmi_sensor,host=host,name=21-sys_exhaust,server=host,unit=degrees_c status=1i,value=29 1464984686991431736
@sparrc Yes, I am seeing it missing at regular intervals and that's how it was initially noticed. We started missing temperature data right from the point of updating Telegraf from 0.12 => 0.13.0/0.13.1
It's NOT occuring in v1.0.0-beta1 however now that I'm testing it but still in v0.13.1... Should we just leave it alone knowing that it'll go away?
Version:
# ./telegraf -version
Telegraf - version v1.0.0-beta1
telegraf.conf:
[[inputs.ipmi_sensor]]
name_suffix = "_with"
servers = ["root:calvin1234@lanplus(remotehost)",]
[inputs.ipmi_sensor.tagpass]
name = ["*inlet*","*cpu*","*exhaust*"]
[[inputs.ipmi_sensor]]
name_suffix = "_without"
servers = ["root:calvin1234@lanplus(remotehost)",]
[inputs.ipmi_sensor.tagpass]
name = ["*inlet*","*cpu*","*exhaust"]
Output:
# ./telegraf -config telegraf.conf -test
* Plugin: ipmi_sensor, Collection 1
> ipmi_sensor_with,host=remotehost,name=01-inlet_ambient,server=remotehost,unit=degrees_c status=1i,value=16 1465847637806792542
> ipmi_sensor_with,host=remotehost,name=02-cpu_1,server=remotehost,unit=degrees_c status=1i,value=40 1465847637806926067
> ipmi_sensor_with,host=remotehost,name=03-cpu_2,server=remotehost,unit=degrees_c status=1i,value=40 1465847637806959925
> ipmi_sensor_with,host=remotehost,name=21-sys_exhaust,server=remotehost,unit=degrees_c status=1i,value=29 1465847637807067496
* Plugin: ipmi_sensor, Collection 1
> ipmi_sensor_without,host=remotehost,name=01-inlet_ambient,server=remotehost,unit=degrees_c status=1i,value=16 1465847639940172089
> ipmi_sensor_without,host=remotehost,name=02-cpu_1,server=remotehost,unit=degrees_c status=1i,value=40 1465847639940302178
> ipmi_sensor_without,host=remotehost,name=03-cpu_2,server=remotehost,unit=degrees_c status=1i,value=40 1465847639940360081
> ipmi_sensor_without,host=remotehost,name=21-sys_exhaust,server=remotehost,unit=degrees_c status=1i,value=29 1465847639940458558
For completeness here's version 0.13.1:
# telegraf -version
Telegraf - version 0.13.1
Same config file above and has the following output:
# telegraf -config telegraf.conf -test
* Plugin: ipmi_sensor, Collection 1
> ipmi_sensor_with,host=remotehost,name=01-inlet_ambient,server=remotehost,unit=degrees_c status=1i,value=17 1465847997884818131
> ipmi_sensor_with,host=remotehost,name=02-cpu_1,server=remotehost,unit=degrees_c status=1i,value=40 1465847997884931941
> ipmi_sensor_with,host=remotehost,name=03-cpu_2,server=remotehost,unit=degrees_c status=1i,value=40 1465847997884961546
* Plugin: ipmi_sensor, Collection 1
> ipmi_sensor_without,host=remotehost,name=01-inlet_ambient,server=remotehost,unit=degrees_c status=1i,value=17 1465848000155071875
> ipmi_sensor_without,host=remotehost,name=02-cpu_1,server=remotehost,unit=degrees_c status=1i,value=40 1465848000155189386
> ipmi_sensor_without,host=remotehost,name=03-cpu_2,server=remotehost,unit=degrees_c status=1i,value=40 1465848000155229792
> ipmi_sensor_without,host=remotehost,name=21-sys_exhaust,server=remotehost,unit=degrees_c status=1i,value=29 1465848000155297843
thanks for updating @Will-Beninger, I'm going to mark as closed as there were some changes to that code in 1.0.0 beta1 and it's probably not worth the effort investigating further. Feel free to open a new issue if you see it again.