Kaseya Community

Assigning/de-assigning monitor set through script

  • Here's a scenario:
    Say you execute a command line tool that takes a while to complete. It can be a virus scan, a defrag, or something completely different. The problem here is that Kaseya does not know when the command line tool is complete, as it merrily goes on and finishes the rest of the steps in the script and exits.

    Now, here's the idea: What if we could assign a monitor set to the computer using the script, and then simply have a monitor set that watches the process. The monitor set would then "alert" once the process stopped, and another script could be run to handle whatever needed to be done (i.e. pick up a log file, de-assign the monitor set, reboot the computer, whatever).

    Is this just me being crazy, or does that sound like something people could use?

    Edit: Looks like I neet to eat my words, at least a little. The Kaseya agent will not continue until the program has ended, or the two hour limit has been reached. So, if the program does take less than 2 hours to complete, this would not be an issue. If it takes longer (defraging or virus scannling large disks on slow computers), it would be an issue.

    Legacy Forum Name: Assigning/de-assigning monitor set through script,
    Legacy Posted By Username: Lmhansen
  • It is pretty simple to schedule a script that runs a process and then schedule a second that checks for the presence of the process you are monitoring (you would select the "continue immediatly" option when initiating the process)... if it exists, it schedules again...

    if it doesn't exist... write an event log - which you will be alerting on.

    Legacy Forum Name: General Discussion,
    Legacy Posted By Username: mparr
  • Yeah, this is pretty much what I ended up doing ... The step after running the tool executes a script that checks if the process is running. If it is, it schedules itself (the script) to run again in 15 minutes. If the process is not running, then collect the log file.

    Legacy Forum Name: General Discussion,
    Legacy Posted By Username: Lmhansen