Architecture

Version:

The 'VCF Script Control Center' solution consists of two main components working together to enable custom monitoring in VMware Aria Operations.

High-Level Components

1. Management Pack (Adapter)

The Management Pack is the component installed directly in VMware Aria Operations. Its primary responsibilities are:

  • Configuration Management: Providing a UI for administrators to define script paths, arguments, target endpoints, and execution intervals.
  • Execution Triggering: Sending periodic requests (during each collection cycle) to the Script Execution Agent to trigger script runs.
  • Data Ingestion: Receiving and parsing the results from the Agent, then mapping them to Aria Operations objects and metrics.
  • Object Modeling: Creating and managing the lifecycle of Custom Script Execution and Script Endpoint objects.

2. Script Execution Agent

The Script Execution Agent is a lightweight service that runs on a dedicated worker node — a Linux virtual machine or a Windows virtual machine — and provides:

  • REST API: A secure interface over HTTPS for the Management Pack to communicate with. Plain HTTP isn't supported.
  • Task Scheduler: A built-in engine that manages the execution of scripts, including queuing, concurrency control, and retention of historical results.
  • Script Engine: Executes scripts (Bash, Python, PowerShell, Nagios plugins, Prometheus exporters) located in a dedicated scripts directory. The directory location depends on the operating system of the worker node.
  • Parsers: Built-in support for parsing standard outputs such as Nagios plugins and Prometheus metrics.
  • Persistence: An internal SQLite database to track task statuses and results.

Communication Workflow

The interaction between components follows a structured flow during each Aria Operations collection cycle (typically every 5 minutes):

  1. Trigger: Aria Operations triggers the Adapter Instance collection.
  2. Request: The Adapter sends a POST /api/v1/execute request to the Agent's API. This request includes:
    • Script name and type (Nagios/Prometheus).
    • Arguments (including dynamic target endpoints).
    • Environment variables.
  3. Scheduling: The Agent schedules the task and immediately returns a Task ID to the Adapter.
  4. Polling/Results: The Adapter polls the Agent using GET /api/v1/scripts/result to fetch the execution outcome.
  5. Execution: Meanwhile, the Agent's scheduler runs the script on the worker node for each defined target endpoint.
  6. Data Processing: The Adapter receives the JSON response containing status, metrics, and properties for each endpoint.
  7. Ingestion: Metrics are saved in the Aria Operations database, where they become available for dashboards, alerts, and reports.

Logical Object Model

The Management Pack creates a hierarchical structure of objects in Aria Operations:

  • Adapter Instance: The root object representing the connection to a specific Agent.
  • Custom Script Execution: Represents a specific script configuration. It tracks the overall status of the execution.
  • Script Endpoint: Child objects created for each target endpoint defined in the configuration. These objects hold the actual metrics (e.g., metric_value, status, etc.) parsed from the script output.

The relationships built by the adapter are the following.

ParentChild
Script Adapter InstanceCustom Script Execution
Custom Script ExecutionScript Endpoint
Virtual MachineScript Execution Agent
Script Execution AgentIP Address
Virtual MachineIP Address

The Virtual Machine to Script Execution Agent relationship is external: it links the agent running on a virtual machine to the virtual machine object collected by vSphere, matched on the address of the agent. An agent that runs on a physical machine, or whose address matches no virtual machine, is collected without that link and does not raise an error.

Security

  • API Authentication: All communication from the Adapter to the Agent is protected by a mandatory API Token (shared secret).
  • TLS Encryption: The Agent serves HTTPS only, with a certificate configured in TLS_CERT_FILE and TLS_KEY_FILE. The Cloud Proxy validates it against the trust store or the CA certificate configured on the adapter instance.
  • Execution Sandboxing: Scripts run on a dedicated worker VM, isolating them from the Aria Operations core infrastructure.