资讯专栏INFORMATION COLUMN

metricbeat 监控 nginx 情况

William_Sang / 1274人阅读

1.version

os: centos 7.2
nginx: nginx-1.13.9
metricbeat: metricbeat-6.2.4

2.download

#wget https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-6.2.4-x86_64.rpm

3.install

#rpm -ivh metricbeat-6.2.4-x86_64.rpm

4.config

Metricbeat:
#metricbeat  modules enable nginx
nginx.yml
- module: nginx
  metricsets: ["stubstatus"]
  period: 10s

  # Nginx hosts
  hosts: ["http://127.0.0.1"]

  # Path to server status. Default server-status
  server_status_path: "basic_status" #According to the situation,and depending
  
Nginx: (nginx need to compile install)
requried module: --with-http_stub_status_module
    
nginx.conf:
    
    location /basic_status {
        stub_status;
        access_log  off;
        allow 127.0.0.1;
        deny all;
    }

5.start

service metricbeat  start

文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。

转载请注明本文地址:https://www.ucloud.cn/yun/39962.html

相关文章

  • 你离ELK只有一句docker-compose的距离

    摘要:但有一个问题就是对于一个初学者如此洁净的环境,我完全不知道从何入手,也弄不清这个框架的优势是什么连个样本都没有。还有的配置,的接入都踩过不少坑,才部署成一个像样的学习环境。之后在写脚本的时候又是各种踩雷,终于实现了快速一键部署。 引言 刚接触Elk的时候,我用https://github.com/deviantony/docker-elk,部署了第一个测试环境,这是一个很优秀的项目,几...

    red_bricks 评论0 收藏0

发表评论

0条评论

William_Sang

|高级讲师

TA的文章

阅读更多
最新活动
阅读需要支付1元查看
<