SAM API Overview
This document describes the System Alerting and Monitoring (SAM) APIs, which provide access to SAM configuration settings and details. You may use these APIs to script the initial deployment of SAM.
If you prefer to configure SAM using its web-based user interface, see System Alerting and Monitoring Guide.
The SAM APIs support the standard HTTP request methods and return a JSON response. In a request, the endpoint is preceded by http://sam-domain-name:port, where sam-domain-name> is the DNS name or IP address of the host SAM is running on and port is its webserver port (8080 by default). Each API entry in this document includes an example request and response.
The following endpoints are available:
-
/api/sam for retrieving general SAM information.
-
/api/sam/admin/cluster for managing SAM clusters.
-
/api/sam/admin/target for managing InterSystems IRIS® data platform instances monitored by SAM.
-
/api/sam/admin/alertrule for viewing and changing cluster alert rules.
-
/api/sam/config/ for managing configuration settings.
In addition, every InterSystems IRIS instance includes an API that exposes metrics and alerts from that instance. For more information, see “Monitoring InterSystems IRIS Using REST APIOpens in a new tab” in the Monitoring Guide.
Get SAM Manager version | GET /api/sam/version |
Get information for all instances | GET /api/sam/target/state/ |
Get information for a specific instance | GET /api/sam/target/state/{id} |
Get alerts | GET /api/sam/alerts/ |
Create a new cluster | POST /api/sam/admin/cluster |
Get information for all clusters | GET /api/sam/admin/cluster/ |
Get information for a specific cluster | GET /api/sam/admin/cluster/{id} |
Update a cluster's information | PUT /api/sam/admin/cluster/{id} |
Delete a cluster from SAM | DELETE /api/sam/admin/cluster/{id} |
Add an instance to SAM | POST /api/sam/admin/target |
Get clusters of all instances | GET /api/sam/admin/target/ |
Get cluster of a specific instance | GET /api/sam/admin/target/{id} |
Update an instance’s information | PUT /api/sam/admin/target/{id} |
Delete an instance from SAM | DELETE /api/sam/admin/target/{id} |
Get alert rules for specific cluster | GET /api/sam/admin/alertrule/{clusterid}/ |
Replace alert rules for specific cluster | PUT /api/sam/admin/alertrule/{clusterid}/ |
Get a full backup of the SAM Manager system configuration as a JSON object | GET /api/sam/admin/config/backup/ |
Import a full SAM Manager system configuration from a JSON object, replacing the current configuration | PUT /api/sam/admin/config/backup/ |
Get the number of days that SAM stores metrics and alerts | GET /api/sam/admin/config/keepdays |
Set number of days for SAM to store metrics and alerts | PUT /api/sam/admin/config/keepdays |