How to Add Windows Mailqueue Notification

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
rlinux57
Posts: 324
Joined: Mon Dec 08, 2014 12:03 am

Re: How to Add Windows Mailqueue Notification

Post 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
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: How to Add Windows Mailqueue Notification

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
rlinux57
Posts: 324
Joined: Mon Dec 08, 2014 12:03 am

Re: How to Add Windows Mailqueue Notification

Post 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
}
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: How to Add Windows Mailqueue Notification

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
rlinux57
Posts: 324
Joined: Mon Dec 08, 2014 12:03 am

Re: How to Add Windows Mailqueue Notification

Post 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. :)
Locked