Kaseya Community

Monitoring Email Connectivity Not simply Server Uptime

  • I have been hunting for a suitable solution to this for ages.

     

    Exventually found it.

     

    Check out www.mailflowmonitor.com.au

     

    They offer a free trial. Worth a go. You can even get an alert in Kaseya.

  • This can be accomplished in multiple ways using Kaseya without the need for a third party app. Sorry, but as this appears to be your first post I have to wonder if you're not simply spamming the forum.

  • @Zippo where can this script be found?  Or how can I set this up?

  • Write a script to telnet to the email server on port 25. Check the response to see if it suceeded or failed. Another way, I'd think, would be to monitor the MS Exchange message queues; if there's more than a few messages in the queue (depending upon your particular server load) then the server may be hung. A third way, although more work, would be to use a script to send an email very 5 minutes to a dead drop mailbox then use a powershell script to monitor the message count in the mailbox (and remove email so it doesn't pile up).

  • You can download the PortQry tool from Microsoft here:

     http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=17148 

    Place the PortQry executable in the VSASharedFIles directory on your KServer. Here's a script that you can run on a workstation that uses PortQry tool to test the SMTP service on the mail server. You'll need to modify the script to use the IP Address of your mail server. You can monitor the Application Event Log on the workstation you run the PortQry from for Kaseya Events. If the event includes the value "9999 - 220" then the service is up and ready. If the value is "9999 -" then the SMTP service is down or unavailable.

     

    <?xml version="1.0" encoding="utf-8" ?>

    <ScriptExport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.kaseya.com/vsa/2008/12/Scripting">
    <Procedure name="Test SMTP" treePres="3" id="1184948780" folderId="21246231921621776498221953">
     <Body description="Sends a PortQry to the IP Address of the Exchange Server on port 25 and writes response to the Application Event Log.">
     <If description="">
    <Condition name="TestFile">
      <Parameter xsi:type="StringParameter" name="Path" value="c:\kworking\portqry.exe" />
      <Parameter xsi:type="EnumParameter" name="Condition" value="Exists" />
      <Parameter xsi:type="StringParameter" name="Value" value="" />
      </Condition>
    <Then>
    <Statement description="Attempts to return results of a shell command to a global variable '#global:cmdresults#'" name="Execute Shell Command - Get Results to Variable" continueOnFail="false" osType="Windows">
      <Parameter xsi:type="StringParameter" name="Parameter1" value="c:\kworking\PortQry.exe -n 10.4.1.16 -e 25 | find "220"" />
      <Parameter xsi:type="StringParameter" name="Parameter2" value="false" />
      <Parameter xsi:type="StringParameter" name="Parameter3" value="System" />
      </Statement>
    <Statement description="Creates a Windows event log entry" name="Create Event Log Entry" continueOnFail="false">
      <Parameter xsi:type="StringParameter" name="Parameter1" value="9999 - #global:cmdresults#" />
      <Parameter xsi:type="StringParameter" name="Parameter2" value="Information" />
      <Parameter xsi:type="StringParameter" name="Parameter3" value="Application" />
      </Statement>
      </Then>
     <Else>
    <Statement description="Write the selected file to the machine at the path specified - full path required." name="WriteFile" continueOnFail="false" osType="Windows">
      <Parameter xsi:type="StringParameter" name="Path" value="c:\kworking\PortQry.exe" />
      <Parameter xsi:type="StringParameter" name="ManagedFile" value="VSASharedFiles\PortQry.exe" />
      <Parameter xsi:type="BooleanParameter" name="DeleteAfter" value="False" />
      </Statement>
    <Statement description="Attempts to return results of a shell command to a global variable '#global:cmdresults#'" name="Execute Shell Command - Get Results to Variable" continueOnFail="false" osType="Windows">
      <Parameter xsi:type="StringParameter" name="Parameter1" value="c:\kworking\PortQry.exe -n 10.4.1.16 -e 25 | find "220"" />
      <Parameter xsi:type="StringParameter" name="Parameter2" value="false" />
      <Parameter xsi:type="StringParameter" name="Parameter3" value="System" />
      </Statement>
    <Statement description="Creates a Windows event log entry" name="Create Event Log Entry" continueOnFail="false">
      <Parameter xsi:type="StringParameter" name="Parameter1" value="9999 - #global:cmdresults#" />
      <Parameter xsi:type="StringParameter" name="Parameter2" value="Information" />
      <Parameter xsi:type="StringParameter" name="Parameter3" value="Application" />
      </Statement>
      </Else>
      </If>
      </Body>
      </Procedure>