Kaseya Community

Monitor Exchange connectivity

  • Looking to monitor Exchange so that I know if it is not sending or receiving emails. I used another system and I setup an email address that exchange would send and receive to and from every 15 mins and I would get an alert if exchange was not responding. Is there such an alert or procedure for Kaseya?

  • I'd be interested as well!

  • You could use a Kaseya procedure to telnet to the exchange server on port 25 and use the response to verify if it's up and responding.

  • calitech,

    Which system/website did you use previously for that monitoring exchange by sending emails? complaints/comments?? I've also been researching this lately

  • It was Zenith.

  • How'd you like using Zenith? Was it effective for monitoing an email server?

  • Hi calitech,

    Have a look a monitoring the "copy queue length" (i think that's the counter) to see how many messages are pending. Sorry to be vague i can't remember exactly what the counter is but it is something like that.

    If that number is high, (it all depends on the site) then mail might be stuck / failing.

    For a high volume site, more often then not it could be a false positive, but its better to know than not too. We set ours up to look for > 50  at any one time, send an alarm.

    Also, for really advanced monitor sets for exchange, get the I.T Services team at Kaseya to apply full monitoring to one test exchange box on your site, then look at copying / reproducing the event logs, that saved our bacon. I haven't created a Monitoring Set for 12 months now, and it cost about $40.00 a month for one server to monitor.

    Any questions don't hesitate to ask.

    Regards Mark.

  • Hey guys,

    I've tried monitoring the queue length but on occation the queue gets high and email is still up and in the case when email is down it could take a few hours till you notice it down.

    I've actually built a program for my own company that uses an email round trip to monitor our exchange servers. It sends an email every 5 min to a test mailbox which is automatically forwarded back to our system. If the response isnt received within a set timeframe we know the email is down. Been using it for a few months now and it works great.

    Right now this is only used privately but were working on releasing it to others. If you just want to monitor a single server it wont cost you a thing. Were happy to help out...

  • I'd recommend mx-toolbox.com it monitors mail delivery, blacklists and more.

  • Here's a suggestion I posted in another thread:

    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>

  • I guess this procedure would have to run a workstation thats online 24hrs. If the exchange server is completely down (offlline) will the procedure still run?

  • Hopefully, one would have other Kaseya alerts to let them know that the server is offline. If the server is completely down then SMTP isn't going to work and it won't really matter if that procedure runs or not...