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

Re: Getting values from a remote host

$
0
0

This functionality is not provided natively out of the box but can be accomplished using PowerShell. The link below provides a working example of what this might look like. Note it will need to be adapted to support SAMs script output format, but otherwise it should get the job done. You may even be able to find someone in the Script Lab willing to help adapt the script to SAMs output format.

 

Scripts Must Report Status Through Exit Codes

Scripts must report their status by exiting with the appropriate exit code:

Exit Code

Meaning

0

Up

1

Down

2

Warning

3

Critical

Any other value

Unknown

 

Scripts with Text Output

Scripts report additional details by sending text to the script’s standard output.

In APM 4.0.2 and earlier, each line of output contained a single detail in the following format:

DetailType:Value

# Script output comment

Message: The directory contains too many files.

Statistic: 5

While this is still true, SAM now supports multiple values returned by a script using the following format.

Statistic.Name1: x
Message.Name1: abc

Statistic.Name2: y
Message.Name2: abc

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: 123

Statistic.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


 

Powershell port ping function | The Admin Guy's Blog


Viewing all articles
Browse latest Browse all 22513

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>