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

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

Thanks,
Nitin Bisht

Hi @Nitin08bisht ,

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

Hi @kyungeunni ,

Yes, you are right.

@Nitin08bisht That's great!

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

Hi @kyungeunni ,

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

@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)

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.

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

{
  "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.

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:

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

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!

1 Like

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.

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