This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Windows Script Monitor - Dynamic Results

I am trying to build a script that will return a dynamic set of results.  The VBscript is going to go out to a database and retrieve SQL Agent names and run statuses.  The challenge is I won't always know the names of the Agent jobs as we have hundreds of SQL Agent Jobs on a single SQL instance.  Therefore they may change at times.  I would like to return a result set to Orion in the following format

Statistic.NameOfSQLJob: 1

Message.NameOfSQLJob: Success

Where "NameOfSQLJob" will be dynamic.

When I Execute my code without a result set defined I get the error: "Windows script execution error. Script output values are not defined or improperly defined." 

How do I return dynamic result sets?

  • You won't be able to use NameOfSQLJob dynamically like that in 4.2.  I've tried this before myself without success.  The best way to do this would be to replace NameOfSQLJob with a static value then have the Message field return the name of the SQL Job.  I'm not 100% if the database stores the messages though, but if it does you can create a custom report based on the message field.