Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ Zabbix configuration external network mail alarm     - To convert into a binary search tree sorted doubly linked list (Programming)

- Definition Format Oracle basis of various statements (Database)

- Add a custom encryption algorithm in OpenSSL (Linux)

- open V switch port mirror in OpenStack neutron (Server)

- The difference between Objective-C language nil, Nil, NULL, NSNull (Programming)

- Recycle Bin function realization in Linux (Linux)

- Linux file system structure Introduction (Linux)

- Easy to install CentOS 6.6 desktop environment (Linux)

- Shell Script: Bulk add users, and set the random character password (Programming)

- Linux System Getting Started Learning: Linux command in w (Linux)

- Linux learning portal: CentOS 6.4 system kernel upgrade (Linux)

- Bash environment is automatically install and initialize oh-my-zsh & autojump zsh (Linux)

- Computer black magic: tail recursion (Programming)

- SELinux multi-level security (Linux)

- Docker + OpenvSwitch build experimental environment VxLAN (Server)

- The YUM package management under Linux (Linux)

- Eclipse-ee Tomcat browser can not start Tomcat, and Web project service deployment (Server)

- wget command Walkthrough (Linux)

- SendMail version of Java implementation with attachments (Programming)

- How to improve the performance of Ruby On Rails (Linux)

 
         
  Zabbix configuration external network mail alarm
     
  Add Date : 2017-08-31      
         
       
         
  1. Basic conditions

The zabbix server has been created and running
The zabbix client is already up and running
2. Packages that need to be installed
Compile and install msmtp package, yum install mutt package
Configuration procedure
3.1 Configure msmtp
Download and install the msmtp package
Http://sourceforge.net/projects/msmtp/files/msmtp/1.6.2/
Install msmtp
Tar jxvf msmtp-1.6.2.tar.bz2
Cd msmtp-1.6.2
./configure
Make
Make install Creates the msmtp configuration file
/ Usr / local / etc / msmtprc file contents
Account default
Host smtp.exmail.qq.com
From zabbix@uxuexi.com
Auth login
Tls off
User zabbix@uxuexi.com
Password uxuexi123
Logfile /var/log/msmtp.log Modify the configuration file permissions
Chown zabbix: zabbix / usr / local / etc / msmtprc Creates a log file
Touch /var/log/msmtp.log
Chown zabbix: zabbix /var/log/msmtp.log

3.2 Configuring Mutt
Yum Install mutt and modify the configuration file
Vim / etc / Muttrc Modify the following options
Set sendmail = "/ usr / local / msmtp / bin / msmtp"
Set use_from = yes
Set realname = "zabbix@uxuexi.com"
Set editor = "vim" test, if the message shows that there is no problem
Echo "test mail" | mutt -s "test" xxx @ xxx
3.3 Configuring zabbix
3.3.1 Create the zabbix script
Vim /usr/lib/zabbix/alertscripts/msmtp.sh Script contents
Where $ 3 is the message content, $ 2 is the message header, and $ 1 is the mail address
#! / Bin / bash
Echo "$ 3" | mutt -s "$ 2" "$ 1" Create the media type
In the zabbix web page administrator -> media types click the upper right corner of the create media type

3.3.2 zabbix user configuration
In the zabbix web page administrator -> users click the upper right corner of the users group, select the users, click the user
Switch to the media tab in the user's configuration interface
Click add
In the pop-up dialog box to send to fill in the mail address to send mail

Zabbix action configuration
In the configuration -> actions page click the top right corner create action
Add the action name

Click new at the operations tab

Configure the time for each step (the default 3600s) in the first few steps to send mail, send to users to add users, and then click the first add

All operations can be done to do some stress testing to generate some alarms to test the message
     
         
       
         
  More:      
 
- MySQL stored procedures execute dynamic sql statement (Database)
- Linux linux system security (Linux)
- Use OpenSSL carried BASE64 encoding and decoding (Linux)
- Django url () function Detailed (Programming)
- Ubuntu 14.04.02 LTS startup items erroneous writing / dev / sda1 (win 7 loader) Repair (Linux)
- Compiled version of Android Opus audio codec library method (Programming)
- System Security: Build Linux with LIDS steel castle (Linux)
- MySQL event table to achieve timing build a small note (Database)
- Ubuntu achieve initialization iptables (Linux)
- Analysis RabbitMQ cluster (Server)
- Several Ceph performance optimization of new methods and ideas (2015 SH Ceph Day after flu reference) (Server)
- Golang environment configuration recommendations (Linux)
- Practical Handbook: 130+ improve the efficiency of commonly used commands Vim (Linux)
- HTTP and HTTPS request response process difference (Linux)
- How apt-get limited use IPv4 or IPv6 protocol to download (Linux)
- Linux operation and maintenance of the automated installation and deployment RHEL7.0 Cobbler (Linux)
- CentOS installation Percona Server 5.5.42 compiling problem solve one case (Linux)
- Oracle 11g creates virtual private directory RMAN-06004 ORA-00942 error handling (Database)
- The oh-my-zsh into true my zsh (Linux)
- Oracle 11g dataguard main library backup and recovery to the test environment in one database error (Database)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.