Add dashboard for graph-node subgraphs (#832)
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				Lint Checks / Run linter (push) Successful in 1m5s
				
			
		
			
				
	
				Publish / Build and publish (push) Successful in 2m27s
				
			
		
			
				
	
				Webapp Test / Run webapp test suite (push) Successful in 7m1s
				
			
		
			
				
	
				Smoke Test / Run basic test suite (push) Successful in 7m30s
				
			
		
			
				
	
				Deploy Test / Run deploy test suite (push) Successful in 9m23s
				
			
		
			
				
	
				Fixturenet-Laconicd-Test / Run Laconicd fixturenet and Laconic CLI tests (push) Successful in 24m12s
				
			
		
			
				
	
				Fixturenet-Eth-Plugeth-Test / Run an Ethereum plugeth fixturenet test (push) Failing after 51m33s
				
			
		
			
				
	
				K8s Deploy Test / Run deploy test suite on kind/k8s (push) Successful in 6m56s
				
			
		
			
				
	
				Fixturenet-Eth-Plugeth-Arm-Test / Run an Ethereum plugeth fixturenet test (push) Failing after 1h40m25s
				
			
		
			
				
	
				Database Test / Run database hosting test on kind/k8s (push) Successful in 9m3s
				
			
		
			
				
	
				Container Registry Test / Run contaier registry hosting test on kind/k8s (push) Successful in 4m4s
				
			
		
			
				
	
				External Stack Test / Run external stack test suite (push) Successful in 4m31s
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	Lint Checks / Run linter (push) Successful in 1m5s
				
			Publish / Build and publish (push) Successful in 2m27s
				
			Webapp Test / Run webapp test suite (push) Successful in 7m1s
				
			Smoke Test / Run basic test suite (push) Successful in 7m30s
				
			Deploy Test / Run deploy test suite (push) Successful in 9m23s
				
			Fixturenet-Laconicd-Test / Run Laconicd fixturenet and Laconic CLI tests (push) Successful in 24m12s
				
			Fixturenet-Eth-Plugeth-Test / Run an Ethereum plugeth fixturenet test (push) Failing after 51m33s
				
			K8s Deploy Test / Run deploy test suite on kind/k8s (push) Successful in 6m56s
				
			Fixturenet-Eth-Plugeth-Arm-Test / Run an Ethereum plugeth fixturenet test (push) Failing after 1h40m25s
				
			Database Test / Run database hosting test on kind/k8s (push) Successful in 9m3s
				
			Container Registry Test / Run contaier registry hosting test on kind/k8s (push) Successful in 4m4s
				
			External Stack Test / Run external stack test suite (push) Successful in 4m31s
				
			Part of [Deploy v2 and updated v3 sushiswap subgraphs](https://www.notion.so/Deploy-v2-and-updated-v3-sushiswap-subgraphs-e331945fdeea487c890706fc22c6cc94) - Add param `GRAPH_ETHEREUM_BLOCK_INGESTOR_MAX_CONCURRENT_JSON_RPC_CALLS_FOR_TXN_RECEIPTS` in graph-node stack - <https://github.com/graphprotocol/graph-node/blob/v0.31.0/docs/environment-variables.md#json-rpc-configuration-for-evm-chains> - Add dashboard for subgraphs deployment in graph-node - Show subgraph names in dashboard - Add watcher dashboard panel for showing watcher release version and commit hash Reviewed-on: #832 Co-authored-by: Nabarun <nabarun@deepstacksoft.com> Co-committed-by: Nabarun <nabarun@deepstacksoft.com>
This commit is contained in:
		
							parent
							
								
									ed8914b8d3
								
							
						
					
					
						commit
						a322d6eed4
					
				| @ -18,6 +18,8 @@ services: | |||||||
|       "/update-grafana-alerts-config.sh && /run.sh" |       "/update-grafana-alerts-config.sh && /run.sh" | ||||||
|     ports: |     ports: | ||||||
|       - "3000" |       - "3000" | ||||||
|  |     extra_hosts: | ||||||
|  |       - "host.docker.internal:host-gateway" | ||||||
|     healthcheck: |     healthcheck: | ||||||
|       test: ["CMD", "nc", "-vz", "localhost", "3000"] |       test: ["CMD", "nc", "-vz", "localhost", "3000"] | ||||||
|       interval: 30s |       interval: 30s | ||||||
|  | |||||||
| @ -22,6 +22,7 @@ services: | |||||||
|       GRAPH_ETHEREUM_JSON_RPC_TIMEOUT: ${GRAPH_ETHEREUM_JSON_RPC_TIMEOUT:-180} |       GRAPH_ETHEREUM_JSON_RPC_TIMEOUT: ${GRAPH_ETHEREUM_JSON_RPC_TIMEOUT:-180} | ||||||
|       GRAPH_ETHEREUM_REQUEST_RETRIES: ${GRAPH_ETHEREUM_REQUEST_RETRIES:-10} |       GRAPH_ETHEREUM_REQUEST_RETRIES: ${GRAPH_ETHEREUM_REQUEST_RETRIES:-10} | ||||||
|       GRAPH_ETHEREUM_MAX_BLOCK_RANGE_SIZE: ${GRAPH_ETHEREUM_MAX_BLOCK_RANGE_SIZE:-2000} |       GRAPH_ETHEREUM_MAX_BLOCK_RANGE_SIZE: ${GRAPH_ETHEREUM_MAX_BLOCK_RANGE_SIZE:-2000} | ||||||
|  |       GRAPH_ETHEREUM_BLOCK_INGESTOR_MAX_CONCURRENT_JSON_RPC_CALLS_FOR_TXN_RECEIPTS: ${GRAPH_ETHEREUM_BLOCK_INGESTOR_MAX_CONCURRENT_JSON_RPC_CALLS_FOR_TXN_RECEIPTS:-1000} | ||||||
|     entrypoint: ["bash", "-c"] |     entrypoint: ["bash", "-c"] | ||||||
|     # Wait for ETH RPC endpoint to be up when running with fixturenet-lotus |     # Wait for ETH RPC endpoint to be up when running with fixturenet-lotus | ||||||
|     command: | |     command: | | ||||||
| @ -31,6 +32,7 @@ services: | |||||||
|       - "8001" |       - "8001" | ||||||
|       - "8020" |       - "8020" | ||||||
|       - "8030" |       - "8030" | ||||||
|  |       - "8040" | ||||||
|     healthcheck: |     healthcheck: | ||||||
|       test: ["CMD", "nc", "-vz", "localhost", "8020"] |       test: ["CMD", "nc", "-vz", "localhost", "8020"] | ||||||
|       interval: 30s |       interval: 30s | ||||||
|  | |||||||
| @ -28,15 +28,37 @@ services: | |||||||
|     extra_hosts: |     extra_hosts: | ||||||
|       - "host.docker.internal:host-gateway" |       - "host.docker.internal:host-gateway" | ||||||
| 
 | 
 | ||||||
|   chain-head-exporter: |   ethereum-chain-head-exporter: | ||||||
|     image: cerc/watcher-ts:local |     image: cerc/watcher-ts:local | ||||||
|     restart: always |     restart: always | ||||||
|     working_dir: /app/packages/cli |     working_dir: /app/packages/cli | ||||||
|     environment: |     environment: | ||||||
|       ETH_RPC_ENDPOINT: ${CERC_ETH_RPC_ENDPOINT} |       ETH_RPC_ENDPOINT: ${CERC_ETH_RPC_ENDPOINT:-https://mainnet.infura.io/v3} | ||||||
|       FIL_RPC_ENDPOINT: ${CERC_FIL_RPC_ENDPOINT} |  | ||||||
|       ETH_RPC_API_KEY: ${CERC_INFURA_KEY} |       ETH_RPC_API_KEY: ${CERC_INFURA_KEY} | ||||||
|       PORT: ${CERC_METRICS_PORT} |     command: ["sh", "-c", "yarn export-metrics:chain-heads"] | ||||||
|  |     ports: | ||||||
|  |       - '5000' | ||||||
|  |     extra_hosts: | ||||||
|  |       - "host.docker.internal:host-gateway" | ||||||
|  | 
 | ||||||
|  |   filecoin-chain-head-exporter: | ||||||
|  |     image: cerc/watcher-ts:local | ||||||
|  |     restart: always | ||||||
|  |     working_dir: /app/packages/cli | ||||||
|  |     environment: | ||||||
|  |       ETH_RPC_ENDPOINT: ${CERC_FIL_RPC_ENDPOINT:-https://api.node.glif.io/rpc/v1} | ||||||
|  |     command: ["sh", "-c", "yarn export-metrics:chain-heads"] | ||||||
|  |     ports: | ||||||
|  |       - '5000' | ||||||
|  |     extra_hosts: | ||||||
|  |       - "host.docker.internal:host-gateway" | ||||||
|  | 
 | ||||||
|  |   graph-node-upstream-head-exporter: | ||||||
|  |     image: cerc/watcher-ts:local | ||||||
|  |     restart: always | ||||||
|  |     working_dir: /app/packages/cli | ||||||
|  |     environment: | ||||||
|  |       ETH_RPC_ENDPOINT: ${GRAPH_NODE_RPC_ENDPOINT} | ||||||
|     command: ["sh", "-c", "yarn export-metrics:chain-heads"] |     command: ["sh", "-c", "yarn export-metrics:chain-heads"] | ||||||
|     ports: |     ports: | ||||||
|       - '5000' |       - '5000' | ||||||
|  | |||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -57,6 +57,203 @@ | |||||||
|       }, |       }, | ||||||
|       "id": 29, |       "id": 29, | ||||||
|       "panels": [ |       "panels": [ | ||||||
|  |         { | ||||||
|  |           "datasource": { | ||||||
|  |             "type": "prometheus", | ||||||
|  |             "uid": "PBFA97CFB590B2093" | ||||||
|  |           }, | ||||||
|  |           "fieldConfig": { | ||||||
|  |             "defaults": { | ||||||
|  |               "color": { | ||||||
|  |                 "mode": "thresholds" | ||||||
|  |               }, | ||||||
|  |               "custom": { | ||||||
|  |                 "align": "auto", | ||||||
|  |                 "cellOptions": { | ||||||
|  |                   "type": "color-text" | ||||||
|  |                 }, | ||||||
|  |                 "inspect": false | ||||||
|  |               }, | ||||||
|  |               "mappings": [], | ||||||
|  |               "thresholds": { | ||||||
|  |                 "mode": "absolute", | ||||||
|  |                 "steps": [ | ||||||
|  |                   { | ||||||
|  |                     "color": "yellow", | ||||||
|  |                     "value": null | ||||||
|  |                   } | ||||||
|  |                 ] | ||||||
|  |               } | ||||||
|  |             }, | ||||||
|  |             "overrides": [] | ||||||
|  |           }, | ||||||
|  |           "gridPos": { | ||||||
|  |             "h": 3, | ||||||
|  |             "w": 12, | ||||||
|  |             "x": 0, | ||||||
|  |             "y": 1 | ||||||
|  |           }, | ||||||
|  |           "id": 34, | ||||||
|  |           "options": { | ||||||
|  |             "cellHeight": "sm", | ||||||
|  |             "footer": { | ||||||
|  |               "countRows": false, | ||||||
|  |               "enablePagination": false, | ||||||
|  |               "fields": "", | ||||||
|  |               "reducer": [ | ||||||
|  |                 "sum" | ||||||
|  |               ], | ||||||
|  |               "show": false | ||||||
|  |             }, | ||||||
|  |             "showHeader": true | ||||||
|  |           }, | ||||||
|  |           "pluginVersion": "10.2.3", | ||||||
|  |           "targets": [ | ||||||
|  |             { | ||||||
|  |               "datasource": { | ||||||
|  |                 "type": "prometheus", | ||||||
|  |                 "uid": "PBFA97CFB590B2093" | ||||||
|  |               }, | ||||||
|  |               "disableTextWrap": false, | ||||||
|  |               "editorMode": "code", | ||||||
|  |               "exemplar": false, | ||||||
|  |               "expr": "max(watcher_info{job=\"$job\", instance=\"$watcher\"}) by (version, commitHash)", | ||||||
|  |               "format": "table", | ||||||
|  |               "fullMetaSearch": false, | ||||||
|  |               "includeNullMetadata": true, | ||||||
|  |               "instant": true, | ||||||
|  |               "legendFormat": "", | ||||||
|  |               "range": false, | ||||||
|  |               "refId": "A", | ||||||
|  |               "useBackend": false | ||||||
|  |             } | ||||||
|  |           ], | ||||||
|  |           "transformations": [ | ||||||
|  |             { | ||||||
|  |               "id": "organize", | ||||||
|  |               "options": { | ||||||
|  |                 "excludeByName": { | ||||||
|  |                   "Time": true, | ||||||
|  |                   "Value": true | ||||||
|  |                 }, | ||||||
|  |                 "includeByName": {}, | ||||||
|  |                 "indexByName": { | ||||||
|  |                   "Time": 0, | ||||||
|  |                   "Value": 3, | ||||||
|  |                   "commitHash": 2, | ||||||
|  |                   "version": 1 | ||||||
|  |                 }, | ||||||
|  |                 "renameByName": { | ||||||
|  |                   "commitHash": "Commit hash", | ||||||
|  |                   "version": "Release" | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             } | ||||||
|  |           ], | ||||||
|  |           "type": "table" | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "datasource": { | ||||||
|  |             "type": "prometheus", | ||||||
|  |             "uid": "PBFA97CFB590B2093" | ||||||
|  |           }, | ||||||
|  |           "fieldConfig": { | ||||||
|  |             "defaults": { | ||||||
|  |               "color": { | ||||||
|  |                 "fixedColor": "semi-dark-green", | ||||||
|  |                 "mode": "thresholds" | ||||||
|  |               }, | ||||||
|  |               "custom": { | ||||||
|  |                 "axisBorderShow": false, | ||||||
|  |                 "axisCenteredZero": false, | ||||||
|  |                 "axisColorMode": "text", | ||||||
|  |                 "axisLabel": "", | ||||||
|  |                 "axisPlacement": "auto", | ||||||
|  |                 "barAlignment": 0, | ||||||
|  |                 "drawStyle": "line", | ||||||
|  |                 "fillOpacity": 0, | ||||||
|  |                 "gradientMode": "none", | ||||||
|  |                 "hideFrom": { | ||||||
|  |                   "legend": false, | ||||||
|  |                   "tooltip": false, | ||||||
|  |                   "viz": false | ||||||
|  |                 }, | ||||||
|  |                 "insertNulls": false, | ||||||
|  |                 "lineInterpolation": "linear", | ||||||
|  |                 "lineWidth": 1, | ||||||
|  |                 "pointSize": 5, | ||||||
|  |                 "scaleDistribution": { | ||||||
|  |                   "type": "linear" | ||||||
|  |                 }, | ||||||
|  |                 "showPoints": "auto", | ||||||
|  |                 "spanNulls": false, | ||||||
|  |                 "stacking": { | ||||||
|  |                   "group": "A", | ||||||
|  |                   "mode": "none" | ||||||
|  |                 }, | ||||||
|  |                 "thresholdsStyle": { | ||||||
|  |                   "mode": "off" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               "mappings": [], | ||||||
|  |               "thresholds": { | ||||||
|  |                 "mode": "absolute", | ||||||
|  |                 "steps": [ | ||||||
|  |                   { | ||||||
|  |                     "color": "semi-dark-green", | ||||||
|  |                     "value": null | ||||||
|  |                   }, | ||||||
|  |                   { | ||||||
|  |                     "color": "red", | ||||||
|  |                     "value": 35 | ||||||
|  |                   } | ||||||
|  |                 ] | ||||||
|  |               } | ||||||
|  |             }, | ||||||
|  |             "overrides": [] | ||||||
|  |           }, | ||||||
|  |           "gridPos": { | ||||||
|  |             "h": 7, | ||||||
|  |             "w": 12, | ||||||
|  |             "x": 12, | ||||||
|  |             "y": 1 | ||||||
|  |           }, | ||||||
|  |           "id": 3, | ||||||
|  |           "options": { | ||||||
|  |             "legend": { | ||||||
|  |               "calcs": [], | ||||||
|  |               "displayMode": "list", | ||||||
|  |               "placement": "bottom", | ||||||
|  |               "showLegend": true | ||||||
|  |             }, | ||||||
|  |             "tooltip": { | ||||||
|  |               "mode": "single", | ||||||
|  |               "sort": "none" | ||||||
|  |             } | ||||||
|  |           }, | ||||||
|  |           "pluginVersion": "10.2.2", | ||||||
|  |           "targets": [ | ||||||
|  |             { | ||||||
|  |               "datasource": { | ||||||
|  |                 "type": "prometheus", | ||||||
|  |                 "uid": "PBFA97CFB590B2093" | ||||||
|  |               }, | ||||||
|  |               "disableTextWrap": false, | ||||||
|  |               "editorMode": "builder", | ||||||
|  |               "exemplar": false, | ||||||
|  |               "expr": "last_block_process_duration_seconds{job=~\"$job\", instance=~\"$watcher\"}", | ||||||
|  |               "fullMetaSearch": false, | ||||||
|  |               "includeNullMetadata": true, | ||||||
|  |               "instant": false, | ||||||
|  |               "legendFormat": "{{__name__}}", | ||||||
|  |               "range": true, | ||||||
|  |               "refId": "A", | ||||||
|  |               "useBackend": false | ||||||
|  |             } | ||||||
|  |           ], | ||||||
|  |           "title": "Last block process duration (s)", | ||||||
|  |           "type": "timeseries" | ||||||
|  |         }, | ||||||
|         { |         { | ||||||
|           "datasource": { |           "datasource": { | ||||||
|             "type": "prometheus", |             "type": "prometheus", | ||||||
| @ -85,7 +282,7 @@ | |||||||
|             "h": 3, |             "h": 3, | ||||||
|             "w": 4, |             "w": 4, | ||||||
|             "x": 0, |             "x": 0, | ||||||
|             "y": 1 |             "y": 4 | ||||||
|           }, |           }, | ||||||
|           "id": 25, |           "id": 25, | ||||||
|           "options": { |           "options": { | ||||||
| @ -155,7 +352,7 @@ | |||||||
|             "h": 3, |             "h": 3, | ||||||
|             "w": 4, |             "w": 4, | ||||||
|             "x": 4, |             "x": 4, | ||||||
|             "y": 1 |             "y": 4 | ||||||
|           }, |           }, | ||||||
|           "id": 11, |           "id": 11, | ||||||
|           "options": { |           "options": { | ||||||
| @ -224,7 +421,7 @@ | |||||||
|             "h": 3, |             "h": 3, | ||||||
|             "w": 4, |             "w": 4, | ||||||
|             "x": 8, |             "x": 8, | ||||||
|             "y": 1 |             "y": 4 | ||||||
|           }, |           }, | ||||||
|           "id": 12, |           "id": 12, | ||||||
|           "options": { |           "options": { | ||||||
| @ -251,7 +448,7 @@ | |||||||
|               }, |               }, | ||||||
|               "disableTextWrap": false, |               "disableTextWrap": false, | ||||||
|               "editorMode": "builder", |               "editorMode": "builder", | ||||||
|               "expr": "latest_block_number{job=\"chain_heads\", chain=\"$target_chain\"}", |               "expr": "latest_block_number{job=\"chain_heads\", chain=\"$target_chain\", instance=\"external\", exported_chain=\"\"}", | ||||||
|               "fullMetaSearch": false, |               "fullMetaSearch": false, | ||||||
|               "includeNullMetadata": true, |               "includeNullMetadata": true, | ||||||
|               "instant": false, |               "instant": false, | ||||||
| @ -264,108 +461,6 @@ | |||||||
|           "title": "External head ($target_chain)", |           "title": "External head ($target_chain)", | ||||||
|           "type": "stat" |           "type": "stat" | ||||||
|         }, |         }, | ||||||
|         { |  | ||||||
|           "datasource": { |  | ||||||
|             "type": "prometheus", |  | ||||||
|             "uid": "PBFA97CFB590B2093" |  | ||||||
|           }, |  | ||||||
|           "fieldConfig": { |  | ||||||
|             "defaults": { |  | ||||||
|               "color": { |  | ||||||
|                 "fixedColor": "semi-dark-green", |  | ||||||
|                 "mode": "thresholds" |  | ||||||
|               }, |  | ||||||
|               "custom": { |  | ||||||
|                 "axisBorderShow": false, |  | ||||||
|                 "axisCenteredZero": false, |  | ||||||
|                 "axisColorMode": "text", |  | ||||||
|                 "axisLabel": "", |  | ||||||
|                 "axisPlacement": "auto", |  | ||||||
|                 "barAlignment": 0, |  | ||||||
|                 "drawStyle": "line", |  | ||||||
|                 "fillOpacity": 0, |  | ||||||
|                 "gradientMode": "none", |  | ||||||
|                 "hideFrom": { |  | ||||||
|                   "legend": false, |  | ||||||
|                   "tooltip": false, |  | ||||||
|                   "viz": false |  | ||||||
|                 }, |  | ||||||
|                 "insertNulls": false, |  | ||||||
|                 "lineInterpolation": "linear", |  | ||||||
|                 "lineWidth": 1, |  | ||||||
|                 "pointSize": 5, |  | ||||||
|                 "scaleDistribution": { |  | ||||||
|                   "type": "linear" |  | ||||||
|                 }, |  | ||||||
|                 "showPoints": "auto", |  | ||||||
|                 "spanNulls": false, |  | ||||||
|                 "stacking": { |  | ||||||
|                   "group": "A", |  | ||||||
|                   "mode": "none" |  | ||||||
|                 }, |  | ||||||
|                 "thresholdsStyle": { |  | ||||||
|                   "mode": "off" |  | ||||||
|                 } |  | ||||||
|               }, |  | ||||||
|               "mappings": [], |  | ||||||
|               "thresholds": { |  | ||||||
|                 "mode": "absolute", |  | ||||||
|                 "steps": [ |  | ||||||
|                   { |  | ||||||
|                     "color": "semi-dark-green", |  | ||||||
|                     "value": null |  | ||||||
|                   }, |  | ||||||
|                   { |  | ||||||
|                     "color": "red", |  | ||||||
|                     "value": 35 |  | ||||||
|                   } |  | ||||||
|                 ] |  | ||||||
|               } |  | ||||||
|             }, |  | ||||||
|             "overrides": [] |  | ||||||
|           }, |  | ||||||
|           "gridPos": { |  | ||||||
|             "h": 6, |  | ||||||
|             "w": 12, |  | ||||||
|             "x": 12, |  | ||||||
|             "y": 1 |  | ||||||
|           }, |  | ||||||
|           "id": 3, |  | ||||||
|           "options": { |  | ||||||
|             "legend": { |  | ||||||
|               "calcs": [], |  | ||||||
|               "displayMode": "list", |  | ||||||
|               "placement": "bottom", |  | ||||||
|               "showLegend": true |  | ||||||
|             }, |  | ||||||
|             "tooltip": { |  | ||||||
|               "mode": "single", |  | ||||||
|               "sort": "none" |  | ||||||
|             } |  | ||||||
|           }, |  | ||||||
|           "pluginVersion": "10.2.2", |  | ||||||
|           "targets": [ |  | ||||||
|             { |  | ||||||
|               "datasource": { |  | ||||||
|                 "type": "prometheus", |  | ||||||
|                 "uid": "PBFA97CFB590B2093" |  | ||||||
|               }, |  | ||||||
|               "disableTextWrap": false, |  | ||||||
|               "editorMode": "builder", |  | ||||||
|               "exemplar": false, |  | ||||||
|               "expr": "last_block_process_duration_seconds{job=~\"$job\", instance=~\"$watcher\"}", |  | ||||||
|               "fullMetaSearch": false, |  | ||||||
|               "includeNullMetadata": true, |  | ||||||
|               "instant": false, |  | ||||||
|               "legendFormat": "{{__name__}}", |  | ||||||
|               "range": true, |  | ||||||
|               "refId": "A", |  | ||||||
|               "useBackend": false |  | ||||||
|             } |  | ||||||
|           ], |  | ||||||
|           "title": "Last block process duration (s)", |  | ||||||
|           "type": "timeseries" |  | ||||||
|         }, |  | ||||||
|         { |         { | ||||||
|           "datasource": { |           "datasource": { | ||||||
|             "type": "prometheus", |             "type": "prometheus", | ||||||
| @ -420,7 +515,7 @@ | |||||||
|             "h": 2.5, |             "h": 2.5, | ||||||
|             "w": 4, |             "w": 4, | ||||||
|             "x": 0, |             "x": 0, | ||||||
|             "y": 4 |             "y": 7 | ||||||
|           }, |           }, | ||||||
|           "id": 20, |           "id": 20, | ||||||
|           "options": { |           "options": { | ||||||
| @ -497,7 +592,7 @@ | |||||||
|             "h": 2, |             "h": 2, | ||||||
|             "w": 4, |             "w": 4, | ||||||
|             "x": 4, |             "x": 4, | ||||||
|             "y": 4 |             "y": 7 | ||||||
|           }, |           }, | ||||||
|           "id": 22, |           "id": 22, | ||||||
|           "options": { |           "options": { | ||||||
| @ -608,7 +703,7 @@ | |||||||
|             "h": 2, |             "h": 2, | ||||||
|             "w": 4, |             "w": 4, | ||||||
|             "x": 8, |             "x": 8, | ||||||
|             "y": 4 |             "y": 7 | ||||||
|           }, |           }, | ||||||
|           "id": 24, |           "id": 24, | ||||||
|           "options": { |           "options": { | ||||||
| @ -638,7 +733,7 @@ | |||||||
|               }, |               }, | ||||||
|               "disableTextWrap": false, |               "disableTextWrap": false, | ||||||
|               "editorMode": "builder", |               "editorMode": "builder", | ||||||
|               "expr": "latest_block_number{job=\"chain_heads\", chain=\"$target_chain\"}", |               "expr": "latest_block_number{job=\"chain_heads\", chain=\"$target_chain\", instance=\"external\"}", | ||||||
|               "fullMetaSearch": false, |               "fullMetaSearch": false, | ||||||
|               "includeNullMetadata": true, |               "includeNullMetadata": true, | ||||||
|               "instant": false, |               "instant": false, | ||||||
| @ -682,6 +777,107 @@ | |||||||
|           ], |           ], | ||||||
|           "type": "stat" |           "type": "stat" | ||||||
|         }, |         }, | ||||||
|  |         { | ||||||
|  |           "datasource": { | ||||||
|  |             "type": "prometheus", | ||||||
|  |             "uid": "PBFA97CFB590B2093" | ||||||
|  |           }, | ||||||
|  |           "fieldConfig": { | ||||||
|  |             "defaults": { | ||||||
|  |               "color": { | ||||||
|  |                 "fixedColor": "orange", | ||||||
|  |                 "mode": "shades" | ||||||
|  |               }, | ||||||
|  |               "custom": { | ||||||
|  |                 "axisBorderShow": false, | ||||||
|  |                 "axisCenteredZero": false, | ||||||
|  |                 "axisColorMode": "text", | ||||||
|  |                 "axisLabel": "", | ||||||
|  |                 "axisPlacement": "auto", | ||||||
|  |                 "barAlignment": 0, | ||||||
|  |                 "drawStyle": "line", | ||||||
|  |                 "fillOpacity": 0, | ||||||
|  |                 "gradientMode": "none", | ||||||
|  |                 "hideFrom": { | ||||||
|  |                   "legend": false, | ||||||
|  |                   "tooltip": false, | ||||||
|  |                   "viz": false | ||||||
|  |                 }, | ||||||
|  |                 "insertNulls": false, | ||||||
|  |                 "lineInterpolation": "linear", | ||||||
|  |                 "lineWidth": 1, | ||||||
|  |                 "pointSize": 5, | ||||||
|  |                 "scaleDistribution": { | ||||||
|  |                   "type": "linear" | ||||||
|  |                 }, | ||||||
|  |                 "showPoints": "auto", | ||||||
|  |                 "spanNulls": false, | ||||||
|  |                 "stacking": { | ||||||
|  |                   "group": "A", | ||||||
|  |                   "mode": "none" | ||||||
|  |                 }, | ||||||
|  |                 "thresholdsStyle": { | ||||||
|  |                   "mode": "off" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               "mappings": [], | ||||||
|  |               "thresholds": { | ||||||
|  |                 "mode": "absolute", | ||||||
|  |                 "steps": [ | ||||||
|  |                   { | ||||||
|  |                     "color": "green", | ||||||
|  |                     "value": null | ||||||
|  |                   }, | ||||||
|  |                   { | ||||||
|  |                     "color": "red", | ||||||
|  |                     "value": 80 | ||||||
|  |                   } | ||||||
|  |                 ] | ||||||
|  |               } | ||||||
|  |             }, | ||||||
|  |             "overrides": [] | ||||||
|  |           }, | ||||||
|  |           "gridPos": { | ||||||
|  |             "h": 7, | ||||||
|  |             "w": 12, | ||||||
|  |             "x": 12, | ||||||
|  |             "y": 8 | ||||||
|  |           }, | ||||||
|  |           "id": 6, | ||||||
|  |           "options": { | ||||||
|  |             "legend": { | ||||||
|  |               "calcs": [], | ||||||
|  |               "displayMode": "list", | ||||||
|  |               "placement": "bottom", | ||||||
|  |               "showLegend": true | ||||||
|  |             }, | ||||||
|  |             "tooltip": { | ||||||
|  |               "mode": "single", | ||||||
|  |               "sort": "none" | ||||||
|  |             } | ||||||
|  |           }, | ||||||
|  |           "pluginVersion": "10.2.2", | ||||||
|  |           "targets": [ | ||||||
|  |             { | ||||||
|  |               "datasource": { | ||||||
|  |                 "type": "prometheus", | ||||||
|  |                 "uid": "PBFA97CFB590B2093" | ||||||
|  |               }, | ||||||
|  |               "disableTextWrap": false, | ||||||
|  |               "editorMode": "builder", | ||||||
|  |               "expr": "last_block_num_events_total{job=~\"$job\", instance=~\"$watcher\"}", | ||||||
|  |               "fullMetaSearch": false, | ||||||
|  |               "includeNullMetadata": true, | ||||||
|  |               "instant": false, | ||||||
|  |               "legendFormat": "{{__name__}}", | ||||||
|  |               "range": true, | ||||||
|  |               "refId": "A", | ||||||
|  |               "useBackend": false | ||||||
|  |             } | ||||||
|  |           ], | ||||||
|  |           "title": "Number of events in the last block", | ||||||
|  |           "type": "timeseries" | ||||||
|  |         }, | ||||||
|         { |         { | ||||||
|           "datasource": { |           "datasource": { | ||||||
|             "type": "prometheus", |             "type": "prometheus", | ||||||
| @ -711,7 +907,7 @@ | |||||||
|             "h": 3, |             "h": 3, | ||||||
|             "w": 8, |             "w": 8, | ||||||
|             "x": 4, |             "x": 4, | ||||||
|             "y": 6 |             "y": 9 | ||||||
|           }, |           }, | ||||||
|           "id": 13, |           "id": 13, | ||||||
|           "options": { |           "options": { | ||||||
| @ -836,7 +1032,7 @@ | |||||||
|             "h": 2.5, |             "h": 2.5, | ||||||
|             "w": 4, |             "w": 4, | ||||||
|             "x": 0, |             "x": 0, | ||||||
|             "y": 6.5 |             "y": 9.5 | ||||||
|           }, |           }, | ||||||
|           "id": 16, |           "id": 16, | ||||||
|           "options": { |           "options": { | ||||||
| @ -876,107 +1072,6 @@ | |||||||
|           "title": "Watcher sync mode", |           "title": "Watcher sync mode", | ||||||
|           "type": "stat" |           "type": "stat" | ||||||
|         }, |         }, | ||||||
|         { |  | ||||||
|           "datasource": { |  | ||||||
|             "type": "prometheus", |  | ||||||
|             "uid": "PBFA97CFB590B2093" |  | ||||||
|           }, |  | ||||||
|           "fieldConfig": { |  | ||||||
|             "defaults": { |  | ||||||
|               "color": { |  | ||||||
|                 "fixedColor": "orange", |  | ||||||
|                 "mode": "shades" |  | ||||||
|               }, |  | ||||||
|               "custom": { |  | ||||||
|                 "axisBorderShow": false, |  | ||||||
|                 "axisCenteredZero": false, |  | ||||||
|                 "axisColorMode": "text", |  | ||||||
|                 "axisLabel": "", |  | ||||||
|                 "axisPlacement": "auto", |  | ||||||
|                 "barAlignment": 0, |  | ||||||
|                 "drawStyle": "line", |  | ||||||
|                 "fillOpacity": 0, |  | ||||||
|                 "gradientMode": "none", |  | ||||||
|                 "hideFrom": { |  | ||||||
|                   "legend": false, |  | ||||||
|                   "tooltip": false, |  | ||||||
|                   "viz": false |  | ||||||
|                 }, |  | ||||||
|                 "insertNulls": false, |  | ||||||
|                 "lineInterpolation": "linear", |  | ||||||
|                 "lineWidth": 1, |  | ||||||
|                 "pointSize": 5, |  | ||||||
|                 "scaleDistribution": { |  | ||||||
|                   "type": "linear" |  | ||||||
|                 }, |  | ||||||
|                 "showPoints": "auto", |  | ||||||
|                 "spanNulls": false, |  | ||||||
|                 "stacking": { |  | ||||||
|                   "group": "A", |  | ||||||
|                   "mode": "none" |  | ||||||
|                 }, |  | ||||||
|                 "thresholdsStyle": { |  | ||||||
|                   "mode": "off" |  | ||||||
|                 } |  | ||||||
|               }, |  | ||||||
|               "mappings": [], |  | ||||||
|               "thresholds": { |  | ||||||
|                 "mode": "absolute", |  | ||||||
|                 "steps": [ |  | ||||||
|                   { |  | ||||||
|                     "color": "green", |  | ||||||
|                     "value": null |  | ||||||
|                   }, |  | ||||||
|                   { |  | ||||||
|                     "color": "red", |  | ||||||
|                     "value": 80 |  | ||||||
|                   } |  | ||||||
|                 ] |  | ||||||
|               } |  | ||||||
|             }, |  | ||||||
|             "overrides": [] |  | ||||||
|           }, |  | ||||||
|           "gridPos": { |  | ||||||
|             "h": 5, |  | ||||||
|             "w": 12, |  | ||||||
|             "x": 12, |  | ||||||
|             "y": 7 |  | ||||||
|           }, |  | ||||||
|           "id": 6, |  | ||||||
|           "options": { |  | ||||||
|             "legend": { |  | ||||||
|               "calcs": [], |  | ||||||
|               "displayMode": "list", |  | ||||||
|               "placement": "bottom", |  | ||||||
|               "showLegend": true |  | ||||||
|             }, |  | ||||||
|             "tooltip": { |  | ||||||
|               "mode": "single", |  | ||||||
|               "sort": "none" |  | ||||||
|             } |  | ||||||
|           }, |  | ||||||
|           "pluginVersion": "10.2.2", |  | ||||||
|           "targets": [ |  | ||||||
|             { |  | ||||||
|               "datasource": { |  | ||||||
|                 "type": "prometheus", |  | ||||||
|                 "uid": "PBFA97CFB590B2093" |  | ||||||
|               }, |  | ||||||
|               "disableTextWrap": false, |  | ||||||
|               "editorMode": "builder", |  | ||||||
|               "expr": "last_block_num_events_total{job=~\"$job\", instance=~\"$watcher\"}", |  | ||||||
|               "fullMetaSearch": false, |  | ||||||
|               "includeNullMetadata": true, |  | ||||||
|               "instant": false, |  | ||||||
|               "legendFormat": "{{__name__}}", |  | ||||||
|               "range": true, |  | ||||||
|               "refId": "A", |  | ||||||
|               "useBackend": false |  | ||||||
|             } |  | ||||||
|           ], |  | ||||||
|           "title": "Number of events in the last block", |  | ||||||
|           "type": "timeseries" |  | ||||||
|         }, |  | ||||||
|         { |         { | ||||||
|           "datasource": { |           "datasource": { | ||||||
|             "type": "prometheus", |             "type": "prometheus", | ||||||
| @ -1006,7 +1101,7 @@ | |||||||
|             "h": 3, |             "h": 3, | ||||||
|             "w": 6, |             "w": 6, | ||||||
|             "x": 0, |             "x": 0, | ||||||
|             "y": 9 |             "y": 12 | ||||||
|           }, |           }, | ||||||
|           "id": 7, |           "id": 7, | ||||||
|           "options": { |           "options": { | ||||||
| @ -1092,7 +1187,7 @@ | |||||||
|             "h": 3, |             "h": 3, | ||||||
|             "w": 6, |             "w": 6, | ||||||
|             "x": 6, |             "x": 6, | ||||||
|             "y": 9 |             "y": 12 | ||||||
|           }, |           }, | ||||||
|           "id": 4, |           "id": 4, | ||||||
|           "options": { |           "options": { | ||||||
| @ -1256,9 +1351,9 @@ | |||||||
|           }, |           }, | ||||||
|           "gridPos": { |           "gridPos": { | ||||||
|             "h": 6, |             "h": 6, | ||||||
|             "w": 12, |             "w": 8, | ||||||
|             "x": 0, |             "x": 0, | ||||||
|             "y": 12 |             "y": 15 | ||||||
|           }, |           }, | ||||||
|           "id": 33, |           "id": 33, | ||||||
|           "options": { |           "options": { | ||||||
| @ -1311,7 +1406,7 @@ | |||||||
|                 "uid": "PBFA97CFB590B2093" |                 "uid": "PBFA97CFB590B2093" | ||||||
|               }, |               }, | ||||||
|               "editorMode": "code", |               "editorMode": "code", | ||||||
|               "expr": "latest_block_number{job=\"chain_heads\", chain=\"$target_chain\"}", |               "expr": "latest_block_number{job=\"chain_heads\", chain=\"$target_chain\", instance=\"external\"}", | ||||||
|               "hide": false, |               "hide": false, | ||||||
|               "instant": false, |               "instant": false, | ||||||
|               "legendFormat": "{{__name__}}", |               "legendFormat": "{{__name__}}", | ||||||
| @ -1432,9 +1527,9 @@ | |||||||
|           }, |           }, | ||||||
|           "gridPos": { |           "gridPos": { | ||||||
|             "h": 6, |             "h": 6, | ||||||
|             "w": 6, |             "w": 8, | ||||||
|             "x": 12, |             "x": 8, | ||||||
|             "y": 12 |             "y": 15 | ||||||
|           }, |           }, | ||||||
|           "id": 5, |           "id": 5, | ||||||
|           "options": { |           "options": { | ||||||
| @ -1534,9 +1629,9 @@ | |||||||
|           }, |           }, | ||||||
|           "gridPos": { |           "gridPos": { | ||||||
|             "h": 6, |             "h": 6, | ||||||
|             "w": 6, |             "w": 8, | ||||||
|             "x": 18, |             "x": 16, | ||||||
|             "y": 12 |             "y": 15 | ||||||
|           }, |           }, | ||||||
|           "id": 15, |           "id": 15, | ||||||
|           "options": { |           "options": { | ||||||
| @ -1631,10 +1726,10 @@ | |||||||
|             "overrides": [] |             "overrides": [] | ||||||
|           }, |           }, | ||||||
|           "gridPos": { |           "gridPos": { | ||||||
|             "h": 7, |             "h": 6, | ||||||
|             "w": 12, |             "w": 12, | ||||||
|             "x": 0, |             "x": 0, | ||||||
|             "y": 18 |             "y": 21 | ||||||
|           }, |           }, | ||||||
|           "id": 28, |           "id": 28, | ||||||
|           "options": { |           "options": { | ||||||
| @ -1734,10 +1829,10 @@ | |||||||
|             "overrides": [] |             "overrides": [] | ||||||
|           }, |           }, | ||||||
|           "gridPos": { |           "gridPos": { | ||||||
|             "h": 7, |             "h": 6, | ||||||
|             "w": 12, |             "w": 12, | ||||||
|             "x": 12, |             "x": 12, | ||||||
|             "y": 18 |             "y": 21 | ||||||
|           }, |           }, | ||||||
|           "id": 26, |           "id": 26, | ||||||
|           "options": { |           "options": { | ||||||
| @ -1826,10 +1921,10 @@ | |||||||
|             "overrides": [] |             "overrides": [] | ||||||
|           }, |           }, | ||||||
|           "gridPos": { |           "gridPos": { | ||||||
|             "h": 7, |             "h": 6, | ||||||
|             "w": 12, |             "w": 12, | ||||||
|             "x": 0, |             "x": 0, | ||||||
|             "y": 25 |             "y": 27 | ||||||
|           }, |           }, | ||||||
|           "id": 30, |           "id": 30, | ||||||
|           "options": { |           "options": { | ||||||
| @ -1933,10 +2028,10 @@ | |||||||
|             ] |             ] | ||||||
|           }, |           }, | ||||||
|           "gridPos": { |           "gridPos": { | ||||||
|             "h": 7, |             "h": 6, | ||||||
|             "w": 12, |             "w": 12, | ||||||
|             "x": 12, |             "x": 12, | ||||||
|             "y": 25 |             "y": 27 | ||||||
|           }, |           }, | ||||||
|           "id": 32, |           "id": 32, | ||||||
|           "options": { |           "options": { | ||||||
| @ -2043,7 +2138,7 @@ | |||||||
|             "h": 5, |             "h": 5, | ||||||
|             "w": 8, |             "w": 8, | ||||||
|             "x": 0, |             "x": 0, | ||||||
|             "y": 32 |             "y": 33 | ||||||
|           }, |           }, | ||||||
|           "id": 18, |           "id": 18, | ||||||
|           "options": { |           "options": { | ||||||
| @ -2189,7 +2284,7 @@ | |||||||
|             "h": 5, |             "h": 5, | ||||||
|             "w": 8, |             "w": 8, | ||||||
|             "x": 8, |             "x": 8, | ||||||
|             "y": 32 |             "y": 33 | ||||||
|           }, |           }, | ||||||
|           "id": 17, |           "id": 17, | ||||||
|           "options": { |           "options": { | ||||||
| @ -2337,7 +2432,7 @@ | |||||||
|             "h": 5, |             "h": 5, | ||||||
|             "w": 8, |             "w": 8, | ||||||
|             "x": 16, |             "x": 16, | ||||||
|             "y": 32 |             "y": 33 | ||||||
|           }, |           }, | ||||||
|           "id": 19, |           "id": 19, | ||||||
|           "options": { |           "options": { | ||||||
| @ -2504,7 +2599,7 @@ | |||||||
|             "h": 6, |             "h": 6, | ||||||
|             "w": 8, |             "w": 8, | ||||||
|             "x": 0, |             "x": 0, | ||||||
|             "y": 37 |             "y": 38 | ||||||
|           }, |           }, | ||||||
|           "hide": true, |           "hide": true, | ||||||
|           "id": 8, |           "id": 8, | ||||||
| @ -2602,7 +2697,7 @@ | |||||||
|             "h": 6, |             "h": 6, | ||||||
|             "w": 8, |             "w": 8, | ||||||
|             "x": 8, |             "x": 8, | ||||||
|             "y": 37 |             "y": 38 | ||||||
|           }, |           }, | ||||||
|           "id": 9, |           "id": 9, | ||||||
|           "options": { |           "options": { | ||||||
| @ -2699,7 +2794,7 @@ | |||||||
|             "h": 6, |             "h": 6, | ||||||
|             "w": 8, |             "w": 8, | ||||||
|             "x": 16, |             "x": 16, | ||||||
|             "y": 37 |             "y": 38 | ||||||
|           }, |           }, | ||||||
|           "id": 10, |           "id": 10, | ||||||
|           "options": { |           "options": { | ||||||
|  | |||||||
| @ -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: 'password' | ||||||
| @ -45,7 +45,18 @@ scrape_configs: | |||||||
|     metrics_path: /metrics |     metrics_path: /metrics | ||||||
|     scheme: http |     scheme: http | ||||||
|     static_configs: |     static_configs: | ||||||
|       - targets: ['chain-head-exporter:5000'] |       - targets: ['ethereum-chain-head-exporter:5000'] | ||||||
|  |         labels: | ||||||
|  |           instance: 'external' | ||||||
|  |           chain: 'ethereum' | ||||||
|  |       - targets: ['filecoin-chain-head-exporter:5000'] | ||||||
|  |         labels: | ||||||
|  |           instance: 'external' | ||||||
|  |           chain: 'filecoin' | ||||||
|  |       - targets: ['graph-node-upstream-head-exporter:5000'] | ||||||
|  |         labels: | ||||||
|  |           instance: 'graph-node' | ||||||
|  |           chain: 'filecoin' | ||||||
| 
 | 
 | ||||||
|   - job_name: 'postgres' |   - job_name: 'postgres' | ||||||
|     scrape_interval: 30s |     scrape_interval: 30s | ||||||
| @ -74,3 +85,11 @@ scrape_configs: | |||||||
|       # - targets: ['example-host:1317'] |       # - targets: ['example-host:1317'] | ||||||
|     params: |     params: | ||||||
|       format: ['prometheus'] |       format: ['prometheus'] | ||||||
|  | 
 | ||||||
|  |   - job_name: graph-node | ||||||
|  |     metrics_path: /metrics | ||||||
|  |     scrape_interval: 30s | ||||||
|  |     scheme: http | ||||||
|  |     static_configs: | ||||||
|  |       # Add graph-node targets to be monitored below | ||||||
|  |       # - targets: ['graph-node:8040'] | ||||||
|  | |||||||
| @ -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 | ||||||
|  | |||||||
| @ -24,7 +24,7 @@ groups: | |||||||
|                 uid: PBFA97CFB590B2093 |                 uid: PBFA97CFB590B2093 | ||||||
|               disableTextWrap: false |               disableTextWrap: false | ||||||
|               editorMode: code |               editorMode: code | ||||||
|               expr: latest_block_number - on(chain) group_right sync_status_block_number{job="azimuth", instance="azimuth", kind="latest_indexed"} |               expr: latest_block_number{instance="external"} - on(chain) group_right sync_status_block_number{job="azimuth", instance="azimuth", kind="latest_indexed"} | ||||||
|               fullMetaSearch: false |               fullMetaSearch: false | ||||||
|               includeNullMetadata: true |               includeNullMetadata: true | ||||||
|               instant: true |               instant: true | ||||||
| @ -100,7 +100,7 @@ groups: | |||||||
|                 uid: PBFA97CFB590B2093 |                 uid: PBFA97CFB590B2093 | ||||||
|               disableTextWrap: false |               disableTextWrap: false | ||||||
|               editorMode: code |               editorMode: code | ||||||
|               expr: latest_block_number - on(chain) group_right sync_status_block_number{job="azimuth", instance="censures", kind="latest_indexed"} |               expr: latest_block_number{instance="external"} - on(chain) group_right sync_status_block_number{job="azimuth", instance="censures", kind="latest_indexed"} | ||||||
|               fullMetaSearch: false |               fullMetaSearch: false | ||||||
|               includeNullMetadata: true |               includeNullMetadata: true | ||||||
|               instant: true |               instant: true | ||||||
| @ -176,7 +176,7 @@ groups: | |||||||
|                 uid: PBFA97CFB590B2093 |                 uid: PBFA97CFB590B2093 | ||||||
|               disableTextWrap: false |               disableTextWrap: false | ||||||
|               editorMode: code |               editorMode: code | ||||||
|               expr: latest_block_number - on(chain) group_right sync_status_block_number{job="azimuth", instance="claims", kind="latest_indexed"} |               expr: latest_block_number{instance="external"} - on(chain) group_right sync_status_block_number{job="azimuth", instance="claims", kind="latest_indexed"} | ||||||
|               fullMetaSearch: false |               fullMetaSearch: false | ||||||
|               includeNullMetadata: true |               includeNullMetadata: true | ||||||
|               instant: true |               instant: true | ||||||
| @ -252,7 +252,7 @@ groups: | |||||||
|                 uid: PBFA97CFB590B2093 |                 uid: PBFA97CFB590B2093 | ||||||
|               disableTextWrap: false |               disableTextWrap: false | ||||||
|               editorMode: code |               editorMode: code | ||||||
|               expr: latest_block_number - on(chain) group_right sync_status_block_number{job="azimuth", instance="conditional_star_release", kind="latest_indexed"} |               expr: latest_block_number{instance="external"} - on(chain) group_right sync_status_block_number{job="azimuth", instance="conditional_star_release", kind="latest_indexed"} | ||||||
|               fullMetaSearch: false |               fullMetaSearch: false | ||||||
|               includeNullMetadata: true |               includeNullMetadata: true | ||||||
|               instant: true |               instant: true | ||||||
| @ -328,7 +328,7 @@ groups: | |||||||
|                 uid: PBFA97CFB590B2093 |                 uid: PBFA97CFB590B2093 | ||||||
|               disableTextWrap: false |               disableTextWrap: false | ||||||
|               editorMode: code |               editorMode: code | ||||||
|               expr: latest_block_number - on(chain) group_right sync_status_block_number{job="azimuth", instance="delegated_sending", kind="latest_indexed"} |               expr: latest_block_number{instance="external"} - on(chain) group_right sync_status_block_number{job="azimuth", instance="delegated_sending", kind="latest_indexed"} | ||||||
|               fullMetaSearch: false |               fullMetaSearch: false | ||||||
|               includeNullMetadata: true |               includeNullMetadata: true | ||||||
|               instant: true |               instant: true | ||||||
| @ -404,7 +404,7 @@ groups: | |||||||
|                 uid: PBFA97CFB590B2093 |                 uid: PBFA97CFB590B2093 | ||||||
|               disableTextWrap: false |               disableTextWrap: false | ||||||
|               editorMode: code |               editorMode: code | ||||||
|               expr: latest_block_number - on(chain) group_right sync_status_block_number{job="azimuth", instance="ecliptic", kind="latest_indexed"} |               expr: latest_block_number{instance="external"} - on(chain) group_right sync_status_block_number{job="azimuth", instance="ecliptic", kind="latest_indexed"} | ||||||
|               fullMetaSearch: false |               fullMetaSearch: false | ||||||
|               includeNullMetadata: true |               includeNullMetadata: true | ||||||
|               instant: true |               instant: true | ||||||
| @ -480,7 +480,7 @@ groups: | |||||||
|                 uid: PBFA97CFB590B2093 |                 uid: PBFA97CFB590B2093 | ||||||
|               disableTextWrap: false |               disableTextWrap: false | ||||||
|               editorMode: code |               editorMode: code | ||||||
|               expr: latest_block_number - on(chain) group_right sync_status_block_number{job="azimuth", instance="linear_star_release", kind="latest_indexed"} |               expr: latest_block_number{instance="external"} - on(chain) group_right sync_status_block_number{job="azimuth", instance="linear_star_release", kind="latest_indexed"} | ||||||
|               fullMetaSearch: false |               fullMetaSearch: false | ||||||
|               includeNullMetadata: true |               includeNullMetadata: true | ||||||
|               instant: true |               instant: true | ||||||
| @ -556,7 +556,7 @@ groups: | |||||||
|                 uid: PBFA97CFB590B2093 |                 uid: PBFA97CFB590B2093 | ||||||
|               disableTextWrap: false |               disableTextWrap: false | ||||||
|               editorMode: code |               editorMode: code | ||||||
|               expr: latest_block_number - on(chain) group_right sync_status_block_number{job="azimuth", instance="polls", kind="latest_indexed"} |               expr: latest_block_number{instance="external"} - on(chain) group_right sync_status_block_number{job="azimuth", instance="polls", kind="latest_indexed"} | ||||||
|               fullMetaSearch: false |               fullMetaSearch: false | ||||||
|               includeNullMetadata: true |               includeNullMetadata: true | ||||||
|               instant: true |               instant: true | ||||||
| @ -634,7 +634,7 @@ groups: | |||||||
|                 uid: PBFA97CFB590B2093 |                 uid: PBFA97CFB590B2093 | ||||||
|               disableTextWrap: false |               disableTextWrap: false | ||||||
|               editorMode: code |               editorMode: code | ||||||
|               expr: latest_block_number - on(chain) group_right sync_status_block_number{job="sushi", instance="sushiswap", kind="latest_indexed"} |               expr: latest_block_number{instance="external"} - on(chain) group_right sync_status_block_number{job="sushi", instance="sushiswap", kind="latest_indexed"} | ||||||
|               fullMetaSearch: false |               fullMetaSearch: false | ||||||
|               includeNullMetadata: true |               includeNullMetadata: true | ||||||
|               instant: true |               instant: true | ||||||
| @ -710,7 +710,7 @@ groups: | |||||||
|                 uid: PBFA97CFB590B2093 |                 uid: PBFA97CFB590B2093 | ||||||
|               disableTextWrap: false |               disableTextWrap: false | ||||||
|               editorMode: code |               editorMode: code | ||||||
|               expr: latest_block_number - on(chain) group_right sync_status_block_number{job="sushi", instance="merkl_sushiswap", kind="latest_indexed"} |               expr: latest_block_number{instance="external"} - on(chain) group_right sync_status_block_number{job="sushi", instance="merkl_sushiswap", kind="latest_indexed"} | ||||||
|               fullMetaSearch: false |               fullMetaSearch: false | ||||||
|               includeNullMetadata: true |               includeNullMetadata: true | ||||||
|               instant: true |               instant: true | ||||||
| @ -788,7 +788,7 @@ groups: | |||||||
|                 uid: PBFA97CFB590B2093 |                 uid: PBFA97CFB590B2093 | ||||||
|               disableTextWrap: false |               disableTextWrap: false | ||||||
|               editorMode: code |               editorMode: code | ||||||
|               expr: latest_block_number - on(chain) group_right sync_status_block_number{job="ajna", instance="ajna", kind="latest_indexed"} |               expr: latest_block_number{instance="external"} - on(chain) group_right sync_status_block_number{job="ajna", instance="ajna", kind="latest_indexed"} | ||||||
|               fullMetaSearch: false |               fullMetaSearch: false | ||||||
|               includeNullMetadata: true |               includeNullMetadata: true | ||||||
|               instant: true |               instant: true | ||||||
|  | |||||||
| @ -6,5 +6,10 @@ WORKDIR /app | |||||||
| 
 | 
 | ||||||
| COPY . . | COPY . . | ||||||
| 
 | 
 | ||||||
|  | # Get the latest Git commit hash and set in package.json | ||||||
|  | RUN COMMIT_HASH=$(git rev-parse HEAD) && \ | ||||||
|  |   jq --arg commitHash "$COMMIT_HASH" '.commitHash = $commitHash' package.json > tmp.json && \ | ||||||
|  |   mv tmp.json package.json | ||||||
|  | 
 | ||||||
| RUN echo "Installing dependencies and building ajna-watcher-ts" && \ | RUN echo "Installing dependencies and building ajna-watcher-ts" && \ | ||||||
|   yarn && yarn build |   yarn && yarn build | ||||||
|  | |||||||
| @ -1,11 +1,20 @@ | |||||||
| FROM node:18.16.0-alpine3.16 | FROM node:18.16.0-alpine3.16 | ||||||
| 
 | 
 | ||||||
| RUN apk --update --no-cache add git python3 alpine-sdk | RUN apk --update --no-cache add git python3 alpine-sdk jq | ||||||
| 
 | 
 | ||||||
| WORKDIR /app | WORKDIR /app | ||||||
| 
 | 
 | ||||||
| COPY . . | COPY . . | ||||||
| 
 | 
 | ||||||
|  | # Get the latest Git commit hash and set it in package.json of all watchers | ||||||
|  | RUN COMMIT_HASH=$(git rev-parse HEAD) && \ | ||||||
|  |     find . -name 'package.json' -exec sh -c ' \ | ||||||
|  |     for packageFile; do \ | ||||||
|  |         jq --arg commitHash "$0" ".commitHash = \$commitHash" "$packageFile" > "$packageFile.tmp" && \ | ||||||
|  |         mv "$packageFile.tmp" "$packageFile"; \ | ||||||
|  |     done \ | ||||||
|  |     ' "$COMMIT_HASH" {} \; | ||||||
|  | 
 | ||||||
| RUN echo "Building azimuth-watcher-ts" && \ | RUN echo "Building azimuth-watcher-ts" && \ | ||||||
|     yarn && yarn build |     yarn && yarn build | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -6,5 +6,10 @@ WORKDIR /app | |||||||
| 
 | 
 | ||||||
| COPY . . | COPY . . | ||||||
| 
 | 
 | ||||||
|  | # Get the latest Git commit hash and set in package.json | ||||||
|  | RUN COMMIT_HASH=$(git rev-parse HEAD) && \ | ||||||
|  |   jq --arg commitHash "$COMMIT_HASH" '.commitHash = $commitHash' package.json > tmp.json && \ | ||||||
|  |   mv tmp.json package.json | ||||||
|  | 
 | ||||||
| RUN echo "Installing dependencies and building merkl-sushiswap-v3-watcher-ts" && \ | RUN echo "Installing dependencies and building merkl-sushiswap-v3-watcher-ts" && \ | ||||||
|   yarn && yarn build |   yarn && yarn build | ||||||
|  | |||||||
| @ -6,5 +6,10 @@ WORKDIR /app | |||||||
| 
 | 
 | ||||||
| COPY . . | COPY . . | ||||||
| 
 | 
 | ||||||
|  | # Get the latest Git commit hash and set in package.json | ||||||
|  | RUN COMMIT_HASH=$(git rev-parse HEAD) && \ | ||||||
|  |   jq --arg commitHash "$COMMIT_HASH" '.commitHash = $commitHash' package.json > tmp.json && \ | ||||||
|  |   mv tmp.json package.json | ||||||
|  | 
 | ||||||
| RUN echo "Installing dependencies and building sushiswap-v3-watcher-ts" && \ | RUN echo "Installing dependencies and building sushiswap-v3-watcher-ts" && \ | ||||||
|   yarn && yarn build |   yarn && yarn build | ||||||
|  | |||||||
| @ -2,7 +2,7 @@ version: "1.0" | |||||||
| name: ajna | name: ajna | ||||||
| description: "Ajna watcher stack" | description: "Ajna watcher stack" | ||||||
| repos: | repos: | ||||||
|   - git.vdb.to/cerc-io/ajna-watcher-ts@v0.1.9 |   - git.vdb.to/cerc-io/ajna-watcher-ts@v0.1.11 | ||||||
| containers: | containers: | ||||||
|   - cerc/watcher-ajna |   - cerc/watcher-ajna | ||||||
| pods: | pods: | ||||||
|  | |||||||
| @ -1,7 +1,7 @@ | |||||||
| version: "1.0" | version: "1.0" | ||||||
| name: azimuth | name: azimuth | ||||||
| repos: | repos: | ||||||
|   - github.com/cerc-io/azimuth-watcher-ts@v0.1.4 |   - github.com/cerc-io/azimuth-watcher-ts@0.1.5 | ||||||
| containers: | containers: | ||||||
|   - cerc/watcher-azimuth |   - cerc/watcher-azimuth | ||||||
| pods: | pods: | ||||||
|  | |||||||
| @ -43,16 +43,18 @@ customized by editing the "spec" file generated by `laconic-so deploy init`. | |||||||
| ``` | ``` | ||||||
| $ cat graph-node-spec.yml | $ cat graph-node-spec.yml | ||||||
| stack: graph-node | stack: graph-node | ||||||
| ports: | network: | ||||||
|   graph-node: |   ports: | ||||||
|     - '8000:8000' |     graph-node: | ||||||
|     - '8001' |       - '8000:8000' | ||||||
|     - '8020:8020' |       - '8001' | ||||||
|     - '8030' |       - '8020:8020' | ||||||
|   ipfs: |       - '8030' | ||||||
|     - '8080' |       - '8040' | ||||||
|     - '4001' |     ipfs: | ||||||
|     - '5001:5001' |       - '8080' | ||||||
|  |       - '4001' | ||||||
|  |       - '5001:5001' | ||||||
| ... | ... | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| @ -64,7 +66,7 @@ laconic-so --stack graph-node deploy create --spec-file graph-node-spec.yml --de | |||||||
| 
 | 
 | ||||||
| ## Start the stack | ## Start the stack | ||||||
| 
 | 
 | ||||||
| Create an env file with the following values to be set before starting the stack: | Update `config.env` file inside deployment directory with the following values before starting the stack: | ||||||
| 
 | 
 | ||||||
| ```bash | ```bash | ||||||
| # Set ETH RPC endpoint the graph node will use | # Set ETH RPC endpoint the graph node will use | ||||||
| @ -88,10 +90,13 @@ export GRAPH_ETHEREUM_REQUEST_RETRIES= | |||||||
| # Maximum number of blocks to scan for triggers in each request (default: 2000) | # Maximum number of blocks to scan for triggers in each request (default: 2000) | ||||||
| export GRAPH_ETHEREUM_MAX_BLOCK_RANGE_SIZE= | export GRAPH_ETHEREUM_MAX_BLOCK_RANGE_SIZE= | ||||||
| 
 | 
 | ||||||
|  | # Maximum number of concurrent requests made against Ethereum for requesting transaction receipts during block ingestion (default: 1000) | ||||||
|  | export GRAPH_ETHEREUM_BLOCK_INGESTOR_MAX_CONCURRENT_JSON_RPC_CALLS_FOR_TXN_RECEIPTS= | ||||||
|  | 
 | ||||||
| # Ref: https://git.vdb.to/cerc-io/graph-node/src/branch/master/docs/environment-variables.md | # Ref: https://git.vdb.to/cerc-io/graph-node/src/branch/master/docs/environment-variables.md | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| Example env file: | Example `config.env` file: | ||||||
| 
 | 
 | ||||||
| ```bash | ```bash | ||||||
| export ETH_RPC_HOST=filecoin.chainup.net | export ETH_RPC_HOST=filecoin.chainup.net | ||||||
| @ -104,12 +109,6 @@ export GRAPH_ETHEREUM_REQUEST_RETRIES=5 | |||||||
| export GRAPH_ETHEREUM_MAX_BLOCK_RANGE_SIZE=50 | export GRAPH_ETHEREUM_MAX_BLOCK_RANGE_SIZE=50 | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| Set the environment variables: |  | ||||||
| 
 |  | ||||||
| ```bash |  | ||||||
| source <PATH_TO_ENV_FILE> |  | ||||||
| ``` |  | ||||||
| 
 |  | ||||||
| Deploy the stack: | Deploy the stack: | ||||||
| 
 | 
 | ||||||
| ```bash | ```bash | ||||||
|  | |||||||
| @ -3,7 +3,9 @@ name: graph-node | |||||||
| description: "Stack for running graph-node" | description: "Stack for running graph-node" | ||||||
| repos: | repos: | ||||||
|   - github.com/graphprotocol/graph-node |   - github.com/graphprotocol/graph-node | ||||||
|  |   - github.com/cerc-io/watcher-ts@v0.2.92 | ||||||
| containers: | containers: | ||||||
|   - cerc/graph-node |   - cerc/graph-node | ||||||
|  |   - cerc/watcher-ts | ||||||
| pods: | pods: | ||||||
|   - graph-node |   - graph-node | ||||||
|  | |||||||
| @ -2,7 +2,7 @@ version: "1.0" | |||||||
| name: merkl-sushiswap-v3 | name: merkl-sushiswap-v3 | ||||||
| description: "SushiSwap v3 watcher stack" | description: "SushiSwap v3 watcher stack" | ||||||
| repos: | repos: | ||||||
|   - github.com/cerc-io/merkl-sushiswap-v3-watcher-ts@v0.1.11 |   - github.com/cerc-io/merkl-sushiswap-v3-watcher-ts@v0.1.12 | ||||||
| containers: | containers: | ||||||
|   - cerc/watcher-merkl-sushiswap-v3 |   - cerc/watcher-merkl-sushiswap-v3 | ||||||
| pods: | pods: | ||||||
|  | |||||||
| @ -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`): | ||||||
| @ -156,6 +179,11 @@ Set the following env variables in the deployment env config file (`monitoring-d | |||||||
|   # Grafana server host URL (used in various links in alerts, etc.) |   # Grafana server host URL (used in various links in alerts, etc.) | ||||||
|   # (Optional, default: http://localhost:3000) |   # (Optional, default: http://localhost:3000) | ||||||
|   GF_SERVER_ROOT_URL= |   GF_SERVER_ROOT_URL= | ||||||
|  | 
 | ||||||
|  |    | ||||||
|  |   # RPC endpoint used by graph-node for upstream head metric | ||||||
|  |   # (Optional, default: https://mainnet.infura.io/v3) | ||||||
|  |   GRAPH_NODE_RPC_ENDPOINT= | ||||||
|   ``` |   ``` | ||||||
| 
 | 
 | ||||||
| ## Start the stack | ## Start the stack | ||||||
|  | |||||||
| @ -1,7 +1,7 @@ | |||||||
| version: "0.1" | version: "0.1" | ||||||
| name: monitoring | name: monitoring | ||||||
| repos: | repos: | ||||||
|   - github.com/cerc-io/watcher-ts@v0.2.81 |   - github.com/cerc-io/watcher-ts@v0.2.92 | ||||||
| containers: | containers: | ||||||
|   - cerc/watcher-ts |   - cerc/watcher-ts | ||||||
| pods: | pods: | ||||||
|  | |||||||
| @ -2,7 +2,7 @@ version: "1.0" | |||||||
| name: sushiswap-v3 | name: sushiswap-v3 | ||||||
| description: "SushiSwap v3 watcher stack" | description: "SushiSwap v3 watcher stack" | ||||||
| repos: | repos: | ||||||
|   - github.com/cerc-io/sushiswap-v3-watcher-ts@v0.1.11 |   - github.com/cerc-io/sushiswap-v3-watcher-ts@v0.1.12 | ||||||
| containers: | containers: | ||||||
|   - cerc/watcher-sushiswap-v3 |   - cerc/watcher-sushiswap-v3 | ||||||
| pods: | pods: | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user