You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Read formatted metrics from one or more HTTP endpoints
[[inputs.http_listener_v2]]
#name_override = "Example"## Address and port to host HTTP listener onservice_address = ":8085"## Path to listen to.path = "/example"## HTTP methods to accept.methods = ["POST", "PUT"]
## maximum duration before timing out read of the request# read_timeout = "10s"## maximum duration before timing out write of the response# write_timeout = "10s"## Maximum allowed http request body size in bytes.## 0 means to use the default of 524,288,000 bytes (500 mebibytes)# max_body_size = "500MB"## Set one or more allowed client CA certificate file names to## enable mutually authenticated TLS connections# tls_allowed_cacerts = ["/etc/telegraf/clientca.pem"]## Add service certificate and key# tls_cert = "/etc/telegraf/cert.pem"# tls_key = "/etc/telegraf/key.pem"## Optional username and password to accept for HTTP basic authentication.## You probably want to make sure you have TLS configured above for this.basic_username = "xxxx"basic_password = "yyyyyy"## 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"#Parse `stationBeanList` array only#json_query = "data"#Exclude url and host items from tags#tagexclude = ["url", "host"]#Set station metadata as tagsdata_format = "json_v2"
[[inputs.http_listener_v2.json_v2]]
measurement_name = "totals"
[[inputs.http_listener_v2.json_v2.object]]
path = "events"tags = ["id"]
timestamp_key = "time"timestamp_format = "2006-01-02T15:04:05Z"
Logs from Telegraf
2022-03-25T17:35:45Z D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2022-03-25T17:35:55Z D! [outputs.influxdb_v2] Wrote batch of 1 metrics in 144.280252ms
System info
Linux a7426996f158 4.15.0-173-generic #182-Ubuntu SMP Fri Mar 18 15:53:46 UTC 2022 x86_64 GNU/Linux, Docker version 20.10.7, build 20.10.7-0ubuntu5~18.04.3,
Basically I am really just replicating the example at https://github.com/influxdata/telegraf/blob/master/plugins/parsers/json_v2/testdata/object_timestamp/input.json
Relevant telegraf.conf
Logs from Telegraf
System info
Linux a7426996f158 4.15.0-173-generic #182-Ubuntu SMP Fri Mar 18 15:53:46 UTC 2022 x86_64 GNU/Linux, Docker version 20.10.7, build 20.10.7-0ubuntu5~18.04.3,
Docker
No response
Steps to reproduce
Input:
Expected behavior
The timestamp should be parsed to 2022-03-28T11:36:00.000000000Z
Actual behavior
The timestamp is parsed to 2022-03-28T11:30:35.266464381Z
Additional info
No response
The text was updated successfully, but these errors were encountered: