Zabbix使用HTTP代理的模板监控中间件

x33g5p2x  于2021-09-19 转载在 其他  
字(0.9k)|赞(0)|评价(0)|浏览(404)

本文简述使用zabbix模板监控httpd等中间件的方法。

1. 环境
  • centos7
  • Zabbix版本:5.0.14
  • httpd版本:Apache/2.4.6
2. 步骤
2.1 安装httpd
yum install -y httpd

在linux命令行确认 mod_status 可用。

# httpd -M 2>/dev/null | grep status_module
 status_module (shared)

因为是yum安装,为了方便测试,修改 /etc/httpd/conf.d/welcome.conf,新增 /server-status 访问路径,开启 mod_status 模块。

<LocationMatch "^/+$">
    Options -Indexes
    ErrorDocument 403 /.noindex.html
</LocationMatch>

<Location "/server-status">
    SetHandler server-status
    Require all granted
</Location>
...

重启 httpd 服务,浏览器输入 http://hostIP/server-status 可以查询状态,修改 /etc/httpd/conf.modules.d/00-mpm.conf 可调整MPM模式。

在这里插入图片描述

2.2 在zabbix server添加主机

因为本文主题是使用 HTTP代理,无需使用客户端agent,所以接口类型虽然填写的是客户端,但实际并不会用到,客户端也不需要开启zabbix agent;模板选择 Template App Apache by HTTP,无需选择 Template App Apache by Zabbix agent。

在这里插入图片描述

在这里插入图片描述

    稍等片刻,出现最新数据。

在这里插入图片描述

    使用http代理的模式可以监控elasticsearch,zookeeper,jenkins等中间件,在创建主机的时候选中相应模板即可。

参考文档

[1].Zabbix LLC. Zabbix + Apache[EB/OL]. [2021-09-05]. https://www.zabbix.com/cn/integrations/apache.

相关文章

微信公众号

最新文章

更多