Create a Linux/Unix Script Monitor in SAM
This topic explains how to add a Linux/Unix Script Monitor to a SAM application monitor template to monitor target Linux/Unix systems by running command line scripts that return statistical data.
Review Linux/Unix Script Monitor for prerequisites and other details. For example, you may need to install additional Linux distribution libraries.
-
Click Settings > All Settings > SAM Settings and click Manage Templates.
The Manage Application Monitor Templates displays a list of available templates.
-
Search to locate, select, and edit an existing template or click Create New Template.
- Click Add Component Monitor(s) and choose Manually Add Component Monitors.
-
Search for Linux/Unix. When displayed, select the Linux/Unix Script Monitor and click add.
-
Select the Authentication Type and Credentials for Monitoring.
- Enter a Working Directory to process the script, such as
/tmp
. -
Enter a Command Line to run the script including all parameters using the format
<scripting language path> ${SCRIPT}
such asperl
,python
, orbash
.Depending on the type of script, the command line may require additional information and parameters. For example, the file path or hostname.
-
Click Edit Script to enter and test the script.
-
Test the script by selecting settings for the output, specified node, and specified credentials. Click Get Script Output.
Output results display using the script code with success or failure and any additional notes.
-
Click Get Script Output to generate the output and click Save.
The metrics save to outputs to configure as part of the component monitor. These outputs display at polling intervals for the template.
- When complete, click Submit to save the template.
When tested, output generates into customizable sections with unique IDs and display names that you can edit. For each output, you can optionally:
- Convert the value using selected formulas.
- Configure the statistic thresholds to refine alerting for the component monitor. Set the warning and critical thresholds with specific values or baseline data.
- Select a Status Roll-Up setting.
- Add notes to describe the script output.
Related topics include: