View statistics

To view usage statistics using the metrics API as a data source, you can use a variety of third-party software that you can deploy inside or outside of your cluster.

For instance, you can use the Grafana app with the metrics API as source data and display results in a dashboard format.

Note:

Prior to ArcGIS Enterprise 11.2 on Kubernetes, Grafana was available directly from the ArcGIS Enterprise Administrator API but has since been removed. While it is no longer available directly from the software, you can still use Grafana with the metrics API by installing it separately.

Determine the URL pattern

To use the metrics API as a data source in your third-party app, you must register its URL with the app.

Note:

When registering the API as a data-source, ensure that its URL represents whether it can be accessed internally or externally to the cluster.

Note:

Use the URL pattern that matches your deployment.

  • External service URL (used when accessing he API inside or outside of the cluster): https://<FQDN>/<context>/prometheus
  • Internal service URL (used when accessing the API from within the same cluster): http://arcgis-rest-metrics-api.<deploymentNamespace>.svc.cluster.local:8443/arcgis/prometheus

Add Prometheus as the data source

To use the metrics API in your app, you must select Prometheus as the type of data source.

The following steps are an example of this process when using Grafana; however, other applications will use similar steps.

  1. From the Grafana UI, open the Configuration menu.
  2. Click Data Sources.
  3. Click Add data source.
  4. Select Prometheus as the type.
  5. Set server URL as the as the appropriate Prometheus server URL.

    • External service URL (used when accessing the API inside or outside of the cluster): https://<FQDN>/<context>/prometheus
    • Internal service URL (used when accessing the API from within the same cluster): http://arcgis-rest-metrics-api.<deploymentNamespace>.svc.cluster.local:8443/arcgis/prometheus

  6. Set Access as Browser.
  7. Enable Basic Auth and enter the credentials you specified when accessing the metrics API.
  8. Click Save and Test to save the new data source.

Example dashboard templates

Once you have registered the metrics API and set Prometheus as the source, you can start visualizing your organization's service data. To get started, several sample Grafana dashboard templates are available in the ArcGIS Enterprise on Kubernetes repository. You can import these dashboards by uploading a JSON of the template or by pasting the JSON text directly. Follow the steps below to import these example Grafana dashboards.

  1. In Grafana, click Dashboards.
  2. Click New.
  3. Select Import on the drop-down menu.
  4. Perform one of the following steps:
    • Upload a dashboard .json file from the template.
    • Paste the dashboard .json text directly into the text area copied from the template.
  5. Note:
    The import process allows you to change the name of the dashboard, pick the data source you want the dashboard to use, and specify any metric prefixes the dashboard uses.