[root@test2 ~]# rpm -ivh nginx-1.8.0-1.el7.ngx.x86_64.rpm

[root@test2 ~]# cd /etc/nginx/

[root@test2 nginx]# cd conf.d/

[root@test2 conf.d]# vim default.conf

[root@test2 conf.d]# nginx -t

[root@test2 conf.d]# systemctl start nginx.service

ot@test2 conf.d]# curl 127.0.0.1/status

[root@test2 conf.d]# cd /etc/zabbix/zabbix_agentd.d/

[root@test2 zabbix_agentd.d]# cp userparameter_mysql.conf userparameter_nginx.conf

[root@test2 zabbix_agentd.d]# curl -s http://127.0.0.1/status | grep Active | awk '{print $3}'   ##获得返回值即可

[root@test2 zabbix_agentd.d]# vim userparameter_nginx.conf

删除其余的
UserParameter=nginx.active,curl -s http://127.0.0.1/status | grep Active | awk '{print $3}'

[root@test2 zabbix_agentd.d]# systemctl restart zabbix-agent.service

test1:

[root@test1 3.4]# rpm  -ivh zabbix-get-3.4.6-1.el7.x86_64.rpm

[root@test1 3.4]# zabbix_get -s 172.25.8.12 -p 10050 -k "nginx.active" ##有返回值即可

web界面

创建监控项

配置--主机--监控项--创建监控

创建图形

配置--主机--图形--创建图形

添加自定义配置文件

[root@test2 zabbix_agentd.d]# vim userparameter_nginx.conf

[root@test2 zabbix_agentd.d]# systemctl restart zabbix-agent.service

test1:

[root@test1 3.4]# zabbix_get -s 172.25.8.12 -p 10050 -k "nginx.active"

1

[root@test1 3.4]# zabbix_get -s 172.25.8.12 -p 10050 -k "nginx.accepts"

51

[root@test1 3.4]# zabbix_get -s 172.25.8.12 -p 10050 -k "nginx.handled"

52

[root@test1 3.4]# zabbix_get -s 172.25.8.12 -p 10050 -k "nginx.requests"

54

web:

监控向添加

图形添加

预览

mysql:

web

主机zabbix server添加模版

DBmysql

图形查看

[root@test1 3.4]# mkdir /var/lib/zabbix

[root@test1 3.4]# cd /var/lib/zabbix/

[root@test1 zabbix]# vim .my.cnf

[root@test1 zabbix]# systemctl restart zabbix-agent.service

percona

rpm -ivh percona-zabbix-templates-1.1.8-1.noarch.rpm

[root@test1 ~]# cd /var/lib/zabbix/percona/templates/

[root@test1 templates]# cp userparameter_percona_mysql.conf  /etc/zabbix/zabbix_agentd.d/

[root@test1 templates]# cd /etc/zabbix/zabbix_agentd.d/

[root@test1 zabbix_agentd.d]# rpm -q php-mysql

[root@server1 zabbix_agentd.d]# cat userparameter_percona_mysql.conf | wc -l

cd /var/lib/zabbix/percona/scripts/

vim ss_get_mysql_stats.php.cnf

<?php

$mysql_user = 'root';

$mysql_pass = 'redhat';

[root@test1 zabbix_agentd.d]# mysqladmin -uroot password westos

[root@test1 zabbix_agentd.d]# mysql -uroot -pwestos

[root@test1 scripts]# /var/lib/zabbix/percona/scripts/get_mysql_stats_wrapper.sh gg

[root@test1 scripts]# cd /tmp/

[root@test1 tmp]# chown zabbix.zabbix localhost-mysql_cacti_stats.txt

[root@test1 tmp]# ll localhost-mysql_cacti_stats.txt

[root@test1 tmp]# cd /etc/zabbix/zabbix_agentd.d/

[root@test1 zabbix_agentd.d]# zabbix_get -s 127.0.0.1 -p 10050 -k 'MySQL.Key-read-requests'

web界面

在模版中导入

zabbix监控nginx mysql 服务添加的更多相关文章

  1. 【zabbix告警监控】配置zabbix监控nginx服务

    zabbix监控nginx,nginx需要添加--with-http_stub_status模块 使用zabbix监控nginx,首先nginx需要配置开启ngx_status.但是我这边nginx安 ...

  2. zabbix监控nginx+php-fpm,mysql+主从复制+高可用,tomcat,redis web状态

    zabbix监控对象区分 使用SNMP监控交换 使用IPMI监控服务器硬件 使用Agent监控服务器 使用JMX监控JAVA SNMP监控流程 交换机上开启snmp 在zabbix上添加监控(设置SN ...

  3. Zabbix监控web,MySQL,TCP状态,Nginx

    接上篇Zabbix使用SMTP发送邮件报警并且制定报警内容 Zabbix怎么设置声音告警 web监控 在zabbix server选择web 创建一个监控web的场景 添加后这里有数字1 查看 假如在 ...

  4. 使用Zabbix监控Nginx服务实战案例

    使用Zabbix监控Nginx服务实战案例 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任.  一.编译安装nginx步骤详解并开启状态页 博主推荐阅读: https://www.cn ...

  5. Zabbix 监控 Nginx(四)

    简介: 如何使用 Zabbix 监控 Nginx 状态 ? 1.获取 Nginx 状态( HTTP Stub Status ) [root@localhost ~]# /apps/product/ng ...

  6. Zabbix 监控 Nginx 状态

    简介: 如何使用 Zabbix 监控 Nginx 状态 ? 1.获取 Nginx 状态( HTTP Stub Status ) shell > /usr/local/nginx/sbin/ngi ...

  7. zabbix监控nginx连接状态(转)

    zabbix监控nginx zabbix可以监控nginx的状态,关于一个服务的状态可以查看服务本身的状态(版本号.是否开启),还应该关注服务能力(例如以nginx的负载效果:连接数.请求数和句柄数) ...

  8. 使用zabbix监控nginx的活动连接数

    使用zabbix监控nginx的活动连接数 1.方法简述 zabbix可以自定义很多监控,只要是能通过命令获取到相关的值,就可以在zabbix的监控中增加该对象进行监控,在zabbix中,该对象称之为 ...

  9. 使用zabbix监控nginx

    在zabbix agentd客户端上,查看nginx是否加载了--with-http_stub_status_module.因为zabbix监控nginx是根据 nginx的Stub Status模块 ...

随机推荐

  1. StackMapTable format error

    环境:Oracle Java 7 , Mac OSX 报错如上图所示,主要是 Caused by: java.lang.ClassFormatError: StackMapTable format e ...

  2. Redis Cluster 伪集群的搭建

    简介 为何要搭建Redis集群?Redis是在内存中保存数据的,而我们的电脑一般内存都不大,这也就意味着Redis不适合存储大数据,适合存储大数据的是Hadoop生态系统的Hbase或者是MogoDB ...

  3. 下拉刷新和上拉加载更多(第三方框架MJRefresh)

    #import "RootViewController.h" #import "MJRefresh.h" @interface RootViewControll ...

  4. loj10102 旅游航道

    传送门 分析 一道喜闻乐见的求桥的板子题. 代码 #include<iostream> #include<cstdio> #include<cstring> #in ...

  5. Django框架 之 Cookie和Session初识

    Django框架 之 Cookie和Session初识 浏览目录 Cookie介绍 Django中的Cookie Session 一.Cookie介绍 1.Cookie产生的意义 众所周知,HTTP协 ...

  6. RPM验证与数字签名(Verify/Signature)

    RPM验证与数字签名(Verify/Signature) 摘自:https://blog.csdn.net/rhel_admin/article/details/32382391 2014年06月19 ...

  7. String的字符串相加是怎么实现的?

    http://bbs.csdn.net/topics/60485130 首先看 String str = "a" + "b" + "c"; ...

  8. HTML5应用程序缓存Application Cache.RP

    什么是Application Cache HTML5引入了应用程序缓存技术,意味着web应用可进行缓存,并在没有网络的情况下使用,通过创建cache manifest文件,可以轻松的创建离线应用. A ...

  9. 20169219《Linux内核原理与分析》课程总结

    第一周作业 这周主要学习l了linux基础入门这个课,还是很有用的.一周学完,前两个可能做起来比较慢,但是后面就快了,不要放弃希望,你可以的! 我就是没写到博客里面,哼哼,你就不要看了.自己总结吧,摊 ...

  10. Failed to export using the options you specified. Please check your options and try again

    参考这篇<从ASP.NET传递参数给水晶报表> http://www.cnblogs.com/insus/p/3281114.html  是可以传递参了.但是点击报表的菜单条上的打印图标没 ...