Monitor custom metrics from HTTP endpoints via API
Collect data from devices, services, or other HTTP endpoints. You can define custom metrics, configure how data is polled, and store the results for analysis. SolarWinds Observability SaaS makes it easy to build API monitors from scratch or using pre-filled templates.
Observe monitored metrics
-
In SolarWinds Observability SaaS, click Infrastructure > Software and activate the API Monitor tab. The tab lists all available monitors, with details, such as the collected metric prefix, number of monitored metrics, type, and last update information. Here, you can also switch from List View to Gallery View.
-
Click the Metric Prefix or the vertical ellipses menu to open the Metrics Explorer displaying all metrics with the given prefix.
-
In the Metric Explorer, click a metric to display a graph showing polled values.
API monitors send requests from source IP addresses that are not static and can change at any moment. For the identification of HTTP requests coming from a SolarWinds Observability API Monitor, use headers. You can also configure authentication to increase security.
Create an API monitor
-
In SolarWinds Observability SaaS, click Infrastructure > Software and activate the API Monitor tab.
-
Click Create API Monitor.
-
Create from Scratch - choose the Create from Scratch option card to customize (automatically takes you to Step 3).
OR
-
Create using a Template - choose one of the vendor option cards to select a pre-filled template on the next screen.
-
On the Vendor screen, select the radio button for the template name you would like to configure. You can also search for specific templates in the search field.
-
Click Next to advance to Step 3.
-
-
-
On the Settings screen:
-
Provide a Name for the monitor. The name you enter, combined with the SolarWinds Observability prefix, is used for the metrics prefix collected by the API monitor currently being configured. You can use it to find your monitors in the Metrics Explorer. Templates have a default name that you can update.
-
(Optional) Add a description to explain the monitor's purpose. Templates will include a default description that you can also customize.
-
(Optional) Specify a custom polling interval.
By default, custom monitors are polled every two minutes. If you want to change the polling frequency, click Use Custom Polling Interval and specify the new polling interval.
-
Click Next.
-
-
If you are using a pre-filled Template, skip to Step 5. If you are creating a monitor from scratch, complete this step first.
On Cloud or On-prem, select the radio button for the location of the endpoint you will monitor -- either in the cloud or on-prem.
-
If you select Cloud, click Next to move on to Step 5 to create the request.
-
If you select On-prem, click Next to deploy a SolarWinds agent on the following screen(s).
-
On Assign Agent, create a new agent or use an existing agent.
Firewall settings: The agent must be able to reach the internet, primarily over TCP 80/443.
-
-
Create a new Agent: Select the first radio button, then click Next.
-
On Token, create or select an API ingestion token to use by doing either of the following:
-
Select Generate New Token and enter an Ingestion Token Name, and then click Next.
Or
-
Select Use Existing Token, and select an ingestion token from the list; click Next.
-
-
On Install Agent, follow the instructions to run the generated script as an admin on your target machine.
-
Once the script has been run, click Next to create your request in Step 5.
-
-
Use an existing Agent: Search for, then select the Agent from the list; click Next to create your request in Step 5.
-
-
On Create Request, specify the request you want to send to the URL.
-
Enter the Request URL, or instance where applicable.
-
Select the authentication type and enter required details.
No Authentication - default option
Basic Authentication
-
Select Existing to choose credentials from the drop-down list or leave New selected to specify a new set of credentials.
-
To create a new set, provide a name for the set, user name, and password. Click Save Credential. The new credentials set will be added to the list and selected.
Bearer Authentication
-
Select Existing to choose credentials from the drop-down list or leave New selected to specify a new set of credentials.
-
To create a new set, provide a name for the set and token. Click Save Credential. The new credentials set will be added to the list and selected.
API Key
-
Select Existing to choose credentials from the drop-down list or leave New selected to specify a new set of credentials.
-
To create a new set, provide a name for the set, Key, and Value. Click Save Credential. The new credentials set will be added to the list and selected.
OAuth 2.0
-
Select Existing to choose credentials from the drop-down list or leave New selected to specify a new set of credentials.
-
To create a new set, provide the following:
-
Credential name
-
Access Token URL (pre-filled with default)
-
URL Parameters - instance or tenant ID
-
Client ID
-
Client Secret
-
(Optional) Scope
-
(Optional) Advanced Options, including Client Authentication and Additional Parameters
-
-
Click Save Credential. The new credentials set will be added to the list and selected.
-
-
Specify headers for your request. Click Add Header and provide the Name and Value for the header. Repeat for all headers you want to include in the request.
Some headers, such as Host, Cookie, Content-Length, and User-Agent, might be restricted due to security concerns, internal use, or inapplicability.
-
Click Send Request. The response (headers and content) are displayed on the screen in the Response section.
-
In the Response section, select metrics to monitor.
-
Review the response. You can see a toggle next to items you can monitor.
-
Enable the toggle for a metric you want to monitor.
-
In the Configure Metric pop-up, enter a display name. Review the read-only box below to see the metric name. This is the name you will see in the Metrics Explorer.
If you use camel case or blanks in the display name, the metric name will be adjusted. Blanks are replaced with an underscore, uppercase letters are transformed to lowercase and are preceded with an underscore. For example, the display name
Rate LimitorRateLimitwill be reflected in the metric name asrate_limit. -
If the values returned will be in string format, such as
trueorfalse, use the Convert String to Numeric fields to add the string values and map them to numeric values. For example, map "OK" to 0, "Error" to 1, and all other values including null to -1. The strings are automatically replaced by and stored as the corresponding numbers. You can also use the numeric values in alert definitions. -
Click Save and complete the steps for all metrics to monitor.
-
-
When you have added all metrics you want to monitor, click Next.
-
-
(Optional) On Select Entity, you can link polled metrics to an already monitored entity.
-
Toggle on Link to an existing entity.
-
Select an entity type from the list.
-
Select the entity.
-
Click Next.
-
-
Review the Summary and click Save. You will return to the API Monitors tab where you can see your new monitor.
Edit API monitors
If you want to rename a monitor, change the URL, add or remove a metric it specifies, edit the monitor.
Changing the polling source from cloud to on-prem or vice versa for existing API monitors is not permitted.
In SolarWinds Observability SaaS, click Infrastructure > Software and activate the API Monitor tab.
-
Find the monitor to edit, click the vertical ellipsis at the end of its row and select Edit. This starts the API monitor wizard.
-
On Settings, you can:
-
Change the prefix used for polled metrics: Adjust the Name and check the change in the read-only field below.
Changing the name also changes the metric prefix. As a result, the data is polled from scratch and historical data is not linked to the metric anymore.
-
Change the polling frequency: Click the slider and fill in the required polling frequency.
-
-
On Create Request, you can make the following changes:
-
Change the request URL
-
Adjust the headers.
-
Add or remove monitored metrics: Click Send Request and use the sliders to adjust what is monitored.
-
-
On Select Entity, you can link to an existing entity.
-
Review the summary and complete the wizard.
Stop/re-start polling data for a monitor
If you want to temporarily stop polling metrics for a monitor, disable it.
-
In SolarWinds Observability SaaS, click Infrastructure > Software and activate the API Monitor tab.
-
Find the monitor to edit, click the vertical ellipsis at the end of its row and select Disable. Data for all metrics in the monitor will stop being polled. Check the monitor status on the API Monitor tab, it should be Disabled.
-
To start polling data for the monitor again, click the vertical ellipsis and select Enable.
Delete API monitors
If you want to remove an API monitor, delete it.
-
In SolarWinds Observability SaaS, click Infrastructure > Software and activate the API Monitor tab.
-
Find the monitor to delete, click the vertical ellipsis at the end of its row and select Delete.
The monitor is deleted and new data for the metric is not polled anymore. Historical data is still accessible, you can find it in the Metrics Explorer using the deleted metric name.