diff --git a/plugins/inputs/httpjson/README.md b/plugins/inputs/httpjson/README.md index 1aa1ad1a4..50a36dd6c 100644 --- a/plugins/inputs/httpjson/README.md +++ b/plugins/inputs/httpjson/README.md @@ -32,6 +32,13 @@ The httpjson plugin collects data from HTTP URLs which respond with JSON. It fl # "my_tag_2" # ] + ## Optional SSL Config + # ssl_ca = "/etc/telegraf/ca.pem" + # ssl_cert = "/etc/telegraf/cert.pem" + # ssl_key = "/etc/telegraf/key.pem" + ## Use SSL but skip chain & host verification + # insecure_skip_verify = false + ## HTTP Request Parameters (all values must be strings). For "GET" requests, data ## will be included in the query. For "POST" requests, data will be included ## in the request body as "x-www-form-urlencoded". @@ -43,13 +50,6 @@ The httpjson plugin collects data from HTTP URLs which respond with JSON. It fl # [inputs.httpjson.headers] # X-Auth-Token = "my-xauth-token" # apiVersion = "v1" - - ## Optional SSL Config - # ssl_ca = "/etc/telegraf/ca.pem" - # ssl_cert = "/etc/telegraf/cert.pem" - # ssl_key = "/etc/telegraf/key.pem" - ## Use SSL but skip chain & host verification - # insecure_skip_verify = false ``` ### Measurements & Fields: diff --git a/plugins/inputs/httpjson/httpjson.go b/plugins/inputs/httpjson/httpjson.go index f3edc57ba..bfa35752b 100644 --- a/plugins/inputs/httpjson/httpjson.go +++ b/plugins/inputs/httpjson/httpjson.go @@ -100,6 +100,13 @@ var sampleConfig = ` # "my_tag_2" # ] + ## Optional SSL Config + # ssl_ca = "/etc/telegraf/ca.pem" + # ssl_cert = "/etc/telegraf/cert.pem" + # ssl_key = "/etc/telegraf/key.pem" + ## Use SSL but skip chain & host verification + # insecure_skip_verify = false + ## HTTP parameters (all values must be strings). For "GET" requests, data ## will be included in the query. For "POST" requests, data will be included ## in the request body as "x-www-form-urlencoded". @@ -111,13 +118,6 @@ var sampleConfig = ` # [inputs.httpjson.headers] # X-Auth-Token = "my-xauth-token" # apiVersion = "v1" - - ## Optional SSL Config - # ssl_ca = "/etc/telegraf/ca.pem" - # ssl_cert = "/etc/telegraf/cert.pem" - # ssl_key = "/etc/telegraf/key.pem" - ## Use SSL but skip chain & host verification - # insecure_skip_verify = false ` func (h *HttpJson) SampleConfig() string {