# Invalid character 'A' looking for beginning of value

**URL:** <https://discuss.elastic.co/t/invalid-character-a-looking-for-beginning-of-value/190446>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [July 15, 2019, 7:34am UTC](https://discuss.elastic.co/t/invalid-character-a-looking-for-beginning-of-value/190446 "2019-07-15T07:34:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jasony](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@jasony](https://discuss.elastic.co/u/jasony)\
**Post date:** [July 15, 2019, 7:34am UTC](https://discuss.elastic.co/t/invalid-character-a-looking-for-beginning-of-value/190446/1 "2019-07-15T07:34:24Z")

</div>

hello,

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

```
$ curl -XGET http://127.0.0.1:8088
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.

```
metricbeat.modules:
- module: http
  metricsets:
    - json
  period: 10s
  namespace: "nginx"
  hosts: ["127.0.0.1:8088"]
# path: "/"
  method: "GET"
output.kafka:
  version: 0.10.2.1
  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":"127.0.0.1:8088","rtt":354}}`

is my metricbeat configuration wrong? please advise.

thank you!

---

<div class="post-metadata">

**Author:** ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)\
**Post date:** [July 15, 2019, 9:23am UTC](https://discuss.elastic.co/t/invalid-character-a-looking-for-beginning-of-value/190446/2 "2019-07-15T09:23:49Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![jasony](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@jasony](https://discuss.elastic.co/u/jasony)\
**Post date:** [July 15, 2019, 11:03am UTC](https://discuss.elastic.co/t/invalid-character-a-looking-for-beginning-of-value/190446/3 "2019-07-15T11:03:14Z")

</div>

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

Thank you for your advise. 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 12, 2019, 11:03am UTC](https://discuss.elastic.co/t/invalid-character-a-looking-for-beginning-of-value/190446/4 "2019-08-12T11:03:23Z")

</div>

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