Red Hat Training

A Red Hat training course is available for Red Hat Satellite

A.4.2. General::Remote Program with Data

The General::Remote Program with Data probe allows you to run any command or script on your system and obtain a value, as well as a status string. To use this probe, you must include XML code in the body of your script. This probe supports the following XML tags:
  • <perldata> </perldata>
  • <hash> </hash>
  • <item key =" "> </item>
The remote program will need to output some iteration of the following code to STDOUT:
<perldata> <hash> <item
key="data">10</item> <item
key="status_message">status message here</item>
</hash> </perldata>
The required value for data is the data point to be inserted in the database for time-series trending. The status_message is optional and can be whatever text string is desired with a maximum length of 1024 bytes. Remote programs that do not include a status_message still report the value and status returned.
Requirements - The Red Hat Network monitoring daemon (rhnmd) must be running on the monitored system to execute this probe. XML is case-sensitive. The data item key name cannot be changed and it must collect a number as its value.

Table A.10. General::Remote Program with Data settings

Field Value
OK Exit Status* 0
Warning Exit Status* 1
Critical Exit Status* 2
Timeout 15