Had to work with a Open Source monitoring tool. and they want to monitor Exchange 2013 using it .
Which is Called as Check_mk Monitoring
Below Link shows up their open source monitoring website.
http://mathias-kettner.de/check_mk.html
Downloaded their Check_mk agent and installed in Exchange 2013 Servers
Download link for Check_mk agents for windows
https://mathias-kettner.de/check_mk_download.html
—
Download the Scripts
Basic Exchange 2013 Scripts for Check_mk
—
In your Exchange 2013 Mailbox Server
Note – These Exchange 2013 servers are on DAG.
###############
Place .bat files –
ExchangeHealth.bat
MailQueueHealth.bat
In this location
C:\Program Files (x86)\check_mk\local
##################
Place .ps1 files –
ExchangeHealth.ps1
MailQueueHealth.ps1
Note : Create a folder called scripts – if it doesn’t exist
In this location
C:\scripts
—
Now login to Monitoring
Select the host – Click on WATO
Choose Services
Click on Full SCAN and Click on Activate Missing
Now Monitor would show . Feel free to open the Mail Queue script and set the limits as per your wish.
Note : Make sure your Execution Policy is set properly on your machines.
For Example to set to Unrestricted – Set-ExecutionPolicy Unrestricted
Hi!
nice job. But you need to know: (Windows Server 2012R2)
powershell Path at the .bat Scripts: %SystemRoot%\syswow64\WindowsPowerShell\v1.0\powershell.exe
and you have to install 64-Bit Check_mk Agent!
Good Morning ((ERROR))
Add-PSSnapin : No snap-ins have been registered for Windows PowerShell version
3.
At C:\agents\windows\plugins\ExchangeHealth.ps1:35 char:1
+ Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (Microsoft.Excha…owerShell.E2
010:String) [Add-PSSnapin], PSArgumentException
+ FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.Ad
dPSSnapinCommand
Get-MailboxDatabase : The term ‘Get-MailboxDatabase’ is not recognized as the
name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is
correct and try again.
At C:\agents\windows\plugins\ExchangeHealth.ps1:40 char:20
+ $MountedonServer = Get-MailboxDatabase -status
+ ~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-MailboxDatabase:String) [],
CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Get-MailboxDatabase : The term ‘Get-MailboxDatabase’ is not recognized as the
name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is
correct and try again.
At C:\agents\windows\plugins\ExchangeHealth.ps1:44 char:23
+ ForEach ($DataBase in Get-MailboxDatabase) {
+ ~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-MailboxDatabase:String) [],
CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
0 ExchangeHealth V=1 All Mailbox Databases are mounted and healthy.
Add-PSSnapin : No snap-ins have been registered for Windows PowerShell version
3.
At C:\agents\windows\plugins\MailQueueHealth.ps1:54 char:5
+ Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (Microsoft.Excha…owerShell.E2
010:String) [Add-PSSnapin], PSArgumentException
+ FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.Ad
dPSSnapinCommand
Get-Queue : The term ‘Get-Queue’ is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or
if a path was included, verify that the path is correct and try again.
At C:\agents\windows\plugins\MailQueueHealth.ps1:61 char:20
+ ForEach ($Queue in Get-Queue -Server $env:computername |
Where-Object{$_.identit …
+ ~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-Queue:String) [], CommandNo
tFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
0 MailQueue V=1 OK: All mail queues within limits. |Queue=-Mails
These work in exchange 2016 as well,
you should just change the snap in lines to
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn
for both of the PS scripts
Hope this helps!
Thank you for your Inputs