Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for Blazegraph supervision endpoints #5209

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"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"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
curl "http://localhost:8080/v1/supervision/blazegraph"
32 changes: 31 additions & 1 deletion docs/src/main/paradox/docs/delta/api/supervision-api.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Supervision

This endpoint returns information about the projections running on the current node.
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

Expand Down Expand Up @@ -53,3 +55,31 @@ Request

Response
: @@snip [project-heal.json](assets/supervision/project-heal.json)

## 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 @ref:[Blazegraph instance](../../getting-started/running-nexus/blazegraph.md).

```
GET /v1/supervision/blazegraph
```

Request
: @@snip [supervision-blazegraph.sh](assets/supervision/supervision-blazegraph.sh)

Response
: @@snip [supervision-blazegraph.json](assets/supervision/supervision-blazegraph.json)

## Composite views

This endpoint serves the same purpose but for common namespaces of composite views.

```
GET /v1/supervision/composite-views
```
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ It is likely to happen when reindexing after updating search but if it happens r
Blazegraph will use the available RAM in 2 ways, JVM heap and the file system cache
so like Elasticsearch, the JVM garbage collection frequency and duration are also important to monitor.

Using the supervision endpoints for @ref:[Blazegraph](../../delta/api/supervision-api.md#blazegraph)
and @ref:[composite views](../../delta/api/supervision-api.md#composite-views) and
the @link:[RAM guidance from Blazegraph](https://github.com/blazegraph/database/wiki/Hardware_Configuration#ram-sizing-guidance)
gives some insights on how much memory can be assigned.

**Storage:**

Blazegraph stores data in an append only journal which means updates will use additional disk space.
Expand All @@ -51,6 +56,11 @@ to reduce the disk usage, but it takes quite a bit a time and requires taking th
An alternative can be to reindex on a fresh instance of Blazegraph, this approach also allows to reconfigure the
underlying namespaces.

Using the supervision endpoints for @ref:[Blazegraph](../../delta/api/supervision-api.md#blazegraph)
and @ref:[composite views](../../delta/api/supervision-api.md#composite-views) and
the @link:[Data on disk guidance from Blazegraph](https://github.com/blazegraph/database/wiki/Hardware_Configuration#data-on-disk-sizing-guidance)
gives some insights on how much storage can be assigned.

**Query and indexing performance:**

Query load and latency must be monitored to make sure that information in a timely manner to the client.
Expand Down