How to Add Windows Mailqueue Notification
How to Add Windows Mailqueue Notification
Please help me out, how to add windows mail queue notification in nagios.
Note: we're using mailenable for email in windows server.
Note: we're using mailenable for email in windows server.
Re: How to Add Windows Mailqueue Notification
We need to verify the type of email server you want to monitor and the version it is running.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: How to Add Windows Mailqueue Notification
We're using mailenable standar version 8.53
Re: How to Add Windows Mailqueue Notification
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).
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
rlinux57, please let us know if millisa's suggestion works out for you.
Former Nagios employee
Re: How to Add Windows Mailqueue Notification
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.
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.
-
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: How to Add Windows Mailqueue Notification
Looks like arguments are not allowed via nsclient. You should look for the following section and make sure that allow arguments is true:
Restart the nsclient service, and attempt your check again.
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
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: How to Add Windows Mailqueue Notification
I've added line in nsc.ini as per your direction but still getting same error.
Re: How to Add Windows Mailqueue Notification
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"
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
Can you attach/post in code wraps the full nsc.ini?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.