Show subgraph names in dashboard
All checks were successful
Lint Checks / Run linter (pull_request) Successful in 45s
Webapp Test / Run webapp test suite (pull_request) Successful in 4m44s
Smoke Test / Run basic test suite (pull_request) Successful in 4m41s
Deploy Test / Run deploy test suite (pull_request) Successful in 5m37s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Successful in 9m10s
All checks were successful
Lint Checks / Run linter (pull_request) Successful in 45s
Webapp Test / Run webapp test suite (pull_request) Successful in 4m44s
Smoke Test / Run basic test suite (pull_request) Successful in 4m41s
Deploy Test / Run deploy test suite (pull_request) Successful in 5m37s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Successful in 9m10s
This commit is contained in:
parent
08c72a51fe
commit
83eeda2529
@ -743,25 +743,41 @@
|
|||||||
"list": [
|
"list": [
|
||||||
{
|
{
|
||||||
"current": {
|
"current": {
|
||||||
"selected": true,
|
"isNone": true,
|
||||||
"text": "QmZLNyJ1JmUXUrzvQKtsJSwLoFvE28rsWeb7dAVuZYVKY2",
|
"selected": false,
|
||||||
"value": "QmZLNyJ1JmUXUrzvQKtsJSwLoFvE28rsWeb7dAVuZYVKY2"
|
"value": ""
|
||||||
},
|
},
|
||||||
"datasource": {
|
"datasource": {
|
||||||
"type": "prometheus",
|
"type": "grafana-postgresql-datasource",
|
||||||
"uid": "PBFA97CFB590B2093"
|
"uid": "PA8D093265C513DCC"
|
||||||
},
|
},
|
||||||
"definition": "label_values(deployment_head,deployment)",
|
"definition": "SELECT name\nFROM subgraphs.subgraph\nWHERE current_version IS NOT NULL;",
|
||||||
|
"description": "Name of deployed subgraph",
|
||||||
"hide": 0,
|
"hide": 0,
|
||||||
"includeAll": false,
|
"includeAll": false,
|
||||||
|
"label": "Subgraph Name",
|
||||||
|
"multi": false,
|
||||||
|
"name": "subgraph_name",
|
||||||
|
"options": [],
|
||||||
|
"query": "SELECT name\nFROM subgraphs.subgraph\nWHERE current_version IS NOT NULL;",
|
||||||
|
"refresh": 1,
|
||||||
|
"regex": "",
|
||||||
|
"skipUrlSync": false,
|
||||||
|
"sort": 1,
|
||||||
|
"type": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {
|
||||||
|
"type": "grafana-postgresql-datasource",
|
||||||
|
"uid": "PA8D093265C513DCC"
|
||||||
|
},
|
||||||
|
"definition": "SELECT deployment\nFROM subgraphs.subgraph_version\n JOIN subgraphs.subgraph ON subgraph.current_version = subgraph_version.id\nWHERE subgraph.name = '$subgraph_name';",
|
||||||
|
"hide": 0,
|
||||||
|
"includeAll": false,
|
||||||
|
"label": "Subgraph Deployment",
|
||||||
"multi": false,
|
"multi": false,
|
||||||
"name": "subgraph_hash",
|
"name": "subgraph_hash",
|
||||||
"options": [],
|
"query": "SELECT deployment\nFROM subgraphs.subgraph_version\n JOIN subgraphs.subgraph ON subgraph.current_version = subgraph_version.id\nWHERE subgraph.name = '$subgraph_name';",
|
||||||
"query": {
|
|
||||||
"qryType": 1,
|
|
||||||
"query": "label_values(deployment_head,deployment)",
|
|
||||||
"refId": "PrometheusVariableQueryEditor-VariableQuery"
|
|
||||||
},
|
|
||||||
"refresh": 1,
|
"refresh": 1,
|
||||||
"regex": "",
|
"regex": "",
|
||||||
"skipUrlSync": false,
|
"skipUrlSync": false,
|
||||||
@ -778,6 +794,6 @@
|
|||||||
"timezone": "",
|
"timezone": "",
|
||||||
"title": "Graph Node Subgraphs",
|
"title": "Graph Node Subgraphs",
|
||||||
"uid": "b54352dd-35f6-4151-97dc-265bab0c67e9",
|
"uid": "b54352dd-35f6-4151-97dc-265bab0c67e9",
|
||||||
"version": 25,
|
"version": 6,
|
||||||
"weekStart": ""
|
"weekStart": ""
|
||||||
}
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: 1
|
||||||
|
|
||||||
|
datasources:
|
||||||
|
- name: Graph Node Postgres
|
||||||
|
type: postgres
|
||||||
|
jsonData:
|
||||||
|
database: graph-node
|
||||||
|
sslmode: 'disable'
|
||||||
|
maxOpenConns: 100
|
||||||
|
maxIdleConns: 100
|
||||||
|
maxIdleConnsAuto: true
|
||||||
|
connMaxLifetime: 14400
|
||||||
|
postgresVersion: 1411 # 903=9.3, 1000=10, 1411=14.11
|
||||||
|
timescaledb: false
|
||||||
|
user: graph-node
|
||||||
|
# # Add URL for graph-node database
|
||||||
|
# url: graph-node-db:5432
|
||||||
|
# # Set password for graph-node database
|
||||||
|
# secureJsonData:
|
||||||
|
# password: 'slLWVGMUfk5beLkLd8qAqEEUXpE5eRIO'
|
@ -4,4 +4,6 @@ echo Using CERC_GRAFANA_ALERTS_SUBGRAPH_IDS ${CERC_GRAFANA_ALERTS_SUBGRAPH_IDS}
|
|||||||
|
|
||||||
# Replace subgraph ids in subgraph alerting config
|
# Replace subgraph ids in subgraph alerting config
|
||||||
# Note: Requires the grafana container to be run with user root
|
# Note: Requires the grafana container to be run with user root
|
||||||
sed -i "s/REPLACE_WITH_SUBGRAPH_IDS/$CERC_GRAFANA_ALERTS_SUBGRAPH_IDS/g" /etc/grafana/provisioning/alerting/subgraph-alert-rules.yml
|
if [ -n "$CERC_GRAFANA_ALERTS_SUBGRAPH_IDS" ]; then
|
||||||
|
sed -i "s/REPLACE_WITH_SUBGRAPH_IDS/$CERC_GRAFANA_ALERTS_SUBGRAPH_IDS/g" /etc/grafana/provisioning/alerting/subgraph-alert-rules.yml
|
||||||
|
fi
|
||||||
|
@ -134,6 +134,29 @@ Note: Use `host.docker.internal` as host to access ports on the host machine
|
|||||||
|
|
||||||
Place the dashboard json files in grafana dashboards config directory (`monitoring-deployment/config/monitoring/grafana/dashboards`) in the deployment folder
|
Place the dashboard json files in grafana dashboards config directory (`monitoring-deployment/config/monitoring/grafana/dashboards`) in the deployment folder
|
||||||
|
|
||||||
|
#### Graph Node Config
|
||||||
|
|
||||||
|
For graph-node dashboard postgres datasource needs to be setup in `monitoring-deployment/config/monitoring/grafana/provisioning/datasources/graph-node-postgres.yml` (in deployment folder)
|
||||||
|
|
||||||
|
```yml
|
||||||
|
# graph-node-postgres.yml
|
||||||
|
...
|
||||||
|
datasources:
|
||||||
|
- name: Graph Node Postgres
|
||||||
|
type: postgres
|
||||||
|
jsonData:
|
||||||
|
# Set name to remote graph-node database name
|
||||||
|
database: graph-node
|
||||||
|
...
|
||||||
|
# Set user to remote graph-node database username
|
||||||
|
user: graph-node
|
||||||
|
# Add URL for remote graph-node database
|
||||||
|
url: graph-node-db:5432
|
||||||
|
# Set password for graph-node database
|
||||||
|
secureJsonData:
|
||||||
|
password: 'password'
|
||||||
|
```
|
||||||
|
|
||||||
### Env
|
### Env
|
||||||
|
|
||||||
Set the following env variables in the deployment env config file (`monitoring-deployment/config.env`):
|
Set the following env variables in the deployment env config file (`monitoring-deployment/config.env`):
|
||||||
|
Loading…
Reference in New Issue
Block a user