Page 1 of 3
How to Add Windows Mailqueue Notification
Posted: Fri Dec 26, 2014 10:23 am
by rlinux57
Please help me out, how to add windows mail queue notification in nagios.
Note: we're using mailenable for email in windows server.
Re: How to Add Windows Mailqueue Notification
Posted: Fri Dec 26, 2014 11:22 am
by tgriep
We need to verify the type of email server you want to monitor and the version it is running.
Re: How to Add Windows Mailqueue Notification
Posted: Sat Dec 27, 2014 3:03 am
by rlinux57
We're using mailenable standar version 8.53
Re: How to Add Windows Mailqueue Notification
Posted: Sat Dec 27, 2014 3:31 pm
by millisa
According to this
mailEnable KB article, mailEnable stores its queues in a directory as two files: one in the base directory containing routing info and one in a Messages subdirectory with the actual content of the mail. (The article gives the default location for the Outgoing queue directory and implies the Incoming directory is similarly located).
It seems to me you could just use a filecounter plugin and trigger based on the count of files in either that main directory or the Messages subdirectory for each queue.
Here is a filecounting script that someone wrote that is intended for use with NRPE on windows:
http://exchange.nagios.org/directory/Pl ... nt/details
They even mention it being used for mail queues as a possible use case.
(I don't use this, but a quick glance at the included wsf file appears to do what they claim).
Re: How to Add Windows Mailqueue Notification
Posted: Mon Dec 29, 2014 12:59 pm
by tmcdonald
rlinux57, please let us know if millisa's suggestion works out for you.
Re: How to Add Windows Mailqueue Notification
Posted: Mon Dec 29, 2014 1:57 pm
by rlinux57
thanks for the material, it's really very helpful for me. But i'm stucked.
I've added this line in nsc.ini: alias_directory_file_count = Wscript.exe //T:30 //NoLogo c:\Program Files\NSClient++\scripts\directory_file_count.wsf $ARG1$
And add this line in script: c:\Program Files\NSClient++\scripts\directory_file_count.wsf C:\Program Files (x86)\Parallels\Plesk\Mail Servers\Mail Enable\Queues\SMTP\Outgoing\Messages 25 75
And run this command in nagios server: ./check_nrpe -H $Hostname -t 30 -c directory_file_count -a 'C:\Program Files (x86)\Parallels\Plesk\Mail Servers\Mail Enable\Queues\SMTP\Outgoing\Messages 25 75'
Getting this error after running above command on nagios server: Exception processing request: Request contained arguments (not currently allowed, check the allow arguments option).
C: = The disk drive that contains the directory path we're are monitoring.
\Program Files (x86)\Parallels\Plesk\Mail Servers\Mail Enable\Queues\SMTP\Outgoing\Messages = The directory path we're are monitoring.
25 = The threshold limit for a WARNING message.
75 = The threshold limit for a CRITICAL message.
But cannot get any solution.
Re: How to Add Windows Mailqueue Notification
Posted: Mon Dec 29, 2014 2:57 pm
by sreinhardt
Looks like arguments are not allowed via nsclient. You should look for the following section and make sure that allow arguments is true:
Code: Select all
[/settings/NRPE/server]
; COMMAND ARGUMENT PROCESSING - This option determines whether or not the we will allow clients to specify arguments to commands that are executed.
allow arguments = true
Restart the nsclient service, and attempt your check again.
Re: How to Add Windows Mailqueue Notification
Posted: Tue Dec 30, 2014 1:43 am
by rlinux57
I've added line in nsc.ini as per your direction but still getting same error.
Re: How to Add Windows Mailqueue Notification
Posted: Tue Dec 30, 2014 4:34 am
by rlinux57
Running command on nagios server: /usr/lib64/nagios/plugins/./check_nrpe -H HOSTNAME -t 30 -c alias_directory_file_count
Now getting this error: No handler for command: wscript.exe
I've checked wscript.exe is present at this location "C:\Windows\System32"
Re: How to Add Windows Mailqueue Notification
Posted: Tue Dec 30, 2014 2:42 pm
by abrist
Can you attach/post in code wraps the full nsc.ini?