# Cannot show ping because icmp.rtt.us no value

**URL:** https://discuss.elastic.co/t/cannot-show-ping-because-icmp-rtt-us-no-value/226011
**Category:** Beats
**Tags:** elastic-stack-monitoring, heartbeat
**Created:** [April 1, 2020, 8:57am UTC](https://discuss.elastic.co/t/cannot-show-ping-because-icmp-rtt-us-no-value/226011 "2020-04-01T08:57:23Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![gilang\_bilbisri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gilang_bilbisri/32/60770_2.png) [@gilang\_bilbisri](https://discuss.elastic.co/u/gilang_bilbisri)
#### Post date: [April 1, 2020, 8:57am UTC](https://discuss.elastic.co/t/cannot-show-ping-because-icmp-rtt-us-no-value/226011/1 "2020-04-01T08:57:23Z")

</div>

Hello everyone

I have a project to make some monitoring with ELK stack then for the monitoring i use grafana for user client. But i have a problems when im try to show up Ping visualization.  
There is no value for [icmp.rtt.us](http://icmp.rtt.us) or [rtt.us](http://rtt.us) no available.

 ![12313123213213333](https://us1.discourse-cdn.com/elastic/original/3X/e/4/e41c14f51bb16c30368d2a7cd12c4d2139bb0f95.jpeg)

In Heartbeat `/monitor.d` i have already creating icmp.conf and configure on it.

this is the configuration from `./monitor.d/icmp.conf`

```
# These files contain a list of monitor configurations identical
# to the heartbeat.monitors section in heartbeat.yml
# The .example extension on this file must be removed for it to
# be loaded.

- type: icmp # monitor type `icmp` (requires root) uses ICMP Echo Request to ping
 # configured hosts

# Monitor name used for job name and document type.
name: icmp

# Enable/Disable monitor
enabled: true

# Configure task schedule using cron-like syntax
schedule: '*/5 * * * * * *' # exactly every 5 seconds like 10:00:00, 10:00:05, ...

# List of hosts to ping
hosts: ["monitoring", "monitoring2"]

# Configure IP protocol types to ping on if hostnames are configured.
# Ping all resolvable IPs if `mode` is `all`, or only one IP if `mode` is `any`.
ipv4: true
ipv6: false
mode: any

# Total running time per ping test.
timeout: 16s

# Waiting duration until another ICMP Echo Request is emitted.
wait: 1s

# The tags of the monitors are included in their own field with each
# transaction published. Tags make it easy to group servers by different
# logical properties.
#tags: ["service-X", "web-tier"]

# Optional fields that you can specify to add additional information to the
# monitor output. Fields can be scalar values, arrays, dictionaries, or any nested
# combination of these.
#fields:
# env: staging

# If this option is set to true, the custom fields are stored as top-level
# fields in the output document instead of being grouped under a fields
# sub-dictionary. Default is false.
#fields_under_root: false

```

this is very important to me to show up PING in my monitoring stack

Any ones know what happent? and can u give me some tricks for this problem?

---

<div class="post-metadata">

### Author: ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)
#### Post date: [April 2, 2020, 9:09pm UTC](https://discuss.elastic.co/t/cannot-show-ping-because-icmp-rtt-us-no-value/226011/2 "2020-04-02T21:09:55Z")

</div>

You can get this value via the `monitor.duration.us` field. That measures the total execution for the monitor, which for an ICMP ping is equivalent.

---

<div class="post-metadata">

### Author: ![gilang\_bilbisri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gilang_bilbisri/32/60770_2.png) [@gilang\_bilbisri](https://discuss.elastic.co/u/gilang_bilbisri)
#### Post date: [April 5, 2020, 10:39am UTC](https://discuss.elastic.co/t/cannot-show-ping-because-icmp-rtt-us-no-value/226011/3 "2020-04-05T10:39:24Z")

</div>

thanks for reply

it work,but as you say. It is showing for the total execute to the monitor.  
can u give me some trick To visualise PING for visualizing running Ping every second on graph? not for the total ping the machine can reach?

---

<div class="post-metadata">

### Author: ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)
#### Post date: [April 5, 2020, 11:41am UTC](https://discuss.elastic.co/t/cannot-show-ping-because-icmp-rtt-us-no-value/226011/4 "2020-04-05T11:41:39Z")

</div>

The time to execute the monitor is the rtt time. I suppose we could have another timer slightly closer to the point in the code where the packet is received but I don't have reason to believe it would yield a meaningfully different timing.

It's possible that it would, but very unlikely, and would need to be proven.

---

<div class="post-metadata">

### Author: ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)
#### Post date: [April 5, 2020, 11:43am UTC](https://discuss.elastic.co/t/cannot-show-ping-because-icmp-rtt-us-no-value/226011/5 "2020-04-05T11:43:33Z")

</div>

WRT to the visualization, you'll want to to aggregate by date\_histogram, and probably choose the min/max or average `monitor.duration`.

---

<div class="post-metadata">

### Author: ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)
#### Post date: [April 5, 2020, 11:44am UTC](https://discuss.elastic.co/t/cannot-show-ping-because-icmp-rtt-us-no-value/226011/6 "2020-04-05T11:44:49Z")

</div>

I'm realizing that what I said earlier is incorrect, the `monitor.duration` should include DNS resolution time as well, I'll look into adding the `icmp.rtt.us` value back into heartbeat.

---

<div class="post-metadata">

### Author: ![dmoura](https://avatars.discourse-cdn.com/v4/letter/d/f1d935/32.png) [@dmoura](https://discuss.elastic.co/u/dmoura)
#### Post date: [April 22, 2020, 7:32pm UTC](https://discuss.elastic.co/t/cannot-show-ping-because-icmp-rtt-us-no-value/226011/7 "2020-04-22T19:32:42Z")

</div>

Hello Andrew,

I am having a similar issue with [icmp.rtt.us](http://icmp.rtt.us). When I try to agregate to get the average value of [icmp.rtt.us](http://icmp.rtt.us) from hosts, the query returns null for every monitor.ip. Below is the query I am using.

```auto
    GET heartbeat-7.6.2-2020.04.22-000001/_search?pretty
    {
      "query": {"match": {
        "monitor.type": "icmp"
      }},
      "aggs": {
        "IPs": {
          "terms": {
            "field": "monitor.ip"
          },
          "aggs": {
            "avg_lat": {
              "avg": {
                "field": "icmp.rtt.us"
              }
            }
          }
        }
        
      }
    }

```

When I change the field value from [icmp.rtt.us](http://icmp.rtt.us) to monitor.duration it returns valid average values.

Is this really a issue or Am I doing something wrong?

Thank you

---

<div class="post-metadata">

### Author: ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)
#### Post date: [April 28, 2020, 1:05am UTC](https://discuss.elastic.co/t/cannot-show-ping-because-icmp-rtt-us-no-value/226011/8 "2020-04-28T01:05:27Z")

</div>

I found the bug and have opened up an issue to fix this here: [https://github.com/elastic/beats/pull/17920](https://github.com/elastic/beats/pull/17920)

---

<div class="post-metadata">

### Author: ![dmoura](https://avatars.discourse-cdn.com/v4/letter/d/f1d935/32.png) [@dmoura](https://discuss.elastic.co/u/dmoura)
#### Post date: [April 28, 2020, 11:45am UTC](https://discuss.elastic.co/t/cannot-show-ping-because-icmp-rtt-us-no-value/226011/9 "2020-04-28T11:45:57Z")

</div>

Thank you Andrew. I will follow this case.

---

<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: [May 26, 2020, 11:46am UTC](https://discuss.elastic.co/t/cannot-show-ping-because-icmp-rtt-us-no-value/226011/10 "2020-05-26T11:46:00Z")

</div>

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