TOML loading config error with my pattern

29 views Asked by At

I am trying to add stats from my dell server (IDRAC 6 EXPRESS) to grafana via telegraf and influxdb. I using code from this dashboard and have this error:

2024-03-10T13:56:20Z I! Loading config: /etc/telegraf/telegraf.conf
2024-03-10T13:56:20Z E! error loading config file /etc/telegraf/telegraf.conf: error parsing data: line 22: invalid TOML syntax

Line 22:
pattern = "^(?P\d{4})(?P\d{2})(?P\d{2})(?P\d{2})(?P\d{2})(?P\d{2})\.(?P\d{6})(?P[-+]\d{3,4})$"

full code here

1

There are 1 answers

0
powersj On

Consider trying a TOML linter like: https://www.toml-lint.com/ to ensure your configuration is valid TOML first. To avoid escaping with normal quotes, consider using single quotes which indicate a string-literal in TOML:

pattern = '^(?P\d{4})(?P\d{2})(?P\d{2})(?P\d{2})(?P\d{2})(?P\d{2})\.(?P\d{6})(?P[-+]\d{3,4})$'