Nagios için PowerMTA status check plugin
Lazım oldu yazdık. Güle güle kullanın geliştirin. Bize bu kadarı yeterli.
# # # PowerMTA status check plugin for nagios # Kursad DARA [mkursaddara@gmail.com] # http://www.serbestkose.net # 20 December 2012, the day before Maya's Armageddon. # # #!/bin/bash lynx="/usr/bin/lynx" if [ -z "$1" ]; then echo "Usage : $0 [powermta_host_name or powermta_host_ip]" else response=`$lynx --head http://$1/status --dump |head -n1 | awk {'print $2'}` if [ "$response" = "200" ]; then status=`$lynx -dump http://$1/status |grep Status | tail -n1|awk {'print $2'}` if [ "$status" = "running" ]; then qcount=`$lynx -dump http://$1/status |grep Spool -A1 |tail -n1 |awk {'print $2'}` echo "OK - PowerMTA is running [ Queue : $qcount ]" exit 0; else echo "CRITICAL - PowerMTA is not running" exit 2; fi else echo "CRITICAL - PowerMTA is not running" exit 2; fi fi
Posted in Linux, Mail Servers, Nagios, PowerMTA on December 20th, 2012 by Kürşad DARA | | 0 Comments
Powermta Startup error: Error: host name “xxx” is not fully qualified, please configure ‘host-name’ and/or ‘domain-suffix’. hatası
PowerMTA sunucularından birini start etmek istediğimde aşağıdaki hatayı aldım.
[root@xxx ~]# /etc/init.d/pmta start Starting PowerMTA: [FAILED]
[root@xxx ~]# pmtad --debug 2012-04-24 12:35:56 Startup error: Error: host name "xxx" is not fully qualified, please configure 'host-name' and/or 'domain-suffix'.
Çözüm olarak hostname olarak full domain name set etmek gerekiyor.
[root@xxx sysconfig]# hostname xxx
[root@xxx sysconfig]# vi /etc/sysconfig/network NETWORKING=yes NETWORKING_IPV6=no HOSTNAME=xxx.kursad.com GATEWAY=xxx.xxx.xxx.xxx
[root@xxx sysconfig]# hostname xxx.kursad.com
[root@xxx sysconfig]# hostname xxx.kursad.com
[root@xxx sysconfig]# /etc/init.d/pmta start Starting PowerMTA: [ OK ]
[root@xxx sysconfig]# pmtad --debug 2012-04-24 12:38:26 Startup error: PowerMTA is already running
Posted in Linux, Mail Servers on April 24th, 2012 by Kürşad DARA | | 0 Comments