zabbix 报错

来源:互联网 发布:中国药科大学网络教育 编辑:程序博客网 时间:2024/06/05 02:41
1、启动 zabbix,ps aux |grep zabbix 发现没有 zabbix_server。
# cat /var/log/zabbix/zabbix_server.log
  4720:20170331:024448.126 [Z3001] connection to database 'zabbix' failed: [1044] Access denied for user ''@'localhost' to database 'zabbix'
  4720:20170331:024448.126 Cannot connect to the database. Exiting...
原因:不能连接数据库,没有创建 zabbix 数据库,并且没有授权
解决:参考 zabbix 服务端安装

2、- date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Chongqing' for 'CST/8.0/no DST' instead [include/page_header.php:186]
解决:
vim /etc/php.in
date.timezone = 'Asia/Chongqing'
/etc/init.d/httpd restart

另外安装的时候出现的参数不对,也都是在 php.ini 配置文件中

3、zabbix Dashboard 界面, Zabbix server is not running.
解决:
vim /etc/zabbix/zabbix_server.conf
DBUser=zabbix
DBPassword=zabbix

4、zabbix 监控页面出现问号乱码
http://www.phperz.com/article/14/1106/33588.html
主要原因是因为在创建 zabbix 数据库的时候,没有指定字符集为 utf-8,

5、zabbix 2.2 监控页面图形中有乱码(方框)
http://ask.apelearn.com/question/8090

6、zabbix 脚本发送邮件报警中文乱码,邮件内容变成附件
# yum install -y mailx dos2unix
# vim mail.sh
#!/bin/bash

#export LANG=zh_CN.UTF-8         //解决发送的中文变成了乱码的问题

FILE=/tmp/mailtmp.txt
echo "$3" >$FILE
dos2unix -k $FILE              //解决了发送的邮件内容变成附件的问题。

/bin/mail -s "$2" $1 < $FILE









原创粉丝点击