Telegraf: Processor Plugins

Aus Wiki-WebPerfect
Version vom 6. Mai 2020, 09:45 Uhr von Admin (Diskussion | Beiträge)

(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Wechseln zu: Navigation, Suche


Troubleshooting

Error: [telegraf] Error running agent: Error parsing <C:\your_config_file_path>, line x: invalid TOML syntax

Example: Configuration with the error:

 [[processors.regex]]
   namepass = ["hyperv_processor"]
  
   [[processors.regex.tags]]
     key = "instance"
     pattern = "^(?P<VMName>.+)\:.+$"
     replacement = "${VMName}"
     result_key = "VMName" 


Solution: Write the "pattern" between singleqoutes instead between doublequotes

Example: Configuration without the error:

 [[processors.regex]]
   namepass = ["hyperv_processor"]
  
   [[processors.regex.tags]]
     key = "instance"
     pattern = '^(?P<VMName>.+)\:.+$'
     replacement = "${VMName}"
     result_key = "VMName"