Usage

Once the Management Pack is deployed and configured, you can start using it to execute scripts and monitor results.

Preparing Scripts

Scripts must be placed on the Agent worker node in the /opt/script-execution-agent/scripts directory.

Supported Output Formats

The Management Pack currently supports two specific output formats for metric parsing:

1. Nagios Format

Used for standard Nagios/Icinga plugins. The output should follow this structure:

STATUS_MESSAGE | metric_name=value;warning;critical;min;max

Example:

OK - Disk usage is 45% | disk_usage=45%;80;90;0;100

2. Prometheus Format

Used for scripts that export data in Prometheus exposition format. Example:

http_requests_total{method="post",code="200"} 1027
http_requests_total{method="post",code="400"} 3

Viewing Data in Aria Operations

Object Hierarchy

Data is organized into the following hierarchy in the Environment view:

  1. INDEVOPS for Script Control Center (Adapter Instance): The root node.
  2. Custom Script Execution: Represents your configured script (e.g., monitor_app.sh).
    • Property: status (The overall execution status of the task on the Agent).
  3. Script Endpoint: Created for each target defined in the configuration (e.g., 10.0.0.1, web-server-01).
    • Metric: status (Individual status for this endpoint).
    • Metric: metric_value (The numeric value parsed from the script).
    • Property: error (Contains stderr output if the script fails).

Metrics and Units

The Management Pack automatically maps script outputs to Aria Operations metrics. If the script provides units (e.g., %, ms, B), the MP attempts to map them to native Aria units.

All parsed metrics from the script's performance data are stored under the Script results instanced group for each Script Endpoint.

Dashboards and Alerts

Creating Dashboards

You can create custom dashboards to visualize your script data:

  1. Use the Scoreboard widget to show the latest status of multiple endpoints.
  2. Use the Trend or Line Chart widgets to track metric changes over time.
  3. Filter resources by Resource Kind: Script Endpoint.

Setting Up Alerts

Since script results are treated as standard metrics, you can create Symptom Definitions and Alert Definitions:

  • Example: Create a symptom when Script Endpoint > status is not equal to OK (or 0 for Nagios).
  • Example: Create a threshold alert when a custom metric (e.g., database_latency) exceeds a specific value.

Dynamic Placeholders

When configuring the Script Arguments, use ${TARGET_HOST}. The Management Pack will automatically replace this placeholder with the actual endpoint address for each execution.

Example Configuration:

  • Script Path: check_http.sh
  • Script Arguments: -U https://${TARGET_HOST}/health
  • Target Endpoints: app01.prod;app02.prod

This will result in two separate executions:

  1. check_http.sh -U https://app01.prod/health
  2. check_http.sh -U https://app02.prod/health