27 C
Dubai
Tuesday, December 10, 2024

How to Configure Check_mk monitor with Exchange 2013

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

image

Choose Services

image

 

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.

image

 

Note : Make sure your Execution Policy is set properly on your machines.

For Example to set to Unrestricted – Set-ExecutionPolicy Unrestricted

Satheshwaran Manoharan
Satheshwaran Manoharanhttps://www.azure365pro.com
Award-winning Technology Leader with a wealth of experience running large teams and diversified industry exposure in cloud computing. From shipping lines to rolling stocks.In-depth expertise in driving cloud adoption strategies and modernizing systems to cloud native. Specialized in Microsoft Cloud, DevOps, and Microsoft 365 Stack and conducted numerous successful projects worldwide. Also, Acting as a Technical Advisor for various start-ups.

Related Articles

4 COMMENTS

  1. 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!

  2. 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

  3. 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!

LEAVE A REPLY

Please enter your comment!
Please enter your name here

× How can I help you?