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.

SAM - Powershell Script Return Values

Hi Thwack Collective,

I am migrating a bunch of scripts that ran originally in HPOM, I have a set of scripts that doesn't return a numeric value but just a message.  What I am curious about is what do you guys do when for statistical values when you are only need the message to be returned?  I was originally using -1 for major script related failures(unhandled errors), 0 for good return , and 1 for bad return.  Unfortunately that doesn't look very good when we are trying to track the down status in a graph.

Additionally does any one attempt to use custom built modules in your scripts and how do you ensure they are on the servers you are monitoring?

Thanks in advanced.

  • If you return no number - eg script crash - the component will show grey unknown.

    As for scripts that return good/bad, true/false, decide what value is which - eg 0=bad 1=good then set the critical or warn status based on that value.

    This is done after testing the script, a few line down the screen you will now see all the values returned and they all have settings you can customise.