# Is there any way to monitor machine using machine name rather than monitor.ip?

**URL:** <https://discuss.elastic.co/t/is-there-any-way-to-monitor-machine-using-machine-name-rather-than-monitor-ip/327042>\
**Category:** Synthetics\
**Created:** [March 6, 2023, 7:59am UTC](https://discuss.elastic.co/t/is-there-any-way-to-monitor-machine-using-machine-name-rather-than-monitor-ip/327042 "2023-03-06T07:59:24Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nitin08bisht](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@Nitin08bisht](https://discuss.elastic.co/u/Nitin08bisht)\
**Post date:** [March 6, 2023, 7:59am UTC](https://discuss.elastic.co/t/is-there-any-way-to-monitor-machine-using-machine-name-rather-than-monitor-ip/327042/1 "2023-03-06T07:59:24Z")

</div>

Hi @Andrew_Cholakian1 ,

I am trying to create alert to monitor server for specific machine by using the machine name rather than using the` machine.ip` but not getting any key value.  
Please let me know, How can I do this by using Machine name? Below I have shared a link in which I had used `machine.ip` value to monitor the server.

[This alert will apply to approximately 24 monitors - Elastic Observability / Uptime - Discuss the Elastic Stack](https://discuss.elastic.co/t/this-alert-will-apply-to-approximately-24-monitors/316637)

Thanks,  
Nitin Bisht

---

<div class="post-metadata">

**Author:** ![kyungeunni](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kyungeunni/32/125539_2.png) [@kyungeunni](https://discuss.elastic.co/u/kyungeunni)\
**Post date:** [March 7, 2023, 4:11am UTC](https://discuss.elastic.co/t/is-there-any-way-to-monitor-machine-using-machine-name-rather-than-monitor-ip/327042/2 "2023-03-07T04:11:56Z")

</div>

Hi @Nitin08bisht ,

Did you mean `monitor.name`, not `machine.name`?

---

<div class="post-metadata">

**Author:** ![Nitin08bisht](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@Nitin08bisht](https://discuss.elastic.co/u/Nitin08bisht)\
**Post date:** [March 7, 2023, 4:42am UTC](https://discuss.elastic.co/t/is-there-any-way-to-monitor-machine-using-machine-name-rather-than-monitor-ip/327042/3 "2023-03-07T04:42:54Z")

</div>

Hi @kyungeunni ,

Yes, you are right.

---

<div class="post-metadata">

**Author:** ![kyungeunni](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kyungeunni/32/125539_2.png) [@kyungeunni](https://discuss.elastic.co/u/kyungeunni)\
**Post date:** [March 7, 2023, 5:54am UTC](https://discuss.elastic.co/t/is-there-any-way-to-monitor-machine-using-machine-name-rather-than-monitor-ip/327042/4 "2023-03-07T05:54:59Z")

</div>

@Nitin08bisht That's great!

I assume now you can see `monitor.name` showing up when configuring the rule and your issue is resolved?

---

<div class="post-metadata">

**Author:** ![Nitin08bisht](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@Nitin08bisht](https://discuss.elastic.co/u/Nitin08bisht)\
**Post date:** [March 7, 2023, 7:14am UTC](https://discuss.elastic.co/t/is-there-any-way-to-monitor-machine-using-machine-name-rather-than-monitor-ip/327042/5 "2023-03-07T07:14:58Z")

</div>

Hi @kyungeunni ,

When configuring the rule It showing the 0 monitor when using the `monitor.name` as shown on below image.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/0/10581d1e03ae5e33e62472aabe860203be11c3d6.png)

---

<div class="post-metadata">

**Author:** ![kyungeunni](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kyungeunni/32/125539_2.png) [@kyungeunni](https://discuss.elastic.co/u/kyungeunni)\
**Post date:** [March 7, 2023, 8:44am UTC](https://discuss.elastic.co/t/is-there-any-way-to-monitor-machine-using-machine-name-rather-than-monitor-ip/327042/6 "2023-03-07T08:44:12Z")

</div>

@Nitin08bisht Could you try this query in _Menu \> Management \> Dev Tool_ if there's any hits? (please replace `<YOUR_MONITOR_NAME>` with the monitor name you'd like to find)

```auto
GET /synthetics-browser*/_search 
{
  "query": {
    "match": {
      "monitor.name": "<YOUR_MONITOR_NAME>"
    }
  }
}

```

If not, you might want to double-check the monitor name you specified on the alreting rule. You can also use the above API without the query part and inspect what monitor names are available.

---

<div class="post-metadata">

**Author:** ![Nitin08bisht](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@Nitin08bisht](https://discuss.elastic.co/u/Nitin08bisht)\
**Post date:** [March 15, 2023, 4:38am UTC](https://discuss.elastic.co/t/is-there-any-way-to-monitor-machine-using-machine-name-rather-than-monitor-ip/327042/7 "2023-03-15T04:38:11Z")

</div>

Hi @kyungeunni, I have try query which you mention and getting below response

```auto
{
  "took" : 0,
  "timed_out" : false,
  "_shards" : {
    "total" : 0,
    "successful" : 0,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 0,
      "relation" : "eq"
    },
    "max_score" : 0.0,
    "hits" : []
  }
}

```

And also I have checked the name on uptime monitor down rule. Please let me know how I can configure rule with server name.

---

<div class="post-metadata">

**Author:** ![emilioalvap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/emilioalvap/32/99310_2.png) [@emilioalvap](https://discuss.elastic.co/u/emilioalvap)\
**Post date:** [March 15, 2023, 6:54pm UTC](https://discuss.elastic.co/t/is-there-any-way-to-monitor-machine-using-machine-name-rather-than-monitor-ip/327042/8 "2023-03-15T18:54:56Z")

</div>

Hello @Nitin08bisht,

You can use any of the indexed fields in the query, which one holds the data you're looking for will depend on the monitor type.  
The easiest way to check which field is the one you're looking for would be through Kibana -\> Discover. Search for the monitor you're interested in and you'll be able to see all fields indexed for it:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/3/03feb1473da1b1f9eb1ebbe7bd36e41257ce9ab1.png)

I'm assuming from context that you might be interested in `url.domain`:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/4/94a637b9b93a14c9aa56a493ebf3010789200714.png)

But as I mentioned, it will depend on the monitor config and type. You'll need to have a look into available fields and check whether the information you require is being indexed.

Hope that helps!

---

<div class="post-metadata">

**Author:** ![Nitin08bisht](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@Nitin08bisht](https://discuss.elastic.co/u/Nitin08bisht)\
**Post date:** [March 16, 2023, 7:42pm UTC](https://discuss.elastic.co/t/is-there-any-way-to-monitor-machine-using-machine-name-rather-than-monitor-ip/327042/9 "2023-03-16T19:42:28Z")

</div>

Hi @emilioalvap - I am thankful to you because I was trying to find such query so that host down alert can be triggered and the query `url.domain: google.es` which you have given is working and I got the result which I want.

---

<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 9, 2023, 7:42pm UTC](https://discuss.elastic.co/t/is-there-any-way-to-monitor-machine-using-machine-name-rather-than-monitor-ip/327042/10 "2023-04-09T19:42:34Z")

</div>

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