Skip to content

Commit

Permalink
[Tooling] Add gateway stake/unstake/ logs (#503)
Browse files Browse the repository at this point in the history
  • Loading branch information
red-0ne committed Apr 29, 2024
1 parent 192d3b1 commit d37577a
Show file tree
Hide file tree
Showing 3 changed files with 134 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ gateway3_stake: ## Stake gateway3

.PHONY: gateway_unstake
gateway_unstake: ## Unstake an gateway (must specify the GATEWAY env var)
poktrolld --home=$(POKTROLLD_HOME) tx gateway unstake-gateway --keyring-backend test --from $(GATEWAY) --node $(POCKET_NODE) --chain-id $(CHAIN_ID)
poktrolld --home=$(POKTROLLD_HOME) tx gateway unstake-gateway -y --keyring-backend test --from $(GATEWAY) --node $(POCKET_NODE) --chain-id $(CHAIN_ID)

.PHONY: gateway1_unstake
gateway1_unstake: ## Unstake gateway1
Expand Down Expand Up @@ -511,7 +511,7 @@ app3_stake: ## Stake app3

.PHONY: app_unstake
app_unstake: ## Unstake an application (must specify the APP env var)
poktrolld --home=$(POKTROLLD_HOME) tx application unstake-application --keyring-backend test --from $(APP) --node $(POCKET_NODE) --chain-id $(CHAIN_ID)
poktrolld --home=$(POKTROLLD_HOME) tx application unstake-application -y --keyring-backend test --from $(APP) --node $(POCKET_NODE) --chain-id $(CHAIN_ID)

.PHONY: app1_unstake
app1_unstake: ## Unstake app1
Expand Down
14 changes: 14 additions & 0 deletions localnet/grafana-dashboards/cometbft.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,20 @@
"type": "dashboards",
"url": ""
},
{
"asDropdown": false,
"icon": "external link",
"includeVars": false,
"keepTime": false,
"tags": [
"gateway_logs"
],
"targetBlank": false,
"title": "Gateway Logs",
"tooltip": "",
"type": "dashboards",
"url": ""
},
{
"asDropdown": false,
"icon": "external link",
Expand Down
118 changes: 118 additions & 0 deletions localnet/grafana-dashboards/gateway_logs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 30,
"links": [],
"panels": [
{
"datasource": {
"type": "loki",
"uid": "P8E80F9AEF21F6940"
},
"gridPos": {
"h": 10,
"w": 24,
"x": 0,
"y": 0
},
"id": 2,
"options": {
"dedupStrategy": "none",
"enableLogDetails": true,
"prettifyLogMessage": false,
"showCommonLabels": false,
"showLabels": false,
"showTime": false,
"sortOrder": "Descending",
"wrapLogMessage": false
},
"targets": [
{
"datasource": {
"type": "loki",
"uid": "P8E80F9AEF21F6940"
},
"editorMode": "builder",
"expr": "{container=\"poktrolld-validator\"} | json | method = `StakeGateway`",
"queryType": "range",
"refId": "Gateway Staking"
}
],
"title": "Gateway Staking",
"type": "logs"
},
{
"datasource": {
"type": "loki",
"uid": "P8E80F9AEF21F6940"
},
"gridPos": {
"h": 10,
"w": 24,
"x": 0,
"y": 10
},
"id": 1,
"options": {
"dedupStrategy": "none",
"enableLogDetails": true,
"prettifyLogMessage": false,
"showCommonLabels": false,
"showLabels": false,
"showTime": false,
"sortOrder": "Descending",
"wrapLogMessage": false
},
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "loki",
"uid": "P8E80F9AEF21F6940"
},
"editorMode": "code",
"expr": "{container=\"poktrolld-validator\"} | json | method = `UnstakeGateway`",
"queryType": "range",
"refId": "Gateway Unstaking"
}
],
"title": "Gateway Unstaking",
"type": "logs"
}
],
"refresh": "5s",
"schemaVersion": 39,
"tags": [
"gateway_logs"
],
"templating": {
"list": []
},
"time": {
"from": "now-1h",
"to": "now"
},
"timepicker": {},
"timezone": "browser",
"title": "Protocol / Gateway Logs",
"uid": "gateway_logs",
"version": 2,
"weekStart": ""
}

0 comments on commit d37577a

Please sign in to comment.