Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ Zabbix configuration external network mail alarm     - Tmux create the perfect terminal management tool under CentOS (Linux)

- MySQL appears data too long for column 'name' at row 1 to solve (Database)

- Ubuntu 14.04 How to install Cinnamon 2.4.5 (Linux)

- Linux installed PCRE (Linux)

- Several configuration changes illustrate deployment of PHP (Server)

- JDK installation under CentOS (Linux)

- KVM add virtual disks (Linux)

- Use apt-p2p up a local Debian package cache (Server)

- Linux firewall Iptables study notes (Linux)

- Qt signals and slots mechanism (Programming)

- Iptables principle (Linux)

- Linux file compression and file system packaged with instructions (Linux)

- 10 really interesting Linux command (Linux)

- Do you know how to build the Linux kernel (Programming)

- Several Ceph performance optimization of new methods and ideas (2015 SH Ceph Day after flu reference) (Server)

- CentOS set up FTP server (Server)

- Linux systems for entry-learning: Install closed-source packages in Debian (Linux)

- Grep how to find files based on file contents in UNIX (Linux)

- Linux system monitoring, top command of the diagnostic tool Detailed (Linux)

- 3 tips Linux command (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:      
 
- How to use OpenVPN and PrivacyIDEA build two-factor authentication for remote access (Server)
- Install multiple Linux distributions and Fedora 21 first experience on the same hard disk (Linux)
- Linux package management (Linux)
- CentOS 6.5 installation using a data recovery software extundelete (Linux)
- Ubuntu and Derivative Edition users install LMMS 0.4.15 (Linux)
- Configuring a Linux operating system security management services (Linux)
- Teamviewer not start in Linux (Linux)
- Java MD5 encryption implementation (Programming)
- Linux performance optimization features Tuned and ktune (Linux)
- Ubuntu 15.10 installation and deployment Swift development environment (Linux)
- JSON Introduction and Usage Summary (Programming)
- Installation JDK1.7 under Ubuntu14.04 64-bit (Linux)
- Linux pwd command learning experience (Linux)
- Android graphic introduction NDK installation and simple jni demo implementation (Linux)
- Spring Boot + Nginx + Tomcat + SSL configuration notes (Server)
- Depth understanding of C language (Programming)
- Linux file permissions chmod chown (Linux)
- Linux system security configuration (Linux)
- Linux Command - ps: a snapshot of the current process (Linux)
- HDFS Distributed File System Resource Manager Developer summary (Server)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.