Nagios monitoring postfix queue

Source: Internet
Author: User
: Http: exchange. nagios. orgdirectoryPluginsEmail-and-GroupwarePostfixPostfix-Queue-Monitordetails installation: [root @ localhost ~] Export cdusrlocalsrctarbag1_root@localhosttarbag##tarzxvfpostfix-queuemonitor-1.0.tar [ro

: Http ://ExChange.nagios.org/directory/Plugins/Email-and-Groupware/Postfix/Postfix-Queue-Monitor/detaiLs

Installation:

  1. [Root @ localhost ~] #Cd/Usr/local/src/tarbag/
  2. [Root @ localhost tarbag] # tar zxvf postfix-queuemonitor-1.0.tar
  3. [Root @ localhost tarbag] # tar zxvf postfix-queuemonitor-1.0.tar.gz-C/usr/local/nagios/libexec/
  4. [Root @ localhost tarbag] # cd/usr/local/nagios/libexec/
  5. [Root @ localhost libexec] #MvPostfix_quemonitor /*../

Add postfix to PATH.

  1. [Root @ localhost libexec] # vi/etc/proFile
  2. POSTFIX_HOME =/usr/local/postfix/sbin
  3. PATH =: $ POSTFIX_HOME: $ PATH
  4. [Root @ localhost libexec] # source/etc/profile

Add the monitoring program to start automatically and run it:

  1. [Root @ localhost libexec] # echo "/usr/local/nagios/libexec/queuemon &">/etc/rc. local
  2. [Root @ localhost libexec] #/usr/local/nagios/libexec/queuemon &

Configure nrpe. cfg

  1. [Root @ localhost etc] # vi nrpe. cfg
  2. Command [check_postfix] =/usr/local/nagios/libexec/check_queue/tmp/que

Configure the configuration file of the nagios server Mail Host:

  1. [Root @ localhost objects] # vi mail. cfg
  2. Define service {
  3. Use local-service; Name of service template to use
  4. Host_name mail_host
  5. Service_description Postfix_queuemonitor
  6. Check_command check_nrpe! Check_postfix
  7. NotifiCatIons_enablEd1
  8. }

Restart nrpe and nagios


If mail and Nagios are on the same machine.

Edit command. cfg

  1. [Root @ localhost objects] # vi commands. cfg
  2. Define command {
  3. Command_name check_postfix
  4. Command_line/usr/local/nagios/libexec/check_queue/tmp/que
  5. }

Edit the local cfg file

  1. [Root @ localhost objects] # vi localhost. cfg
  2. Define service {
  3. Use local-service; Name of service template to use
  4. Host_name localhost
  5. Service_description Postfix_queuemonitor
  6. Check_command check_postfix
  7. Events _EnableD 1
  8. }

Nagios restart complete

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.