安装windows_exporter安装node_exporter
创始人
2025-05-29 20:43:02
0

一、安装windows exporter客户端

1.从github上下载windows_exporter.msi

2.批处理
msiexec /package “\nas01\it-install\windows_exporter-0.21.0-amd64.msi”
并修改成.bat格式

命令:msiexec /package “你的安装MSI文件的全路径”.

3.执行cmd
在这里插入图片描述
4.查看服务,服务正常!
在这里插入图片描述

二、在prometheus.yml中添加主机信息。

# my global config
global:scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.# scrape_timeout is set to the global default (10s).# Alertmanager configuration
alerting:alertmanagers:- static_configs:- targets:- localhost:9093#- alertmanager:9093# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:- "rules/node_down.yml"- "rules/cpu_over.yml"- "rules/memory_over.yml"- "rules/disk_over.yml"- "rules/swap_over.yml"# - "first_rules.yml"# - "second_rules.yml"# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:# The job name is added as a label `job=` to any timeseries scraped from this config.- job_name: "prometheus"# metrics_path defaults to '/metrics'# scheme defaults to 'http'.static_configs:- targets: ["localhost:9090"]- targets: ["localhost:9100"]- job_name: '2288hv5'static_configs:- targets:- 10.99.*.*metrics_path: /snmpparams:module: [华为2288Hv5服务器]relabel_configs:- source_labels: [__address__]target_label: __param_target- source_labels: [__param_target]target_label: instance- target_label: __address__replacement: 10.99.1.41:9116  # The SNMP exporter's real hostname:port.#  - job_name: 'nac'
#    static_configs:
#      - targets:
#        - 10.99.*.*
#    metrics_path: /snmp
#    params:
#      module: [nac6100]
#    relabel_configs:
#      - source_labels: [__address__]
#        target_label: __param_target
#      - source_labels: [__param_target]
#        target_label: instance
#      - target_label: __address__
#        replacement: 10.99.31.206:9116  # The SNMP exporter's real hostname:port.- job_name: "it-manager-service"static_configs:- targets: ["10.99.*.*:9182"]- job_name: "it-manager-linux"static_configs:- targets: ["10.99.*.*:9100"]- job_name: "it-manager-windows"static_configs:- targets: ["10.99.*.**:9182"]

三、prometheus查看结果

在这里插入图片描述

四、安装node_exporter
1.查看linux架构

[root@localhost ~]# uname -m
x86_64

2.下载node_exporter
在这里插入图片描述
安装node_exporter

解压
tar zxf node_exporter-1.5.0.linux-386.tar.gz -C /usr/local/
cd /usr/local/
映射软链接
ln -sv /usr/local/node_exporter-1.5.0.linux-386/ /usr/local/node_exporter
cd node_exporter
新增服务
vim /etc/systemd/system/node_exporter.service
[Unit]
Description=node_exporter
After=network.target[Service]
Restart=on-failure
ExecStart=/usr/local/node_exporter/node_exporter[Install]
WantedBy=multi-user.target
开机自启并重启
systemctl start node_exporter && systemctl status node_exporter && systemctl enable node_exporter

Prometheus查看host信息
在这里插入图片描述

相关内容

热门资讯

银河麒麟V10SP1高级服务器... 银河麒麟高级服务器操作系统简介: 银河麒麟高级服务器操作系统V10是针对企业级关键业务...
【NI Multisim 14...   目录 序言 一、工具栏 🍊1.“标准”工具栏 🍊 2.视图工具...
不能访问光猫的的管理页面 光猫是现代家庭宽带网络的重要组成部分,它可以提供高速稳定的网络连接。但是,有时候我们会遇到不能访问光...
Android|无法访问或保存... 这个问题可能是由于权限设置不正确导致的。您需要在应用程序清单文件中添加以下代码来请求适当的权限:此外...
AWSECS:访问外部网络时出... 如果您在AWS ECS中部署了应用程序,并且该应用程序需要访问外部网络,但是无法正常访问,可能是因为...
北信源内网安全管理卸载 北信源内网安全管理是一款网络安全管理软件,主要用于保护内网安全。在日常使用过程中,卸载该软件是一种常...
AWSElasticBeans... 在Dockerfile中手动配置nginx反向代理。例如,在Dockerfile中添加以下代码:FR...
AsusVivobook无法开... 首先,我们可以尝试重置BIOS(Basic Input/Output System)来解决这个问题。...
ASM贪吃蛇游戏-解决错误的问... 要解决ASM贪吃蛇游戏中的错误问题,你可以按照以下步骤进行:首先,确定错误的具体表现和问题所在。在贪...
​ToDesk 远程工具安装及... 目录 前言 ToDesk 优势 ToDesk 下载安装 ToDesk 功能展示 文件传输 设备链接 ...