Add addTag debugging in ifname plugin (#8018)
This commit is contained in:
parent
60d402d827
commit
54f9e33208
|
|
@ -139,13 +139,13 @@ func (d *IfName) Init() error {
|
||||||
func (d *IfName) addTag(metric telegraf.Metric) error {
|
func (d *IfName) addTag(metric telegraf.Metric) error {
|
||||||
agent, ok := metric.GetTag(d.AgentTag)
|
agent, ok := metric.GetTag(d.AgentTag)
|
||||||
if !ok {
|
if !ok {
|
||||||
//agent tag missing
|
d.Log.Warn("Agent tag missing.")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
num_s, ok := metric.GetTag(d.SourceTag)
|
num_s, ok := metric.GetTag(d.SourceTag)
|
||||||
if !ok {
|
if !ok {
|
||||||
//source tag missing
|
d.Log.Warn("Source tag missing.")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue