Invalid character 'A' looking for beginning of value


i am trying to replicate below 'curl' query with metricbeat http module. as you see below, opens and responds well as below.

$ curl -XGET
Active connections: 5
server accepts handled requests
 35 35 134
Reading: 0 Writing: 2 Waiting: 3

to real time monitoring with metricbeat, i set metricbeat configuration as below.

- module: http
    - json
  period: 10s
  namespace: "nginx"
  hosts: [""]
#  path: "/"
  method: "GET"
  enabled: true
  # initial brokers for reading cluster metadata
  hosts: ["kfk-01:9092"]
  # message topic selection + partitioning
  topic: 'http_mon'

but the result from kafka says as below.

{"@timestamp":"2019-07-15T07:27:36.545Z","@metadata":{"beat":"metricbeat","type":"doc","version":"6.7.1","topic":"http_mon"},"event":{"dataset":"http.json","duration":354214},"error":{"message":**"invalid character 'A' looking for beginning of value"**},"host":{"name":"csl-01"},"metricset":{"name":"json","module":"http","host":"","rtt":354}}

is my metricbeat configuration wrong? please advise.

thank you!

Hi @jasony,

The http module at this moment can only collect information from JSON responses, this is done with the json metricset you are using.
Can this service respond in JSON format?

No it responds in text format. I will change the response format to json then.

Thank you for your advise. :slight_smile:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.