influxdata / influxdata/influxdb

using telegraf with plugin http , Error x509: certificate signed by unknown authority

Open
#24,425 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

I Use Telegraf with http plugin

[[outputs.http]]
url = "https://example.com/test/rest/login"
method = "POST"
tls_ca = "/etc/telegraf/ssl1/cert.pem"
tls_cert = "/etc/telegraf/ssl1/cert.pem"
tls_key = "/etc/telegraf/ssl1/key.pem"
but I get an error

Error writing to outputs.http: Post "https://example.com/test/rest/login": x509: certificate signed by unknown authority

I call with the same information with CURL Command and the command works correctly

curl -v -H "Content-Type: application/json" --key /etc/telegraf/ssl1/key.pem --cert /etc/telegraf/ssl1/cert.pem -d'{"username":"username","password":"password"}' https://example.com/test/rest/login

Also, I call the folowing command for the correctness of the certificate

openssl s_client -connect example.com:443 -CApath /etc/ssl/certs
CONNECTED Verification: OK Verify return code: 0 (ok)

please help me how to solve my problem in telegraf

Contributor guide

Open the contributing guide

Research direction

The issue provides no repository file, test, or code entry point. Start by reviewing the Telegraf [[outputs.http]] TLS settings and comparing them with the working curl and openssl commands. Done means reproducing the certificate error and documenting the configuration change or project fix that resolves it.

Written by the indexing model from the issue text.

Assessment

Domain
security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.