1. 程式人生 > >zabbix3郵件告警

zabbix3郵件告警

chown -R zabbix:zabbix /data/zabbix/alertscripts/send.sh ./send.sh [email protected] 11 11
注意:centos7下執行傳送有可能報錯: [[email protected] alertscripts]# ./send.sh [email protected] 11 11 ******************************************************************* Using the default of SSL_verify_mode of SSL_VERIFY_NONE for client is deprecated! Please set SSL_verify_mode to SSL_VERIFY_PEER together with SSL_ca_file|SSL_ca_path for verification. If you really don't want to verify the certificate and keep the connection open to Man-In-The-Middle attacks please set SSL_verify_mode explicitly to SSL_VERIFY_NONE in your application. ******************************************************************* at /usr/local/bin/sendEmail line 1906. invalid SSL_version specified at /usr/share/perl5/vendor_perl/IO/Socket/SSL.pm line 424. 原因:
[[email protected] alertscripts]# perl -v This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi (with 34 registered patches, see perl -V for more detail) Copyright 1987-2012, Larry Wall 由於在CentOS 7下perl的版本為5.16,而centos6.5的是5.10,版本不相容 解決: /usr/local/bin/sendEmail -f "$from" -t "$to" -s "$smtp" -u "$subject" -o message-content-type=html -o message-charset=utf8-xu "$from" -xp "$passwd" -m "$body" -o tls=no 加上tls=no引數就可以了 [
[email protected]
alertscripts]# ./send.sh [email protected] 11 11 Nov 16 13:57:52 localhost sendEmail[34132]: Email was sent successfully!