Quantcast
Channel: THWACK: Message List
Viewing all articles
Browse latest Browse all 20019

Re: Help with powershell copy-item

$
0
0

To make Orion happy and able to parse statistic value from output, you have to follow some rules for text output from your script. Orion expects the Statistic/Message pairs text strings.


Scripts with Text Output

Scripts report additional details by sending text to the script’s standard output. SAM supports multiple values returned by a script using the following format. There is a limit of 10 Statistic and Message pairs for the script. These can be placed anywhere in the scriptoutput. The Statistic and Message names you give must contain valid letters and/or numbers.

Detail Type

Required

Meaning

Statistic

Yes

A numeric value used to determine how the monitor compares to its set thresholds. This must be an integer value, (negative numbers are supported).

Statistic.Name1: 123Statistic.Name2: 456

Message

No

An error or information message to be displayed in the monitor status details. Note: Multi-line messages are supported. To use this functionality, print each line using a separate command. For example:


Message.Name1: abc

Message.Name2: def

 

Your original script returned value in such way, that Orion was not able to recognize it:

2015-01-15 11_45_57-PS output bad.png

 

After my modfication it returned something, what Orion is able to process:

2015-01-15 11_47_24-ps correct output.png


Viewing all articles
Browse latest Browse all 20019

Trending Articles