I propose adding native Git repository integration to the SolarWinds Server & Application Monitor (SAM) module to enable dynamic, version-controlled script execution. This feature would significantly improve maintainability, collaboration, and automation for teams using SAM for custom monitoring.
Proposed Functional Design
- Template Definition within SolarWinds
- Administrators create a SAM template as usual, but with an option to link the template to a Git repository (GitHub, GitLab, Azure DevOps, Bitbucket, or private Git server).
- OAuth2, PAT (Personal Access Token), or SSH key authentication should be supported.
- Add Git Repository as a Component Source
- In “Add Component Monitor,” provide an option:
Source Type → Script from Git Repository - Admin specifies:
- Git URL
- Branch
- Directory path
- Optional tag/commit pinning for deterministic execution
- Repository File Browser
- SolarWinds loads the selected repository tree via API and displays available files.
- Admin selects the exact script file to run (PS1, PY, SH, BAT, custom executables).
- Provide syntax highlighting and read-only preview inside the SAM UI.
- Local Caching and Execution
- The selected script is cloned or pulled into a secure local execution sandbox on the SolarWinds polling engine.
- Script execution follows existing SAM mechanisms (with elevated permissions settings preserved).
- SolarWinds stores a local cached copy to ensure execution continues even if Git is temporarily unreachable.
- Automated Sync (“Pull Interval”)
- Admin can define a custom pull interval (e.g., every 1 min, 5 min, hourly, daily).
- System checks for:
- New commits
- File updates
- Branch changes
- On change detection, SAM automatically updates the local cached script and logs version metadata.
- Version Metadata Tracking
- SolarWinds should record:
- Repo URL
- Branch
- File path
- Commit hash executed
- Display this in the component monitor history for full auditability.
- Rollback Capability (Optional)
- Allow admins to select and run a previous commit for testing or emergency fallback.
- Security Considerations
- Repository credentials stored using SolarWinds secure credential store.
- Execution sandbox isolates scripts per polling engine.
- Enable code-signing validation (optional policy).