Overview

AllegroGraph provides server monitoring via a set of HTTP endpoints. The server exposes information about internal worker processes (backends and sessions), active queries (jobs), and storage reports for each triple store. Additionally, the server exposes a log of critical server events (audit log).

Prometheus metrics

AllegroGraph's main monitoring/observability endpoint is /metrics, which exposes various metrics in Prometheus format. This endpoint requires superuser permissions.

In order to reduce computational load on the system, the /metrics enpoints supports requesting metrics of a particular kind (category). Currently supported categories are:

New metrics kinds (categories) will be added in the future. Multiple kinds (categories) of metrics can be retrieved at once. For example the following call

curl -u test:xyzzy https://<ag-host>:<ag-port>/metrics?kind=queries 

will only return queries metrics, while the call

curl -u test:xyzzy https://<ag-host>:<ag-port>/metrics?kind=system&kind=indices&kind=queries 

will return system, indices and queries metrics in a single response.

Tokens obtained from external authenticators like OIDC or LDAP can be used to avoid putting user credentials into Prometheus config or scripts. The same example as above but with an external token:

curl -H 'Authorization: Basic <OIDC or LDAP token>' https://<ag-host>:<ag-port>/metrics?kind=queries  
curl -H 'Authorization: Bearer <OIDC token>' https://<ag-host>:<ag-port>/metrics?kind=queries 

All metrics follow Prometheus naming conventions and include labels for catalog and repository filtering where applicable. For example, indices metrics are reported for each repository, so the labels catalog and repository can be used to filter metrics for a particular repository.

List of exposed Prometheus metrics

The following is a list of all Prometheus-compatible metrics exposed by AllegroGraph, grouped by kind:

Example Grafana dashboard for AllegroGraph

An importable JSON description of an example Grafana dashboard for AllegroGraph can be found in the agraph-examples repository on GitHub here. Below are a couple of screenshots.

Grafana System Section

Grafana Server Section

Grafana Repository Section

The included Prometheus configuration that collects all the metrics of all supported kinds supported kinds every 5 seconds is shown below:

scrape_configs:  
  - job_name: allegrograph  
    scrape_interval: 5s  
    metrics_path: /metrics  
    basic_auth:  
      username: test  
      password: xyzzy  
    static_configs:  
      - targets: ['localhost:10035']  
        labels: { kind: 'jobs' }  
      - targets: ['localhost:10035']  
        labels: { kind: 'replication' }  
      - targets: ['localhost:10035']  
        labels: { kind: 'indices' }  
      - targets: ['localhost:10035']  
        labels: { kind: 'system' }  
      - targets: ['localhost:10035']  
        labels: { kind: 'queries' }  
    relabel_configs:  
      - source_labels: [kind]  
        target_label: __param_kind  

Standalone monitoring endpoints

AllegroGraph provides standalone endpoints for monitoring certain parts of the system. The most important of these is the Audit Log endpoint /auditLog, which is not available throught the Prometheus-compatible /metrics feature. To read more about the structured system audit log which tracks important changes to the server and its triple-stores please see Auditing.

Other standalone endpoints are legacy endpoints and are either already fully integrated into the Prometheus /metrics endpoint or will be in the future. These include:

Please contact Franz Support if you'd like to have a feature monitoring which is not described in the sections above.