Jump to content

Bill on First Instance of Monitor Restart Service, Ticket on Subsequent Runs

Recommended Posts

Hey all,

I'm trying to modify the Monitor Restart Service script so that it runs as normal on the first go around, but on subsequent successful restarts, it creates and leaves open a ticket without billing time. So far, I've set that up using a "Script Stats Save" function immediately after the START SERVICE note that increments the stat '@fieldname@RestartCount' for %computerid%, and an IF SQL Data Check function in the same section immediately before the IF SERVICE NOT RUNNING check that sets the ticket body text then goes to :SetScriptState. Where I'm stuck is figuring out how to clear the @fieldname@RestartCount stat. Assuming using a variable name to define that stat even works, which I'm not 100% on, how would I go about clearing all the stats corresponding to the different services on a daily basis? Is there a better way to accomplish what I'm looking to do that I'm overlooking?

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...