Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在目标服务器上使用 Windows 导出器来收集它的指标现在我想在下拉列表中显示它的 ip,但我在网上发现的没有任何帮助。谁能帮我在下拉列表中显示 prometheus.yml 文件中提到的服务器名称
如果您有多个作业正在运行,这可能是可能的。例如,您正在检查主机资源为 Job1 和一些应用程序资源 Job2。然后要获取与任何作业相关的实例,您需要指定作业名称和指标。所以在这里你应该添加label_values(windows_system_system_uptime{job=$that_job_name},instance)
label_values(windows_system_system_uptime{job=$that_job_name},instance)