Supervision
Those endpoints return information which helps to monitor and investigate problems in Nexus.
To access those endpoints, the supervision/read
permission must be granted at the root level.
Fetch projections
GET /v1/supervision/projections
Fetches the projections running on the current node.
Example
- Request
-
source
curl "http://localhost:8080/v1/supervision/projections"
- Response
-
source
{ "@context": "https://bluebrain.github.io/nexus/contexts/supervision.json", "projections": [ { "executionStrategy": "PersistentSingleNode", "metadata": { "module": "module", "name": "name", "project": "myorg/myproject" }, "progress": { "discarded": 1, "failed": 1, "instant": "1970-01-01T00:00:00Z", "offset": { "@type": "Start" }, "processed": 1 }, "restarts": 1, "status": "Running" }, { "executionStrategy": "TransientSingleNode", "metadata": { "module": "module", "name": "name", "project": "myorg/myproject" }, "progress": { "discarded": 1, "failed": 1, "instant": "1970-01-01T00:00:00Z", "offset": { "@type": "Start" }, "processed": 1 }, "restarts": 0, "status": "Running" } ] }
Projects health
GET /v1/supervision/projects
Indicates whether there are any unhealthy projects. A project is considered healthy if it has been correctly provisioned on creation.
Example
- Request
-
source
curl -X GET "http://localhost:8080/v1/supervision/projects"
- Response (healthy)
-
source
{ "status": "All projects are healthy." }
- Response (unhealthy)
-
source
{ "status": "Some projects are unhealthy.", "unhealthyProjects": [ "myorg/myproject" ] }
Project healing
POST /v1/supervision/projects/{orgLabel}/{projectLabel}/heal
Attempts to heal a project. This will attempt to run again the provisioning process for the project.
Example
- Request
-
source
curl -X POST "http://localhost:8080/v1/supervision/projects/myorg/myproject/heal"
- Response
-
source
{ "message": "Project 'myorg/myproject' has been healed." }
Blazegraph
This endpoint allows to return the total number of triples for all blazegraph views and the number of triples per individual view.
The unassigned part allows to spot orphan namespaces, that is to say namespaces which may not have been properly deleted when a view got modified or deprecated.
This is an indicator which helps to scale correctly the Blazegraph instance.
GET /v1/supervision/blazegraph
- Request
-
source
curl "http://localhost:8080/v1/supervision/blazegraph"
- Response
-
source
{ "assigned": [ { "count": 311, "project": "org/project1", "view": "https://bluebrain.github.io/nexus/vocabulary/defaultSparqlIndex" }, { "count": 940, "project": "org/project2", "view": "https://bluebrain.github.io/nexus/vocabulary/defaultSparqlIndex" } ], "total": 1251, "unassigned": [ { "count": 0, "namespace": "kb" } ] }
Composite views
This endpoint serves the same purpose but for common namespaces of composite views.
GET /v1/supervision/composite-views