Page 3 of 3

Re: How to Add Windows Mailqueue Notification

Posted: Mon Jan 05, 2015 2:22 am
by rlinux57
Great it's working perfectly fine.

Now how can i add this command in nagios monitoring server ?

/usr/lib64/nagios/plugins/check_nrpe -H 142.4.215.171 -t 30 -c CheckFiles -a path='C:\\Program Files (x86)\\Parallels\\Plesk\\Mail Servers\\Mail Enable\\Queues\\SMTP\\Outgoing\\Messages' pattern=*.* 'master-syntax={%total% Files Found}' MaxWarn=500 MaxCrit=1000
{1 Files Found}|'found files'=1;500;1000

Re: How to Add Windows Mailqueue Notification

Posted: Mon Jan 05, 2015 3:36 am
by Box293
Excellent, we are making good progress.

You will need a command:

Code: Select all

define command {
       command_name                  		nrpe_checkfiles
       command_line                  		$USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c CheckFiles -a $ARG1$ 
}
And a service (I've assigned it to the host named "142.4.215.171"):

Code: Select all

define service {
	host_name			142.4.215.171
	service_description		Plesk Outgoing Messages File Count
	use				local-service
	check_command			nrpe_checkfiles!path='C:\\Program Files (x86)\\Parallels\\Plesk\\Mail Servers\\Mail Enable\\Queues\\SMTP\\Outgoing\\Messages' pattern=*.* 'master-syntax={%total% Files Found}' MaxWarn=500 MaxCrit=1000
	register			1
	}	
Something like that

Re: How to Add Windows Mailqueue Notification

Posted: Mon Jan 05, 2015 4:10 am
by rlinux57
Gettings error in nagstamon: no handler for command check_winmailqueue
define command{
command_name check_winmailqueue
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c check_winmailqueue -a $ARG1$
}




define service{
use generic-service
host_name winserver
service_description Mail Queue
check_command nrpe_checkfiles!path='C:\\Program Files (x86)\\Parallels\\Plesk\\Mail Servers\\Mail Enable\\Queues\\SMTP\\Outgoing\\Messages' pattern=*.* 'master-syntax={%total% Files Found}' MaxWarn=500 MaxCrit=1000
register 1
}

Re: How to Add Windows Mailqueue Notification

Posted: Mon Jan 05, 2015 4:42 am
by Box293
This is incorrect:
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c check_winmailqueue -a $ARG1$

It should be:
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c CheckFiles -a $ARG1$

This is incorrect:
check_command nrpe_checkfiles!path='C:\\Program Files (x86)\\Parallels\\Plesk\\Mail Servers\\Mail Enable\\Queues\\SMTP\\Outgoing\\Messages' pattern=*.* 'master-syntax={%total% Files Found}' MaxWarn=500 MaxCrit=1000

It should be:
check_command check_winmailqueue!path='C:\\Program Files (x86)\\Parallels\\Plesk\\Mail Servers\\Mail Enable\\Queues\\SMTP\\Outgoing\\Messages' pattern=*.* 'master-syntax={%total% Files Found}' MaxWarn=500 MaxCrit=1000

Re: How to Add Windows Mailqueue Notification

Posted: Mon Jan 05, 2015 6:04 am
by rlinux57
It's working perfectly fine. You can check this ticket now.
I sincerely appreciate your kind support, please accept my sincere thanks.
Your co-operation will be highly appriciated. :)