I want to add some data in Influxdb via Telegraf. My input data is XML data, but, I can get it in JSON format with “accept: application/json” header. When I try adding the accept header it gives me a parsing error.
Also, I am getting: 40Z E! ERROR in input [inputs.httpjson]: Get https://x.x.x.x/suite-api/api/resources: x509: cannot validate certificate for x.x.x.x because it doesn’t contain any IP SANs. No luck.
This means your certificate is not valid for connecting by IP address. You either need to create a cert for the address, or connect via the hostname specified in the cert.
Hi Daniel, can you please confirm how Telegraf deals with wildcards? What I mean is, I generated a certificate at server end at a URL location (abc.com) and “Common Name” (xyz, inc) and saved the certificate at client’s end as well.
When I hit the URL location abc.com, I get a new error: certificate is valid for xyz, inc., not abc.com
Telegraf should support wildcards, we are using the standard Go tls package to handle certificates. Normally a cert would have a Subject Alternative Name with the wildcard domain, does your cert have this and is it what you expect? You might want to try testing with curl to ensure you have your certificate setup correctly.