I’m running Grafana 9.1.3 on Rocky Linux 8. I am using Telegraf with Influx for SNMP Data. I’ve got a column called last run time returning a String that looks like this
2022/Sep/13/15.18.22UTC
I’m trying to reformat this to be a Time value, or even just reformat the string to support different formatting for time. I’m trying to use Transforms for this, but it seems like this might not be the actual solution, or at least if it is, I’m unable to get it to work.
Rename by Regex isn’t doing anything for me and based on other articles I’m not sure it is meant to do this. I’m trying to display the data as a table.
The regex I have written seems to work online when I test my syntax, but also has no impact on the results.
Thank you for the suggestion! I can’t modify the source since its SNMP data, but I’ll have to look at if there is anything I can do with the influx database.
if you use the default canned telegraf config, it will be hard to do that. but you can use python to write things out to influxdb
[[inputs.exec]]
## Commands array
commands = [
"python.exe snmp.py"
]
## Timeout for each command to complete.
timeout = "5s"
## measurement name suffix (for separating different commands)
name_suffix = "_mycollector"
## Data format to consume.
## Each data format has its 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 = "json"