惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Forbes - Security
Forbes - Security
GbyAI
GbyAI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
S
SegmentFault 最新的问题
Y
Y Combinator Blog
Recorded Future
Recorded Future
博客园 - Franky
I
InfoQ
T
The Blog of Author Tim Ferriss
Recent Announcements
Recent Announcements
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
T
Tailwind CSS Blog
Cyberwarzone
Cyberwarzone
The Register - Security
The Register - Security
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
雷峰网
雷峰网
P
Palo Alto Networks Blog
G
GRAHAM CLULEY
Cloudbric
Cloudbric
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
MongoDB | Blog
MongoDB | Blog
F
Full Disclosure
Google DeepMind News
Google DeepMind News
Recent Commits to openclaw:main
Recent Commits to openclaw:main
C
Check Point Blog
爱范儿
爱范儿
The GitHub Blog
The GitHub Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
W
WeLiveSecurity
T
Threat Research - Cisco Blogs
U
Unit 42
N
Netflix TechBlog - Medium
The Cloudflare Blog
Spread Privacy
Spread Privacy
Microsoft Azure Blog
Microsoft Azure Blog
美团技术团队
T
Troy Hunt's Blog
Engineering at Meta
Engineering at Meta
H
Heimdal Security Blog
TaoSecurity Blog
TaoSecurity Blog
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tenable Blog
B
Blog
S
Securelist
H
Hacker News: Front Page
Google Online Security Blog
Google Online Security Blog
G
Google Developers Blog

运维监控系列 on 打工人日志

skywalking python agent 安装和配置 Logstash 自动重载配置文件 windows-exporter 监控 skywalking APM 监控 logstash 多管道部署 prometheus grafana alertmanager 安装配置 prometheus 配置
nginx exporter 安装配置
2022-06-08 · via 运维监控系列 on 打工人日志

nginx exporter 安装配置

  1. 二进制安装
1wget https://github.com/nginxinc/nginx-prometheus-exporter/releases/download/v0.10.0/nginx-prometheus-exporter_0.10.0_linux_amd64.tar.gz
2tar -zxvf nginx-prometheus-exporter_0.10.0_linux_amd64.tar.gz -C ./nginx-exporter
  1. 在 nginx 上配置
1./configure \
2\
3--with-http_stub_status_module
4make
5sudo make install

在 nginx.config 上配置

server {
    # 新增
    location /nginx_status {
        stub_status on;
        access_log off;
    }
}

重启 nginx 服务

1nginx -t
2nginx -s reload
  1. 启动 nginx exporter
1nginx-prometheus-exporter -nginx.scrape-uri http://<nginx>:8080/nginx_status
  1. 配置 prometheus 添加 prometheus.yml
1- job_name: "nginx-exporter"
2  file_sd_configs:
3    - files:
4        - "./file_sd/nginx-exporter.yaml"

在 ./file_sd/新建 nginx-exporter.yaml

1- targets: ["<IP>:9113"]
2  labels:
3    instance: <nginx名称>