Kaseya Community

Script to check if SAV service

  • Does anyone know how I can set an IF/THEN statement that will send an alert to the VSA console ?

    Legacy Forum Name: Script to check if SAV service,
    Legacy Posted By Username: shickey
  • Do you mean something like this? This checks to make sure rtvscan.exe is running..

    Script Name: Symantec Monitor (rtvscan.exe)
    Script Description:

    IF Application is Running
    Parameter 1 : rtvscan.exe
    THEN
    ELSE
    Execute Shell Command
    Parameter 1 : net start "Symantec Antivirus Server" >> c:\temp\sym.txt
    Parameter 2 : 1
    OS Type : 0
    Get Variable
    Parameter 1 : 1
    Parameter 2 : c:\temp\sym.txt
    Parameter 3 : sym
    OS Type : 0
    Write Script Log Entry
    Parameter 1 : Log: Attempting to restart the Symantec Antivirus Server (rtvscan.exe Symantec Antivirus Server). Results: #sym#.
    OS Type : 0
    Delete File - (Continue on Fail)
    Parameter 1 : c:\temp\sym.txt
    OS Type : 0


    Legacy Forum Name: Anti-Virus Scripts,
    Legacy Posted By Username: cberger
  • Sure looks like it. Will this send an alert to the VSA console ?




    Legacy Forum Name: Anti-Virus Scripts,
    Legacy Posted By Username: shickey
  • It won't be an official alert like under the Alerts tab, but with the small modification below it will email the alert with information to any mailbox, which could in turn be generated into an automatic service request.

    Script Name: Symantec Monitor (rtvscan.exe)
    Script Description:

    IF Application is Running
    Parameter 1 : rtvscan.exe
    THEN
    ELSE
    Execute Shell Command
    Parameter 1 : net start "Symantec Antivirus Server" >> c:\temp\sym.txt
    Parameter 2 : 1
    OS Type : 0
    Get Variable
    Parameter 1 : 1
    Parameter 2 : c:\temp\sym.txt
    Parameter 3 : sym
    OS Type : 0
    Get Variable
    Parameter 1 : 6
    Parameter 2 :
    Parameter 3 : machineID
    OS Type : 0
    Write Script Log Entry
    Parameter 1 : Log: Attempting to restart the Symantec Antivirus service (rtvscan.exe Symantec Antivirus Server). Results: #sym#.
    OS Type : 0
    Delete File - (Continue on Fail)
    Parameter 1 : c:\temp\sym.txt
    OS Type : 0
    Send Email
    Parameter 1 : helpdesk@company.com
    Parameter 2 : The Symantec Antivirus service is not functioning on #machineID#
    Parameter 3 : The Symantec Antivirus service is not functioning on #machineID#. There has been an attempt to restart the service. Results: #sym#.
    OS Type : 0


    Legacy Forum Name: Anti-Virus Scripts,
    Legacy Posted By Username: cberger