Kaseya Community

Write to Event log on local Computer

  • I want to write the content of text file after a virus scan or spy scan, I am doing this with the write log to kaseya but that does show up in executive report. How can do this or ad this to my executive report


    So that when I run executive report it shows threats and virus clean or avoided

    Oh any suggestion on how to do this

    Is there a script to read text file and then write to the local event viewer





    Legacy Forum Name: Write to Event log on local Computer,
    Legacy Posted By Username: windows2k3pro
  • This can be done very easily.. However to make it where you dont have tons of eroneous data, you have to do a little grepping of files to extract what you want and place it in a TXT file that Kaseya reads and places in the script log.. Then from here you run a report and look for certain key words in the script log..

    God Bless,

    Marty


    Legacy Forum Name: System Administration Scripts,
    Legacy Posted By Username: MissingLink
  • Logevent.zip
    Here is a script that will check that a log file contains a certain string, and if it does, then copy the entire log to the Event Log. Note that the log needs to be small enough to fit into the Event Log. As MissingLink has pointed out, you want want to use some commands to strip down the file before uploading it.

    This script uses an executable program that will need to be uploaded to your shared files area and the file selected in the script.

    You will need to change the LOGFILE.TXT entry in the script tothename and path of the log file that you want to pick up, and change the command line options for the log making program to put the type of event you want into the Event Log.


    Legacy Forum Name: System Administration Scripts,
    Legacy Posted By Username: raybarber
  • Ray,

    Which event log doeslogevent.exe write to (App, Sys, Sec)?

    Is it possible to write directly to the Kaseya Script Log from within a VBscript? I've noticed that the Executive Report will only pick up one occurance of a string per record (it doesn't count multiple occurances within the record), which when you write out a log file, it only creates one record within the script log. It would be nice to be able to write out "virus found" for the #instances that a virus was found so that the Executive Report could show the actual # virus found.

    Thanks!


    Legacy Forum Name: System Administration Scripts,
    Legacy Posted By Username: billmccl
  • XP/2003/VISTA have a utility built in called 'eventcreate' which does the same thing that the one below does.


    Legacy Forum Name: System Administration Scripts,
    Legacy Posted By Username: rumptis
  • I use eventcreate (XP/2003/Vista) and logevent (2000) for some of my scripts. Just thought I'd note something here for anyone else.

    Eventcreate is not installed on Windows XP Home systems. However, you can copy from a Window XP Pro system.


    Legacy Forum Name: System Administration Scripts,
    Legacy Posted By Username: connectex
  • Hi all,
    My company purchased Kaseya a couple weeks ago (yes, I'm a noob). I know vbscript very well and I'm still wrapping my brain around the Kaseya auotmation and reporting. I am trying to figure out the best way to incorporate spyware/virus detection into the Executive Report. I need a "counter" that can report each spyware/virus cleaned/detected included in the Executive Report. I am trying to avoid Kaseya server-side scripts toparse logs, uploaded from agents, to create "Threats Found" and "ThreatsCleaned" portion of the Executive Reports.

    Is there no way for vbscript to programatically create a Kaseya script log?

    The only way I can think of returning information to the Kaseya server from a vbscript is to create a MS event log for each "Threat" foundand setup a Montor Set to log them and then create the Executive Report to count each log entry. This theory would work but would flood the Alarms witha huge amount of successful cleaning of Spyware/Viruses.

    I think Monitor Sets should allow the unchecking of"Create Alarm". I also think there should be a way for vbscript, running on a computer with an Kaseya agent, to create script logs.

    I'm a Kaseya noob but maybe someone out there has a solution I haven't thought of. I'm on the verge of calling Kaseya so if you can point me in the right direction......


    Legacy Forum Name: System Administration Scripts,
    Legacy Posted By Username: timsnyder
  • I've argued with Kaseya many times about the inability to clear an alarm and/or the ability to NOT trigger an alarm when an event happens. For instance, some things may happen where I want an e-mail sent to me but I do NOT want to have a permanent alarm in the system that I have to later clear manually.

    But something you CAN do is if the virus detection can create an event log entry in the machine, then you can have it alert on that. You can then include that alert in the executive summary counter. But of course, you're still going to have all those alerts that you'd have to clear manaully.




    Legacy Forum Name: System Administration Scripts,
    Legacy Posted By Username: warever
  • Thanks for the quick response.

    I've found that if manyevent logs of the same type occurr one after the other then only one Alarm is generated stating "this event occurred X amount of times". This makes it impossible to use the alarm as the counter.

    Hmm, maybe if I change the event log description text for each new event log thenit will generate seperate alarms. Testing.....


    Legacy Forum Name: System Administration Scripts,
    Legacy Posted By Username: timsnyder
  • That worked. As long as the event log description text is different, a seperate alarm is generated.

    This is going to flood the alarm window with useless data but I guess it's the only way to get a "# of Threats Found" and "# of Threats Cleaned" portion of the Executive Report.


    Legacy Forum Name: System Administration Scripts,
    Legacy Posted By Username: timsnyder