Zabbix使用nginx做web服务器 && Zabbix部署jmx监控tomcat

一、zabbix使用nginx做web服务器

这里写图片描述

yum nginx装好,默认的default.conf文件直接backup掉,新建一个zabbx.conf文件,

如果有报错看下nginx_log 日志排错。

1、安装nginx

[root@server1 ~]# cd /etc/nginx/
[root@server1 nginx]# ls
conf.d          koi-utf  mime.types  scgi_params   win-utf
fastcgi_params  koi-win  nginx.conf  uwsgi_params
[root@server1 nginx]# cd conf.d/
[root@server1 conf.d]# ls
default.conf  example_ssl.conf
[root@server1 conf.d]# vim default.conf 


    location /status {
        stub_status     on;
        access_log      off;
        allow 127.0.0.1;
        deny all;
}

这里写图片描述

[root@server1 conf.d]# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
[root@server1 conf.d]# nginx 
[root@server1 conf.d]# nginx -s reload

2、网页访问:

这里写图片描述

3、shell测试:

这里写图片描述

这里写图片描述

4、配置 zabbix nginx 文件 。

[root@server1 nginx]# cd /etc/zabbix/
[root@server1 zabbix]# ls
zabbix_agentd.conf  zabbix_agentd.d
[root@server1 zabbix]# cd zabbix_agentd.d/
[root@server1 zabbix_agentd.d]# ls
userparameter_mysql.conf
[root@server1 zabbix_agentd.d]# cp userparameter_mysql.conf userparameter_nginx.conf 
[root@server1 zabbix_agentd.d]# vim userparameter_nginx.conf 
[root@server1 zabbix_agentd.d]# /etc/init.d/zabbix-agent restart
Shutting down Zabbix agent:                                [FAILED]
Starting Zabbix agent:                                     [  OK  ]

这里写图片描述

5、 zabbix 主机 开启服务 :

[root@localhost ~]# systemctl start mariadb
[root@localhost ~]# systemctl enable mariadb
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
[root@localhost ~]# systemctl start zabbix-server
[root@localhost ~]# systemctl enable zabbix-server
Created symlink from /etc/systemd/system/multi-user.target.wants/zabbix-server.service to /usr/lib/systemd/system/zabbix-server.service.
[root@localhost ~]# systemctl start zabbix-agent
[root@localhost ~]# systemctl enable zabbix-agent
Created symlink from /etc/systemd/system/multi-user.target.wants/zabbix-agen
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值