安装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信息
在这里插入图片描述

相关内容

热门资讯

AWSECS:访问外部网络时出... 如果您在AWS ECS中部署了应用程序,并且该应用程序需要访问外部网络,但是无法正常访问,可能是因为...
AWSElasticBeans... 在Dockerfile中手动配置nginx反向代理。例如,在Dockerfile中添加以下代码:FR...
银河麒麟V10SP1高级服务器... 银河麒麟高级服务器操作系统简介: 银河麒麟高级服务器操作系统V10是针对企业级关键业务...
北信源内网安全管理卸载 北信源内网安全管理是一款网络安全管理软件,主要用于保护内网安全。在日常使用过程中,卸载该软件是一种常...
AWR报告解读 WORKLOAD REPOSITORY PDB report (PDB snapshots) AW...
AWS管理控制台菜单和权限 要在AWS管理控制台中创建菜单和权限,您可以使用AWS Identity and Access Ma...
​ToDesk 远程工具安装及... 目录 前言 ToDesk 优势 ToDesk 下载安装 ToDesk 功能展示 文件传输 设备链接 ...
群晖外网访问终极解决方法:IP... 写在前面的话 受够了群晖的quickconnet的小水管了,急需一个新的解决方法&#x...
不能访问光猫的的管理页面 光猫是现代家庭宽带网络的重要组成部分,它可以提供高速稳定的网络连接。但是,有时候我们会遇到不能访问光...
Azure构建流程(Power... 这可能是由于配置错误导致的问题。请检查构建流程任务中的“发布构建制品”步骤,确保正确配置了“Arti...