Kaseya Community

Exchange servers monitoring

This question has suggested answer(s)

Hi, 

Could someone help me.

I'm new in kaseya and would like to Configure monitoring of Exchange services.

Configure to send an alert if a critical service stops or is not running, and attempt to start it.

Please help as soon as possible

All Replies
  • Great question and I too am new with Kaseya.   I am looking at monitoring Exchange ans SQL

  • Procedure Kaseya Auto Services 2 (TESTED).xml

    I have figured out how to do that,

    You have to creat the procedure and apply it for all servers.

    The scripts will create another script on c:\Temp

    Just delete which services do not need and keep only exchange and SQL.

    Then create monitoring and import your scripts there.

    For me it works fine.



    [edited by: Hamchla at 11:32 AM (GMT -8) on Mar 7, 2013] v
  • let me know if it would work for you

    please see above the attachment

  • Not sure I understand your suggestion?

  • Sorry I did not see the attachment.  Now I need to be educated on this task.  Import a script to be run

    Thanks

  • @Hamchla if you have a KNM license, templates for Exchange 2003, 2007 and 2010 will be published next week.

  • does smebody has the KASM.vbs available in order to create those monitorset per machine ?

    thks very much.

  • Hi ..i get KSAM vbs from my old 5.1 server.

    **********************

    Script Name: KASM-Kaseya Auto Services Monitor Import Generator
    Script Description: Script Name: KASM-Kaseya Auto Services Monitor Import Generator Created By: Greg S. Sloan, PCM Networking Description: This script will query the Automatic Services on a computer and generate an XML output file which can be imported in to Kaseya as a monitor set. The script calls a VBS script (KASM.vbs) that requires the following arguments to be passed: KASM.VBS PathName MonitorSetName Example: cscript KASM.vbs c:\temp KASM-AcmeComputerCorp-Computer01 Output File would be: c:\temp\KASM-AcmeComputerCorp-Computer01.xml

    IF True
    THEN
    Get Variable
    Parameter 1 : 2
    Parameter 2 : c:\temp
    Parameter 3 : PathName
    OS Type : 0
    Get Variable
    Parameter 1 : 11
    Parameter 2 : vmachine/groupName
    Parameter 3 : GroupName
    OS Type : 0
    Get Variable
    Parameter 1 : 11
    Parameter 2 : vMachine/machName
    Parameter 3 : MachineName
    OS Type : 0
    Get Variable
    Parameter 1 : 2
    Parameter 2 : KASM-#GroupName#-#MachineName#
    Parameter 3 : MonitorSetName
    OS Type : 0
    Write File
    Parameter 1 : #PathName#\KASM.vbs
    Parameter 2 : VSASharedFiles\VBS Scripts\KASM.vbs
    OS Type : 0
    Execute Shell Command
    Parameter 1 : cscript #PathName#\KASM.vbs #PathName# #MonitorSetName#
    Parameter 2 : 0
    OS Type : 0
    Get File
    Parameter 1 : #PathName#\#MonitorSetName#.xml
    Parameter 2 : KASM\#MonitorSetName#.xml
    Parameter 3 : 3
    OS Type : 0
    Delete File
    Parameter 1 : #PathName#\\KASM.vbs
    OS Type : 0
    Delete File
    Parameter 1 : #PathName#\#MonitorSetName#.xml
    OS Type : 0
    ELSE

    ********************

    '----------------------------------------------------------------------------------------
    ' Script Name: KASM.vbs
    ' Created By: Greg S. Sloan
    ' PCM Networking (www.pcmnetworking.com)
    '
    '
    ' Description: This script is designed to run from Kaseya against a computer to obtain
    ' a list of Windows Services that are set to Automatically Start. It then creates
    ' a formated XML file for importing as a monitoring set in to Kaseya. After
    ' importing, this monitoring set can be assigned to the computer it was run against
    ' for monitoring all services that are set to automatically start.
    '
    '
    ' Arguments: KASM.VBS PathName MonitorSetName
    ' PathName - Then name of the path where to write the XML file.
    ' Example: c:\temp
    '
    ' MonitorSetName - The name of the monitor set to create. Do not supply an
    ' extension, an extension of .xml will be added automatically.
    ' Example: KASM-AcmeComputerCorp-Computer01
    '
    ' Output File - An output file will be generated in the PathName provided and
    ' named MonitorSetName.xml
    ' Example: c:\temp\KASM-AcmeComputerCorp-Computer01.xml
    '
    '
    ' Creation Date: 10/28/2007
    '
    ' Revision Date Description
    ' ------------- --------------- ---------------------------------------------------------
    ' A 10/28/2007 Initial Release
    ' B 10/28/2007 Clean & < > ' and " from objService.DisplayName for XML
    '
    '----------------------------------------------------------------------------------------
    '
    ' Create Constants and Variables
    Const Overwrite = True
    Const GeneralFailure = 2
    DQ = chr(34)
    SQ = chr(39)
    ZLS = ""
    RestartAttempts = 3
    RestartInterval = 60
    ReArm = 300

    ' Set Objects
    strComputer="."
    Set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    Set objServices = objWMI.ExecQuery ("SELECT * FROM Win32_Service WHERE StartMode = 'Auto'")
    Set objFSO = CreateObject("Scripting.FileSystemObject")

    ' Argument Passing Setup
    Set ArgObj = Wscript.Arguments

    ' Insure only two arguments are passed
    If ArgObj.Count <> 2 then
    Wscript.Echo "Argument Problem: 2 command arguments are required."
    Wscript.Quit(GeneralFailure)
    End If

    ' Assign File Paths and Names from Argument passed
    ResultPath = argObj(0)
    MonitorSetName = argObj(1)
    ResultFile = MonitorSetName & ".xml"
    ResultFullPath = ResultPath & "\" & ResultFile

    ' Open results output file, quit if error
    On Error Resume Next
    Set objResultFile = objFSO.CreateTextFile(ResultFullPath, Overwrite)
    If Err.Number <> 0 Then
    Wscript.Echo "Error Creating Results File " & ResultFullPath
    Wscript.Quit(Err.Number)
    End If
    On Error Goto 0

    ' Write output file
    objResultFile.WriteLine "<?xml version=" & DQ & "1.0" & DQ & _
    " encoding=" & DQ & _
    "ISO-8859-1" & DQ & " ?>"
    objResultFile.WriteLine "<monitor_set_definition version=" & DQ & "1.0" & DQ & ">"
    objResultFile.WriteLine "-<MonitorSet name=" & DQ & MonitorSetName & _
    " Services Monitor" & DQ & " description=" & SQ & _
    MonitorSetName & " Automatic Services Monitor" & SQ & ">"
    objResultFile.WriteLine "-<Counters>"
    objResultFile.WriteLine "</Counters>"
    objResultFile.WriteLine "-<Services>"

    ' Write XML format for each service on computer
    For Each objService In objServices
    ' Remove Double Quotes from the service's Path Name
    ServiceProgramPath = Replace(objService.PathName,DQ,ZLS)

    ' Clean & < > ' and " from objService.DisplayName for XML Output
    ServiceDescription = objService.DisplayName
    ServiceDescription = Replace(ServiceDescription, "&", "and")
    ServiceDescription = Replace(ServiceDescription, "<", "LT")
    ServiceDescription = Replace(ServiceDescription, ">", "GT")
    ServiceDescription = Replace(ServiceDescription, "'", "APOS")
    ServiceDescription = Replace(ServiceDescription, DQ, "DQ")

    ' Write output for each service
    objResultFile.WriteLine "<Service name=" & SQ & _
    objService.Name & SQ & " " & _
    "serviceDescription=" & SQ & _
    ServiceDescription & SQ & _
    " description=" & SQ & _
    ServiceDescription & " (Log On As: " & objService.StartName & ")" & _
    " (Executes: " & ServiceProgramPath & ")" & SQ & _
    " restartAttempts=" & SQ & RestartAttempts & SQ & _
    " restartInterval=" & SQ & RestartInterval & SQ & _
    " reArm=" & SQ & ReArm & SQ & "/>"
    Next

    ' Finish writing output file and close
    objResultFile.WriteLine "</Services>"
    objResultFile.WriteLine "-<Processes>"
    objResultFile.WriteLine "</Processes>"
    objResultFile.WriteLine "</MonitorSet>"
    objResultFile.WriteLine "</monitor_set_definition>"
    objResultFile.Close

  • ok great thks