: 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:
- [Root @ localhost ~] #Cd/Usr/local/src/tarbag/
- [Root @ localhost tarbag] # tar zxvf postfix-queuemonitor-1.0.tar
- [Root @ localhost tarbag] # tar zxvf postfix-queuemonitor-1.0.tar.gz-C/usr/local/nagios/libexec/
- [Root @ localhost tarbag] # cd/usr/local/nagios/libexec/
- [Root @ localhost libexec] #MvPostfix_quemonitor /*../
Add postfix to PATH.
- [Root @ localhost libexec] # vi/etc/proFile
- POSTFIX_HOME =/usr/local/postfix/sbin
- PATH =: $ POSTFIX_HOME: $ PATH
- [Root @ localhost libexec] # source/etc/profile
Add the monitoring program to start automatically and run it:
- [Root @ localhost libexec] # echo "/usr/local/nagios/libexec/queuemon &">/etc/rc. local
- [Root @ localhost libexec] #/usr/local/nagios/libexec/queuemon &
Configure nrpe. cfg
- [Root @ localhost etc] # vi nrpe. cfg
- Command [check_postfix] =/usr/local/nagios/libexec/check_queue/tmp/que
Configure the configuration file of the nagios server Mail Host:
- [Root @ localhost objects] # vi mail. cfg
- Define service {
- Use local-service; Name of service template to use
- Host_name mail_host
- Service_description Postfix_queuemonitor
- Check_command check_nrpe! Check_postfix
- NotifiCatIons_enablEd1
- }
Restart nrpe and nagios
If mail and Nagios are on the same machine.
Edit command. cfg
- [Root @ localhost objects] # vi commands. cfg
- Define command {
- Command_name check_postfix
- Command_line/usr/local/nagios/libexec/check_queue/tmp/que
- }
Edit the local cfg file
- [Root @ localhost objects] # vi localhost. cfg
- Define service {
- Use local-service; Name of service template to use
- Host_name localhost
- Service_description Postfix_queuemonitor
- Check_command check_postfix
- Events _EnableD 1
- }
Nagios restart complete