Monitoring 如何从grafana中的应用程序URL筛选服务器名称

Monitoring 如何从grafana中的应用程序URL筛选服务器名称,monitoring,prometheus,grafana,prometheus-blackbox-exporter,Monitoring,Prometheus,Grafana,Prometheus Blackbox Exporter,我使用prometheus作为数据源,windows exporter作为监控服务器上的导出器。我已经为服务器创建了一个变量,在这个变量中,我只想显示服务器名称,接下来我应该写些什么来过滤掉服务器名称并省略应用程序url 如果您有一个仅包含服务器名称的指标,则选择“是”。例如,如果您有如下指标: host\u cpu\u number{instance=“192.168.1.1”} host\u cpu\u number{instance=“192.168.1.2”} 然后您可以使用labe

我使用prometheus作为数据源,windows exporter作为监控服务器上的导出器。我已经为服务器创建了一个变量,在这个变量中,我只想显示服务器名称,接下来我应该写些什么来过滤掉服务器名称并省略应用程序url


如果您有一个仅包含服务器名称的指标,则选择“是”。例如,如果您有如下指标:

  • host\u cpu\u number{instance=“192.168.1.1”}
  • host\u cpu\u number{instance=“192.168.1.2”}
然后您可以使用
label\u值(主机\u cpu\u编号,实例)
获得
192.168.1.1
192.168.1.2