Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Summary of problems in installation and configuration zabbix

Shulou Source: shulou.com Published: 2022-06-01 08:54:39 10月02日 Update

1. When using apt-get install to install zabbix-server, prompt for database password:

Database password input error, resulting in problems:

Treatment:

Remove: apt-get remove

Installation: apt-get install

2. Check the log file and find an error:

7224:20130604:134059.455 Send list ofactive checks to [X.X.X.X] failed: host [localhost] not found

The reasons for the error are:

No correspondence between IP and hostname found

Treatment:

Add the corresponding entry to/etc/hosts

Jun 4 16:00:01 jiuhe4 sm-msp-queue[1749]: My unqualified host name (jiuhe4)unknown; sleeping for retry

Treatment:

Modify the line corresponding to the local IP address in/etc/hosts to read:

X.X.X.X jiuhe4 jiuhe.com

3. Do not send alarm mail:

The mail script written by myself using msmtp command is too bad, which leads to the alarm not being sent in time.

So I searched online and found the following:

zabbix_email.sh Script content: #!/ bin/shDEBUG=1if [ $DEBUG -gt 0 ];then exec 2>>/var/log/msmtp.log set -xfiFROM='jiuhedz@gmail.com'# Parameters (as passed by Zabbix):# $1 : Recipient# $2 : Subject# $3 : Messagerecipient=$1subject=$2message=$3date=`date --rfc-2822`sed 's/$/\r/'

Tags: Method processing content password interface data database script mail error X.X.X.X input problem crappy line host reason command address comment Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Xiaomi Shulou Tech Info Linux Microsoft