资讯专栏INFORMATION COLUMN

metricbeat 监控 nginx 情况

William_Sang / 1773人阅读

1.version

</>复制代码

  1. os: centos 7.2
  2. nginx: nginx-1.13.9
  3. metricbeat: metricbeat-6.2.4

2.download

</>复制代码

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

3.install

</>复制代码

  1. #rpm -ivh metricbeat-6.2.4-x86_64.rpm

4.config

</>复制代码

  1. Metricbeat:
  2. #metricbeat modules enable nginx
  3. nginx.yml
  4. - module: nginx
  5. metricsets: ["stubstatus"]
  6. period: 10s
  7. # Nginx hosts
  8. hosts: ["http://127.0.0.1"]
  9. # Path to server status. Default server-status
  10. server_status_path: "basic_status" #According to the situation,and depending
  11. Nginx: (nginx need to compile install)
  12. requried module: --with-http_stub_status_module
  13. nginx.conf:
  14. location /basic_status {
  15. stub_status;
  16. access_log off;
  17. allow 127.0.0.1;
  18. deny all;
  19. }

5.start

</>复制代码

  1. 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元查看
<