<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Exporter on FakeMark</title>
    <link>https://www.fakemark.cn/tags/exporter/</link>
    <description>Recent content in Exporter on FakeMark</description>
    <image>
      <title>FakeMark</title>
      <url>https://www.fakemark.cn/</url>
      <link>https://www.fakemark.cn/</link>
    </image>
    <generator>Hugo -- gohugo.io</generator>
    <language>zh</language>
    <lastBuildDate>Thu, 27 Jul 2023 14:26:32 +0800</lastBuildDate><atom:link href="https://www.fakemark.cn/tags/exporter/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>监控平台系列-Exporter</title>
      <link>https://www.fakemark.cn/post/%E7%9B%91%E6%8E%A7%E5%B9%B3%E5%8F%B0%E7%B3%BB%E5%88%97-exporter/</link>
      <pubDate>Thu, 27 Jul 2023 14:26:32 +0800</pubDate>
      
      <guid>https://www.fakemark.cn/post/%E7%9B%91%E6%8E%A7%E5%B9%B3%E5%8F%B0%E7%B3%BB%E5%88%97-exporter/</guid>
      <description>监控平台系列 监控服务端Promethues
监控采集器Exporter
告警服务端Altermanager
告警中间件PrometheusAlert
监控展示Grafana
Exporter安装 官方exporter下载地址汇总
Windows-exporter安装 ✅ 程序下载
Windows-exporter的下载地址 选择 windows_exporter-{{版本号}}-amd64.msi
注意是amd64.msi结尾
✅ 程序安装
将程序上传到服务器桌面，执行以下命令,注意修改程序版本号
不包含mssql监控 msiexec /i C:\Users\Administrator\Desktop\windows_exporter-{{版本号}}-amd64.msi ENABLED_COLLECTORS=cpu,net,os,memory,process,tcp,textfile,cs,logical_disk,service,system /quiet 包含mssql监控 msiexec /i C:\Users\Administrator\Desktop\windows_exporter-{{版本号}}-amd64.msi ENABLED_COLLECTORS=cpu,net,os,memory,process,tcp,mssql,textfile,cs,logical_disk,service,system /quiet ✅ 防火墙开启
如果系统开启了防火墙，那么需要配置防火墙规则放通9182端口
netsh advfirewall firewall add rule name=&amp;#34;windows-exporter&amp;#34; dir=in action=allow protocol=TCP localport=9182 ✅ job配置
prometheus.yaml配置 - job_name: windows-exporter scrape_interval: 15s scrape_timeout: 10s metrics_path: /metrics scheme: http file_sd_configs: - refresh_interval: 10s files: - &amp;#34;/etc/config/jobs/windows.yaml&amp;#34; windows.yaml配置(通过文件挂载映射进容器) 多个主机使用不通签 - job_name: &amp;#39;dev_app_01&amp;#39; static_configs: - targets: [&amp;#39;192.168.1.117:9182&amp;#39;] labels: os: WINDOWS env: dev - job_name: &amp;#39;test_app_01&amp;#39; static_configs: - targets: [&amp;#39;192.168.2.217:9182&amp;#39;] labels: os: WINDOWS env: test 多个主机使用相同标签 - job_name: &amp;#39;test_app_01&amp;#39; static_configs: - targets: - 192.168.2.217:9182 - 192.168.2.218:9182 - 192.168.2.219:9182 labels: os: WINDOWS env: test ✅ rule配置
groups: - name: windows主机信息 rules: - alert: CPU使用 expr: round(100 - (avg by (instance) (irate(windows_cpu_time_total{mode=&amp;#34;idle&amp;#34;}[5m])) * 100),0.01) &amp;gt; 60 for: 10m labels: severity: 严重 annotations: summary: &amp;#34;{{$labels.instance}} CPU使用率过高！&amp;#34; description: &amp;#34;{{$labels.instance}} CPU使用大于60%(目前使用:{{$value}}%)&amp;#34; - alert: 内存使用 expr: round(100 - ((windows_os_physical_memory_free_bytes / windows_cs_physical_memory_bytes) * 100),0.</description>
    </item>
    
  </channel>
</rss>
