Hi team,
I am trying to get metrics on an API call. My call works on Postman, however, I am getting this error when I run metricbeat:
{"log.level":"error","@timestamp":"2024-04-09T11:51:35.572Z","log.origin":{"function":"github.com/elastic/beats/v7/metricbeat/mb/module.(*metricSetWrapper).fetch","file.name":"module/wrapper.go","file.line":256},"message":"Error fetching data for metricset http.json: unexpected end of JSON input","service.name":"metricbeat","ecs.version":"1.6.0"}
My http,yml file is:
- module: http
metricsets:
- json
period: 5s
hosts: [ "http://<ip_address>:<port>" ]
namespace: "tmc"
path: "/metrics/json"
ssl.verification_mode: "none"
#body: ""
headers:
Authorization: "Bearer <token>"
method: "GET"
#username: "user"
#password: "secret"
request.enabled: true
response.enabled: true
json.is_array: true
#dedot.enabled: false