1.修改zabbix-agent配置文件,开启自定义脚本功能
1 | [root@localhost zabbix]# cd /etc/zabbix/ && vim zabbix_agentd.conf |
2. 新增监控脚本,并给它可执行权限
1 | [root@localhost zabbix]# mkdir check_scripts |
3. 新增监控项目配置文件
1 | [root@localhost zabbix]# cat zabbix_agentd.d/userparameter_processnums.conf |
4.重启zabbix_agent服务并测试脚本是否能获取到值
1 | [root@localhost zabbix_agentd.d]# systemctl restart zabbix-agent |
5.登录web页面新加模板
6.创建模板应用
7.创建监控项
ˆ
8.创建图形
9.查看效果应用到主机
可以看到已经出现效果了,但是发现监控图中文乱码,怎么办呢?
10.修复zabbix监控图中文乱码
- 在windows 系统盘符下的windows/font/下拷贝中文字体
利用xftp工具把字体文件传到zabbix-server的/usr/share/zabbix/include/目录,我这里因为是mac 所以直接scp命令拷贝
1
scp *TTF zabbix34:/usr/share/zabbix/fronts/
修改/usr/share/zabbix/include/defines.inc.php字体配置项
1
2define('ZBX_FONT_NAME', 'SIMHEI');
define('ZBX_GRAPH_FONT_NAME', 'SIMHEI');
4.刷新页面
- 本文作者: ChuLinx
- 本文链接: http://yoursite.com/2019/11/30/zabbix自定义模板应用触发器创建/
- 版权声明: 本博客所有文章除特别声明外,均采用 MIT 许可协议。转载请注明出处!