# Icmp not responding as expected in Elastic

**URL:** https://discuss.elastic.co/t/icmp-not-responding-as-expected-in-elastic/328900
**Category:** Beats
**Tags:** heartbeat
**Created:** [March 30, 2023, 8:01am UTC](https://discuss.elastic.co/t/icmp-not-responding-as-expected-in-elastic/328900 "2023-03-30T08:01:33Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![TheNewGuy123](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thenewguy123/32/118453_2.png) [@TheNewGuy123](https://discuss.elastic.co/u/TheNewGuy123)
#### Post date: [March 30, 2023, 8:01am UTC](https://discuss.elastic.co/t/icmp-not-responding-as-expected-in-elastic/328900/1 "2023-03-30T08:01:33Z")

</div>

Hey, I setup my heartbeat monitoring and I have configured all three kind of monitors: http, tcp and icmp. So I got tcp and http to work correctly, but no luck with icmp (which is the one I actually need). So I am checking the status of host: ["8.8.8.8"] so I think the status should be "up" all the time, but I constantly get status "down".

In terminal i can see the message and it seems ok.

My configuration is:

```auto
# Configure monitors inline
heartbeat.monitors:
- type: icmp
  id: icmp-google-dns
  name: icmp google dns
  hosts: ["8.8.8.8"]
  schedule: "@every 10s"
  tags: ["service:icmp", "org:google"]
- type: http
  schedule: '@every 10s'
  urls: ["http://google.com"]
  id: http-google-dns
  name: http google dns test
  tags: ["service:http", "org:google"]
- type: tcp
  id: tcp-local-kafka
  name: tcp local kafka
  hosts: ["localhost:9092"]
  schedule: "@every 10s"
  tags: ["service:tcp", "org:local-kafka"]

```

And the output I get from terminal is:

```auto
{"log.level":"info","@timestamp":"2023-03-30T07:59:36.622Z","log.origin":{"file.name":"logger/logger.go","file.line":97},"message":"Monitor finished","service.name":"heartbeat","event":{"action":"monitor.run"},"monitor":{"id":"tcp-local-kafka","type":"tcp","duration":{"ms":0}},"ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2023-03-30T07:59:36.622Z","log.origin":{"file.name":"logger/logger.go","file.line":97},"message":"Monitor finished","service.name":"heartbeat","event":{"action":"monitor.run"},"monitor":{"id":"icmp-google-dns","type":"icmp","duration":{"ms":0}},"ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2023-03-30T07:59:36.645Z","log.origin":{"file.name":"logger/logger.go","file.line":97},"message":"Monitor finished","service.name":"heartbeat","event":{"action":"monitor.run"},"monitor":{"id":"http-google-dns","type":"http","duration":{"ms":23}},"ecs.version":"1.6.0"}

```

Also image from the Elastic Dashboard:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/7/b7fd268621c5cf8f7a2f0643d4f29179a44266c1.png)

Thank you in advance for the help,

Tadej

---

<div class="post-metadata">

### Author: ![TheNewGuy123](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thenewguy123/32/118453_2.png) [@TheNewGuy123](https://discuss.elastic.co/u/TheNewGuy123)
#### Post date: [March 30, 2023, 1:03pm UTC](https://discuss.elastic.co/t/icmp-not-responding-as-expected-in-elastic/328900/2 "2023-03-30T13:03:26Z")

</div>

Okay this is solved. I overlooked the icmp options on the webpage: [ICMP options | Heartbeat Reference [8.6] | Elastic](https://www.elastic.co/guide/en/beats/heartbeat/current/monitor-icmp-options.html)

The part: Run `sudo setcap cap_net_raw+eip /path/to/heartbeat` to grant Heartbeat ping capabilities on Linux

---

<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: [April 27, 2023, 1:04pm UTC](https://discuss.elastic.co/t/icmp-not-responding-as-expected-in-elastic/328900/3 "2023-04-27T13:04:22Z")

</div>

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