From 4a6dbf7eb68ad45e40cd391aeefcd974168a93f1 Mon Sep 17 00:00:00 2001 From: Artur Reznikov Date: Fri, 21 Jun 2024 13:04:35 -0700 Subject: [PATCH 01/30] added aws host create example --- examples/aws.go | 54 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 examples/aws.go diff --git a/examples/aws.go b/examples/aws.go new file mode 100644 index 0000000..c024903 --- /dev/null +++ b/examples/aws.go @@ -0,0 +1,54 @@ +// Copyright (C) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +package main + +import ( + "context" + "fmt" + "time" + + "github.com/ava-labs/avalanche-tooling-sdk-go/host" +) + +func main() { + ctx := context.Background() + // Get the default cloud parameters for AWS + cp, err := host.GetDefaultCloudParams(ctx, host.AWSCloud) + // Show the default cloud parameters for AWS to sdtout + fmt.Println(cp) + // Set the cloud parameters for AWS non provided by the default + // Please set your own values for the following fields + cp.AWSProfile = "default" + cp.AWSSecurityGroupID = "sg-0e198c427f8f0616b" + cp.AWSKeyPair = "default" + if err != nil { + panic(err) + } + // Create a new host instance. Count is 1 so only one host will be created + hosts, err := host.CreateInstanceList(ctx, *cp, 1) + if err != nil { + panic(err) + } + fmt.Println(hosts) + + const ( + sshTimeout = 120 * time.Second + sshCommandTimeout = 10 * time.Second + ) + for _, h := range hosts { + // Wait for the host to be ready + fmt.Println("Waiting for SSH shell") + if err := h.WaitForSSHShell(sshTimeout); err != nil { + panic(err) + } + fmt.Println("SSH shell ready to execute commands") + // Run a command on the host + if output, err := h.Commandf(nil, sshCommandTimeout, "echo 'Hello, %s!'", "World"); err != nil { + panic(err) + } else { + fmt.Println(string(output)) + } + } + +} From acd97c866fc6eb867779134b3195f0dacc7ec117 Mon Sep 17 00:00:00 2001 From: Artur Reznikov Date: Fri, 21 Jun 2024 15:19:27 -0700 Subject: [PATCH 02/30] address feedback --- examples/aws.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/examples/aws.go b/examples/aws.go index c024903..2a48323 100644 --- a/examples/aws.go +++ b/examples/aws.go @@ -15,8 +15,6 @@ func main() { ctx := context.Background() // Get the default cloud parameters for AWS cp, err := host.GetDefaultCloudParams(ctx, host.AWSCloud) - // Show the default cloud parameters for AWS to sdtout - fmt.Println(cp) // Set the cloud parameters for AWS non provided by the default // Please set your own values for the following fields cp.AWSProfile = "default" @@ -30,7 +28,6 @@ func main() { if err != nil { panic(err) } - fmt.Println(hosts) const ( sshTimeout = 120 * time.Second @@ -50,5 +47,4 @@ func main() { fmt.Println(string(output)) } } - } From 703794bb66d57358d78abff7a19b57978f5480ca Mon Sep 17 00:00:00 2001 From: Artur Reznikov Date: Mon, 24 Jun 2024 15:50:56 -0700 Subject: [PATCH 03/30] add hostresult and provisioining code for sdk stil wip --- host/create.go | 72 +++++++++++++++++++++++++++++- host/host.go | 1 + host/hostResult.go | 109 +++++++++++++++++++++++++++++++++++++++++++++ host/supported.go | 19 ++++++++ 4 files changed, 200 insertions(+), 1 deletion(-) create mode 100644 host/hostResult.go diff --git a/host/create.go b/host/create.go index c827a18..4290a28 100644 --- a/host/create.go +++ b/host/create.go @@ -6,6 +6,7 @@ package host import ( "context" "fmt" + "sync" awsAPI "github.com/ava-labs/avalanche-tooling-sdk-go/cloud/aws" gcpAPI "github.com/ava-labs/avalanche-tooling-sdk-go/cloud/gcp" @@ -26,7 +27,7 @@ func preCreateCheck(cp CloudParams, count int) error { // Create creates a new node. // If wait is true, this function will block until the node is ready. -func CreateInstanceList(ctx context.Context, cp CloudParams, count int) ([]Host, error) { +func createInstanceList(ctx context.Context, cp CloudParams, count int) ([]Host, error) { if err := preCreateCheck(cp, count); err != nil { return nil, err } @@ -123,3 +124,72 @@ func CreateInstanceList(ctx context.Context, cp CloudParams, count int) ([]Host, } return hosts, nil } + +// CreateInstanceList creates a list of nodes. +func CreateInstanceList(ctx context.Context, cp CloudParams, count int, roles []SupportedRole, networkID string, avalancheGoVersion string, withMonitoring bool) ([]Host, error) { + hosts, err := createInstanceList(ctx, cp, count) + if err != nil { + return nil, err + } + wg := sync.WaitGroup{} + wgResults := HostResults{} + // wait for all hosts to be ready and provision based on the role list + for _, host := range hosts { + wg.Add(1) + go func(hostResults *HostResults, host Host) { + defer wg.Done() + if err := host.WaitForSSHShell(constants.SSHScriptTimeout); err != nil { + hostResults.AddResult(host.NodeID, nil, err) + return + } + if err := provisionHost(host, roles, networkID, avalancheGoVersion, withMonitoring); err != nil { + hostResults.AddResult(host.NodeID, nil, err) + return + } + }(&wgResults, host) + host.Roles = roles + } + wg.Wait() + if wgResults.HasErrors() { + // if there are errors, collect and return them with nodeIds + hostErrorMap := wgResults.GetErrorHostMap() + errStr := "" + for nodeID, err := range hostErrorMap { + errStr += fmt.Sprintf("NodeID: %s, Error: %s\n", nodeID, err) + } + return nil, fmt.Errorf("failed to provision all hosts: %s", errStr) + + } + + return hosts, nil +} + +// provisionHost provisions a host with the given roles. +func provisionHost(host Host, roles []SupportedRole, networkID string, avalancheGoVersion string, withMonitoring bool) error { + if err := CheckRoles(roles); err != nil { + return err + } + if err := host.Connect(constants.SSHTCPPort); err != nil { + return err + } + for _, role := range roles { + switch role { + case Validator: + case API: + if err := provisionAvagoHost(host, networkID, avalancheGoVersion, withMonitoring); err != nil { + return err + } + default: + return fmt.Errorf("unsupported role %s", role) + } + return nil + } +} + +func provisionAvagoHost(host Host, networkID string, avalancheGoVersion string, withMonitoring bool) error { + if err := host.ComposeSSHSetupNode(networkID, avalancheGoVersion, withMonitoring); err != nil { + return err + } + + return nil +} diff --git a/host/host.go b/host/host.go index 8ebecf0..4868922 100644 --- a/host/host.go +++ b/host/host.go @@ -40,6 +40,7 @@ type SSHConfig struct { Params map[string]string // additional parameters to pass to the ssh command } +// Host represents a cloud host that can be connected to over SSH type Host struct { // ID of the host NodeID string diff --git a/host/hostResult.go b/host/hostResult.go new file mode 100644 index 0000000..65faf1b --- /dev/null +++ b/host/hostResult.go @@ -0,0 +1,109 @@ +package host + +import "sync" + +// HostResult is a struct that holds the result of a async command executed on a host +type HostResult struct { + // ID of the host + NodeID string + + // Value is the result of the command executed on the host + Value interface{} + + // Err is the error that occurred while executing the command on the host + Err error +} + +// HostResults is a struct that holds the results of multiple async commands executed on multiple hosts +type HostResults struct { + Results []HostResult + Lock sync.Mutex +} + +// AddResult adds a result to the HostResults +func (nr *HostResults) AddResult(nodeID string, value interface{}, err error) { + nr.Lock.Lock() + defer nr.Lock.Unlock() + nr.Results = append(nr.Results, HostResult{ + NodeID: nodeID, + Value: value, + Err: err, + }) +} + +// GetResults returns the results of the HostResults +func (nr *HostResults) GetResults() []HostResult { + nr.Lock.Lock() + defer nr.Lock.Unlock() + return nr.Results +} + +// GetResultMap returns a map of the results of the HostResults with the nodeID as the key +func (nr *HostResults) GetResultMap() map[string]interface{} { + nr.Lock.Lock() + defer nr.Lock.Unlock() + result := map[string]interface{}{} + for _, node := range nr.Results { + result[node.NodeID] = node.Value + } + return result +} + +// GetErrorMap returns a map of the errors of the HostResults with the nodeID as the key +func (nr *HostResults) Len() int { + nr.Lock.Lock() + defer nr.Lock.Unlock() + return len(nr.Results) +} + +// GetNodeList returns a list of the nodeIDs of the HostResults +func (nr *HostResults) GetNodeList() []string { + nr.Lock.Lock() + defer nr.Lock.Unlock() + nodes := []string{} + for _, node := range nr.Results { + nodes = append(nodes, node.NodeID) + } + return nodes +} + +// GetErrorMap returns a map of the errors of the HostResults with the nodeID as the key +func (nr *HostResults) GetErrorHostMap() map[string]error { + nr.Lock.Lock() + defer nr.Lock.Unlock() + hostErrors := make(map[string]error) + for _, node := range nr.Results { + if node.Err != nil { + hostErrors[node.NodeID] = node.Err + } + } + return hostErrors +} + +// HasNodeIDWithError checks if a node with the given nodeID has an error +func (nr *HostResults) HasNodeIDWithError(nodeID string) bool { + nr.Lock.Lock() + defer nr.Lock.Unlock() + for _, node := range nr.Results { + if node.NodeID == nodeID && node.Err != nil { + return true + } + } + return false +} + +// HasErrors returns true if the HostResults has any errors +func (nr *HostResults) HasErrors() bool { + return len(nr.GetErrorHostMap()) > 0 +} + +// GetErrorHosts returns a list of the nodeIDs of the HostResults that have errors +func (nr *HostResults) GetErrorHosts() []string { + var nodes []string + for _, node := range nr.Results { + if node.Err != nil { + nodes = append(nodes, node.NodeID) + } + } + return nodes +} diff --git a/host/supported.go b/host/supported.go index f181c6a..99d2986 100644 --- a/host/supported.go +++ b/host/supported.go @@ -3,6 +3,11 @@ package host +import ( + "fmt" + "slices" +) + type SupportedCloud int const ( @@ -84,3 +89,17 @@ func (r *SupportedRole) String() string { return "unknown" } } + +// CheckRoles checks if the combination of roles is valid +func CheckRoles(roles []SupportedRole) error { + if slices.Contains(roles, Validator) && slices.Contains(roles, API) { + return fmt.Errorf("cannot have both validator and api roles") + } + if slices.Contains(roles, Loadtest) && len(roles) > 1 { + return fmt.Errorf("%s role cannot be combined with other roles", Loadtest) + } + if slices.Contains(roles, Monitor) && len(roles) > 1 { + return fmt.Errorf("%s role cannot be combined with other roles", Monitor) + } + return nil +} From 275f42044c710fb16b7aedc1f038c97b4aa2b44d Mon Sep 17 00:00:00 2001 From: Artur Reznikov Date: Tue, 25 Jun 2024 13:04:17 -0700 Subject: [PATCH 04/30] wip host role list provision --- constants/constants.go | 5 + host/create.go | 39 + host/monitoring/configs/loki.yml | 46 + host/monitoring/configs/prometheus.yml | 53 + host/monitoring/configs/promtail.yml | 65 + host/monitoring/dashboards/c_chain.json | 2352 +++++++++ host/monitoring/dashboards/database.json | 1954 ++++++++ host/monitoring/dashboards/logs.json | 298 ++ host/monitoring/dashboards/machine.json | 1062 ++++ host/monitoring/dashboards/main.json | 1977 ++++++++ host/monitoring/dashboards/network.json | 5706 ++++++++++++++++++++++ host/monitoring/dashboards/p_chain.json | 2018 ++++++++ host/monitoring/dashboards/subnets.json | 1930 ++++++++ host/monitoring/dashboards/x_chain.json | 1791 +++++++ host/monitoring/monitoring.go | 117 + host/shell/buildLoadTestDeps.sh | 16 + host/shell/getNewSubnetEVMRelease.sh | 6 + host/shell/setupBuildEnv.sh | 26 + host/shell/setupCLIFromSource.sh | 36 + host/shell/setupDockerService.sh | 21 + host/shell/setupNode.sh | 18 + host/ssh.go | 200 + utils/net.go | 10 + utils/strings.go | 19 + utils/strings_test.go | 11 + 25 files changed, 19776 insertions(+) create mode 100644 host/monitoring/configs/loki.yml create mode 100644 host/monitoring/configs/prometheus.yml create mode 100644 host/monitoring/configs/promtail.yml create mode 100644 host/monitoring/dashboards/c_chain.json create mode 100644 host/monitoring/dashboards/database.json create mode 100644 host/monitoring/dashboards/logs.json create mode 100644 host/monitoring/dashboards/machine.json create mode 100644 host/monitoring/dashboards/main.json create mode 100644 host/monitoring/dashboards/network.json create mode 100644 host/monitoring/dashboards/p_chain.json create mode 100644 host/monitoring/dashboards/subnets.json create mode 100644 host/monitoring/dashboards/x_chain.json create mode 100644 host/monitoring/monitoring.go create mode 100644 host/shell/buildLoadTestDeps.sh create mode 100644 host/shell/getNewSubnetEVMRelease.sh create mode 100755 host/shell/setupBuildEnv.sh create mode 100644 host/shell/setupCLIFromSource.sh create mode 100644 host/shell/setupDockerService.sh create mode 100644 host/shell/setupNode.sh create mode 100644 host/ssh.go create mode 100644 utils/net.go diff --git a/constants/constants.go b/constants/constants.go index c42bc10..05f2466 100644 --- a/constants/constants.go +++ b/constants/constants.go @@ -49,6 +49,8 @@ const ( CloudNodeSubnetEvmBinaryPath = "/home/ubuntu/.avalanchego/plugins/%s" CloudNodeStakingPath = "/home/ubuntu/.avalanchego/staking/" CloudNodeConfigPath = "/home/ubuntu/.avalanchego/configs/" + ServicesDir = "services" + DashboardsDir = "dashboards" // misc DefaultPerms755 = 0o755 @@ -61,4 +63,7 @@ const ( AvalancheGoDockerImage = "avaplatform/avalanchego" AvalancheGoGitRepo = "https://github.com/ava-labs/avalanchego" SubnetEVMRepoName = "subnet-evm" + + AWMRelayerInstallDir = "awm-relayer" + AWMRelayerConfigFilename = "awm-relayer-config.json" ) diff --git a/host/create.go b/host/create.go index 4290a28..6ba6bd4 100644 --- a/host/create.go +++ b/host/create.go @@ -11,6 +11,7 @@ import ( awsAPI "github.com/ava-labs/avalanche-tooling-sdk-go/cloud/aws" gcpAPI "github.com/ava-labs/avalanche-tooling-sdk-go/cloud/gcp" "github.com/ava-labs/avalanche-tooling-sdk-go/constants" + "github.com/ava-labs/avalanche-tooling-sdk-go/utils" "github.com/aws/aws-sdk-go-v2/service/ec2/types" ) @@ -179,17 +180,55 @@ func provisionHost(host Host, roles []SupportedRole, networkID string, avalanche if err := provisionAvagoHost(host, networkID, avalancheGoVersion, withMonitoring); err != nil { return err } + case Loadtest: + if err := provisionLoadTestHost(host); err != nil { + return err + } + case Monitor: + if err := provisionMonitoringHost(host); err != nil { + return err + } default: return fmt.Errorf("unsupported role %s", role) } return nil } + return nil } func provisionAvagoHost(host Host, networkID string, avalancheGoVersion string, withMonitoring bool) error { if err := host.ComposeSSHSetupNode(networkID, avalancheGoVersion, withMonitoring); err != nil { return err } + if err := host.RestartDockerCompose(constants.SSHScriptTimeout); err != nil { + return err + } + return nil +} + +func provisionLoadTestHost(host Host) error { + if err := host.ComposeSSHSetupLoadTest(); err != nil { + return err + } + if err := host.RestartDockerCompose(constants.SSHScriptTimeout); err != nil { + return err + } + return nil +} +func provisionMonitoringHost(host Host) error { + if err := host.ComposeSSHSetupMonitoring(); err != nil { + return err + } + if err := host.RestartDockerCompose(constants.SSHScriptTimeout); err != nil { + return err + } return nil } + +func provisionAWMRelayerHost(host Host) error { + if err := host.ComposeSSHSetupAWMRelayer(); err != nil { + return err + } + return host.StartDockerComposeService(utils.GetRemoteComposeFile(), "awm-relayer", constants.SSHLongRunningScriptTimeout) +} diff --git a/host/monitoring/configs/loki.yml b/host/monitoring/configs/loki.yml new file mode 100644 index 0000000..131b768 --- /dev/null +++ b/host/monitoring/configs/loki.yml @@ -0,0 +1,46 @@ +auth_enabled: false + +server: + http_listen_port: {{ .Port}} + grpc_listen_port: 9096 + grpc_server_max_recv_msg_size: 80000000 + grpc_server_max_send_msg_size: 80000000 + +common: + instance_addr: 0.0.0.0 + path_prefix: /var/lib/loki + storage: + filesystem: + chunks_directory: /var/lib/loki/chunks + rules_directory: /var/lib/loki/rules + replication_factor: 1 + ring: + kvstore: + store: inmemory + +query_range: + results_cache: + cache: + embedded_cache: + enabled: true + max_size_mb: 100 + +schema_config: + configs: + - from: 2024-01-01 + store: tsdb + object_store: filesystem + schema: v13 + index: + prefix: index_ + period: 24h + +limits_config: + reject_old_samples: false + reject_old_samples_max_age: 1w + +ruler: + alertmanager_url: http://localhost:9093 + +analytics: + reporting_enabled: false diff --git a/host/monitoring/configs/prometheus.yml b/host/monitoring/configs/prometheus.yml new file mode 100644 index 0000000..ecc6791 --- /dev/null +++ b/host/monitoring/configs/prometheus.yml @@ -0,0 +1,53 @@ +#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +# +++++++++++++++++++++++++++++++++++++++ # +# DO NOT EDIT THIS FILE # +# THIS FILE IS GENERATED BY AVALANCHE-CLI # +# ALL CHANGES WILL BE OVERWRITTEN # +# +++++++++++++++++++++++++++++++++++++++ # + +#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + + +global: + scrape_interval: 15s + evaluation_interval: 15s + # scrape_timeout is set to the global default (10s). + +# Alertmanager configuration +alerting: + alertmanagers: + - static_configs: + - targets: + # - alertmanager:9093 + +# Load rules once and periodically evaluate them according to the global 'evaluation_interval'. +rule_files: + # - "first_rules.yml" + # - "second_rules.yml" + +# A scrape configuration containing exactly one endpoint to scrape: +# Here it's Prometheus itself. +scrape_configs: + - job_name: "prometheus" + # metrics_path defaults to '/metrics' + # scheme defaults to 'http'. + static_configs: + - targets: ["prometheus:9090"] + - job_name: 'avalanchego' + metrics_path: '/ext/metrics' + static_configs: + - targets: [{{ .AvalancheGoPorts }}] + - job_name: 'avalanchego-machine' + static_configs: + - targets: [{{ .MachinePorts }}] + labels: + alias: 'machine' +{{ if ne .LoadTestPorts "" }} + - job_name: 'avalanchego-loadtest' + metrics_path: '/metrics' + static_configs: + - targets: [{{ .LoadTestPorts }}] + labels: + alias: 'avalanchego-loadtest' +{{ end }} diff --git a/host/monitoring/configs/promtail.yml b/host/monitoring/configs/promtail.yml new file mode 100644 index 0000000..f3b6454 --- /dev/null +++ b/host/monitoring/configs/promtail.yml @@ -0,0 +1,65 @@ +server: + disable: true + +positions: + filename: /tmp/positions.yaml + +clients: +- url: http://{{ .IP }}:{{ .Port}}/loki/api/v1/push + + +scrape_configs: + - job_name: avalanchego + pipeline_stages: + - regex: + expression: '\[(?P\d{2}-\d{2}\|\d{2}:\d{2}:\d{2}\.\d{3})\]' + - timestamp: + source: timestamp + format: '03-20|01:34:31.515' + static_configs: + - targets: + - localhost + labels: + job: c-chain + host: {{ .Host }} + nodeID: {{ .NodeID }} + __path__: /logs/C.log + - targets: + - localhost + labels: + job: p-chain + host: {{ .Host }} + nodeID: {{ .NodeID }} + __path__: /logs/P.log + - targets: + - localhost + labels: + job: x-chain + host: {{ .Host }} + nodeID: {{ .NodeID }} + __path__: /logs/X.log + - targets: + - localhost + labels: + job: main + host: {{ .Host }} + nodeID: {{ .NodeID }} + __path__: /logs/main.log +{{ if .ChainID }} + - targets: + - localhost + labels: + job: subnet + host: {{ .Host }} + nodeID: {{ .NodeID }} + __path__: /logs/{{ .ChainID }}.log +{{ end }} + - job_name: avalanchego-loadtest + static_configs: + - targets: + - localhost + labels: + job: loadtest + host: {{ .Host }} + nodeID: {{ .NodeID }} + __path__: /logs/loadtest_*.txt diff --git a/host/monitoring/dashboards/c_chain.json b/host/monitoring/dashboards/c_chain.json new file mode 100644 index 0000000..e70d95a --- /dev/null +++ b/host/monitoring/dashboards/c_chain.json @@ -0,0 +1,2352 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 2, + "links": [ + { + "icon": "external link", + "tags": [ + "Avalanche" + ], + "type": "dashboards" + } + ], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 15, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "round(increase(avalanche_C_blks_accepted_count{instance=~\"$host\",job=\"avalanchego\"}[1m]))>0", + "interval": "", + "legendFormat": "Accepted", + "range": true, + "refId": "A" + } + ], + "title": "Accepted Blocks in Last Minute", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 20, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "round(increase(avalanche_C_blks_rejected_count{instance=~\"$host\",job=\"avalanchego\"}[1m]))>0", + "interval": "", + "legendFormat": "Rejected", + "range": true, + "refId": "A" + } + ], + "title": "Rejected Blocks in Last Minute", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "The average time between a block's issuance and acceptance by this node over the last 5 minutes.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + } + ] + }, + "unit": "ns" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 22, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "expr": "rate(avalanche_C_blks_accepted_sum{instance=~\"$host\",job=\"avalanchego\"}[5m]) / rate(avalanche_C_blks_accepted_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "Avg Acceptance Latency", + "range": true, + "refId": "A" + } + ], + "title": "Average Block Acceptance Latency", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "The average time between a block's issuance and rejection by this node over the last 5 minutes.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ns" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 23, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "expr": "rate(avalanche_C_blks_rejected_sum{instance=~\"$host\",job=\"avalanchego\"}[5m]) / rate(avalanche_C_blks_rejected_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "Avg Rejection Latency", + "range": true, + "refId": "A" + } + ], + "title": "Average Block Rejection Latency", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Transactions", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 16 + }, + "id": 9, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avalanche_C_blks_processing{instance=~\"$host\",job=\"avalanchego\"}>0", + "interval": "", + "legendFormat": "Transactions", + "range": true, + "refId": "A" + } + ], + "title": "Processing Blocks", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Incomplete Polls", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 16 + }, + "id": 39, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avalanche_C_polls{instance=~\"$host\"} > 0", + "interval": "", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "title": "Incomplete Polls", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Measures how much of each second is being spent handling different kinds of messages on the C-Chain.\nThe value for chits, for example, is the number of seconds spent handling chits messages per second, over the last 30 seconds.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ns" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 24 + }, + "id": 5, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_pull_query_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "pull query", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_push_query_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "push query", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_chits_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "chits", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_accepted_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "accepted", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_get_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_put_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "put", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_multiput_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "multiput", + "range": true, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_get_ancestors_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get ancestors", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_get_failed_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get failed", + "range": true, + "refId": "I" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_query_failed_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "query failed", + "range": true, + "refId": "J" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_get_accepted_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get accepted", + "range": true, + "refId": "K" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_get_ancestors_failed_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get ancestors failed", + "range": true, + "refId": "L" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_app_request_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app request", + "range": true, + "refId": "M" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_app_request_failed_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app request failed", + "range": true, + "refId": "N" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_app_response_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app response", + "range": true, + "refId": "O" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_app_gossip_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app gossip", + "range": true, + "refId": "P" + } + ], + "title": "Message Handling Time (Total)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Percentage of queries for which we receive chits on time.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "transparent", + "value": 0.8 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 24 + }, + "id": 11, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "(increase(avalanche_C_handler_chits_count{instance=~\"$host\",job=\"avalanchego\"}[5m]) + 1) / (increase(avalanche_C_handler_chits_count{instance=~\"$host\",job=\"avalanchego\"}[5m]) + increase(avalanche_C_handler_query_failed_count{instance=~\"$host\",job=\"avalanchego\"}[5m]) + 1)", + "instant": false, + "interval": "", + "legendFormat": "% Successful", + "refId": "A" + } + ], + "title": "Percentage of Successful Queries", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Measures how long each kind of request on the C-Chain takes to handle.\nThe value for chits, for example, is how long, in seconds, it takes to handle a chits message.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ns" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 32 + }, + "id": 7, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_pull_query_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_C_handler_pull_query_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "pull query", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_push_query_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_C_handler_push_query_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "push query", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_chits_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_C_handler_chits_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "chits", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_accepted_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_C_handler_accepted_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "accepted", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_get_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_C_handler_get_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_put_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_C_handler_put_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "put", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_multiput_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_C_handler_multi_put_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "multiput", + "range": true, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_get_ancestors_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_C_handler_get_ancestors_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get ancestors", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_get_failed_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_C_handler_get_failed_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get failed", + "range": true, + "refId": "I" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_query_failed_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_C_handler_query_failed_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "query failed", + "range": true, + "refId": "J" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_get_accepted_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_C_handler_get_accepted_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get accepted", + "range": true, + "refId": "K" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_get_ancestors_failed_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_C_handler_get_ancestors_failed_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get ancestors failed", + "range": true, + "refId": "L" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_app_request_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_C_handler_app_request_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app request", + "range": true, + "refId": "M" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_app_request_failed_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_C_handler_app_request_failed_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app request failed", + "range": true, + "refId": "N" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_app_response_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_C_handler_app_response_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app response", + "range": true, + "refId": "O" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_app_gossip_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_C_handler_app_gossip_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app gossip", + "range": true, + "refId": "P" + } + ], + "title": "Message Handling Time (per Message)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 33 + }, + "id": 19, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.6", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avalanche_C_handler_unprocessed_msgs_len{instance=~\"$host\"}", + "interval": "", + "legendFormat": "Pending Messages", + "range": true, + "refId": "A" + } + ], + "title": "Unprocessed Incoming Messages", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 6, + "y": 33 + }, + "id": 29, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.6", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_C_handler_expired{instance=~\"$host\"}[1m])", + "interval": "", + "legendFormat": "Expired", + "range": true, + "refId": "A" + } + ], + "title": "Incoming Messages Expired in Last Minute", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "The total stake of validators currently \"benched\" due to poor query responsiveness. Queries to these validators will immediately timeout until they are removed from the \"bench.\"", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 41 + }, + "id": 25, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avg_over_time(avalanche_C_benchlist_benched_weight{instance=~\"$host\",job=\"avalanchego\"}[15m]) / 10^9", + "interval": "", + "legendFormat": "AVAX Benched", + "range": true, + "refId": "A" + } + ], + "title": "AVAX Benched", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Measures how many of each kind of message are received per second on the C-Chain.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Messages / Second", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 41 + }, + "id": 6, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_pull_query_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "pull query", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_push_query_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "push query", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_chits_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "chits", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_accepted_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "accepted", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_get_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_put_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "put", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_multi_put_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "multiput", + "range": true, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_get_ancestors_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get ancestors", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_get_failed_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get failed", + "range": true, + "refId": "I" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_query_failed_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "query failed", + "range": true, + "refId": "J" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_get_accepted_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get accepted", + "range": true, + "refId": "K" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_get_ancestors_failed_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get ancestors failed", + "range": true, + "refId": "L" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_app_request_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app request", + "range": true, + "refId": "M" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_app_request_failed_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app request failed", + "range": true, + "refId": "N" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_app_response_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app response", + "range": true, + "refId": "O" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_handler_app_gossip_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app gossip", + "range": true, + "refId": "P" + } + ], + "title": "Messages Received per Second", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Hit rate for the cache where the key is the byte representation of the block, and the value is the block's ID", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "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": 8, + "w": 12, + "x": 0, + "y": 50 + }, + "id": 35, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_C_vm_chain_state_bytes_to_id_cache_hit{instance=~\"$host\"}[5m])/(increase(avalanche_C_vm_chain_state_bytes_to_id_cache_hit{instance=~\"$host\"}[5m])+increase(avalanche_C_vm_chain_state_bytes_to_id_cache_miss{instance=~\"$host\"}[5m]))", + "interval": "", + "legendFormat": "Hit Rate", + "range": true, + "refId": "A" + } + ], + "title": "Block ID Cache Hit Rate", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Hit rate for the decided block cache", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "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": 8, + "w": 12, + "x": 12, + "y": 50 + }, + "id": 36, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_C_vm_chain_state_decided_cache_hit{instance=~\"$host\"}[5m])/(increase(avalanche_C_vm_chain_state_decided_cache_hit{instance=~\"$host\"}[5m])+increase(avalanche_C_vm_chain_state_decided_cache_miss{instance=~\"$host\"}[5m]))", + "interval": "", + "legendFormat": "Hit Rate", + "range": true, + "refId": "A" + } + ], + "title": "Decided Cache Hit Rate", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Hit rate for the missing block cache", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "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": 8, + "w": 12, + "x": 0, + "y": 58 + }, + "id": 37, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_C_vm_chain_state_missing_cache_hit{instance=~\"$host\"}[5m])/(increase(avalanche_C_vm_chain_state_missing_cache_hit{instance=~\"$host\"}[5m])+increase(avalanche_C_vm_chain_state_missing_cache_miss{instance=~\"$host\"}[5m]))", + "interval": "", + "legendFormat": "Hit Rate", + "range": true, + "refId": "A" + } + ], + "title": "Missing Block Cache Hit Rate", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Hit rate for the unverified block cache", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "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": 8, + "w": 12, + "x": 12, + "y": 58 + }, + "id": 38, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_C_vm_chain_state_unverified_cache_hit{instance=~\"$host\"}[5m])/(increase(avalanche_C_vm_chain_state_unverified_cache_hit{instance=~\"$host\"}[5m])+increase(avalanche_C_vm_chain_state_unverified_cache_miss{instance=~\"$host\"}[5m]))", + "interval": "", + "legendFormat": "Hit Rate", + "range": true, + "refId": "A" + } + ], + "title": "Unverified Block Cache Hit Rate", + "type": "timeseries" + } + ], + "refresh": "10s", + "schemaVersion": 38, + "tags": [ + "Avalanche" + ], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "184.73.245.13:9650", + "value": "184.73.245.13:9650" + }, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "definition": "label_values(instance)", + "hide": 0, + "includeAll": true, + "multi": false, + "name": "host", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(instance)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "/9650/", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "C-Chain", + "uid": "Gl1I20mnk", + "version": 20, + "weekStart": "" +} \ No newline at end of file diff --git a/host/monitoring/dashboards/database.json b/host/monitoring/dashboards/database.json new file mode 100644 index 0000000..446391a --- /dev/null +++ b/host/monitoring/dashboards/database.json @@ -0,0 +1,1954 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 3, + "links": [ + { + "icon": "external link", + "tags": [ + "Avalanche" + ], + "type": "dashboards" + } + ], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Database read rate. Note that these reads may be from caches and not from disk.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "Bps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 13, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_db_read_size_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "Bytes Read", + "range": true, + "refId": "B" + } + ], + "title": "Database Read Rate", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Database write rate.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "Bps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 14, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_db_write_size_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "Write Rate", + "range": true, + "refId": "A" + } + ], + "title": "Database Write Rate", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Measures how many of each database operation is performed each second across all chains", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ops" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 2, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_db_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "put", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_db_get_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_db_delete_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "delete", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_db_has_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "has", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_db_compact_size_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "compact", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_db_batch_put_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch put", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_db_batch_delete_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch delete", + "range": true, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_db_batch_reset_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch reset", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_db_batch_replay_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch replay", + "range": true, + "refId": "I" + } + ], + "title": "Total Operations per Second", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Measures how long each database operation is taking on average", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ns" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 5, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_db_put_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_db_put_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "put", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_db_get_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_db_get_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_db_delete_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_db_delete_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "delete", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_db_has_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_db_has_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "has", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_db_compact_size_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_db_compact_size_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "compact", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_db_batch_put_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_db_batch_put_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch put", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_db_batch_delete_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_db_batch_delete_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch delete", + "range": true, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_db_batch_reset_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_db_batch_reset_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch reset", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_db_batch_replay_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_db_batch_replay_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch replay", + "range": true, + "refId": "I" + } + ], + "title": "Total Operations Latency", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Measures how many of each database operation is performed each second on X-Chain", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ops" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 15 + }, + "id": 6, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_db_put_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "put", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_db_get_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_db_delete_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "delete", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_db_has_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "has", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_db_compact_size_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "compact", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_db_batch_put_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch put", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_db_batch_delete_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch delete", + "range": true, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_db_batch_reset_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch reset", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_db_batch_replay_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch replay", + "range": true, + "refId": "I" + } + ], + "title": "X-Chain Operations per Second", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Measures how long each database operation is taking on average on X-Chain", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ns" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 15 + }, + "id": 7, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_X_db_put_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_X_db_put_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "put", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_X_db_get_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_X_db_get_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_X_db_delete_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_X_db_delete_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "delete", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_X_db_has_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_X_db_has_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "has", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_X_db_compact_size_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_X_db_compact_size_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "compact", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_X_db_batch_put_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_X_db_batch_put_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch put", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_X_db_batch_delete_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_X_db_batch_delete_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch delete", + "range": true, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_X_db_batch_reset_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_X_db_batch_reset_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch reset", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_X_db_batch_replay_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_X_db_batch_replay_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch replay", + "range": true, + "refId": "I" + } + ], + "title": "X-Chain Operations Latency", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Measures how many of each database operation is performed each second on P-Chain", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ops" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 22 + }, + "id": 8, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_db_put_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "put", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_db_get_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_db_delete_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "delete", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_db_has_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "has", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_db_compact_size_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "compact", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_db_batch_put_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch put", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_db_batch_delete_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch delete", + "range": true, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_db_batch_reset_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch reset", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_db_batch_replay_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch replay", + "range": true, + "refId": "I" + } + ], + "title": "P-Chain Operations per Second", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Measures how long each database operation is taking on average on P-Chain", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ns" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 22 + }, + "id": 9, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_P_db_put_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_P_db_put_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "put", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_P_db_get_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_P_db_get_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_P_db_delete_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_P_db_delete_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "delete", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_P_db_has_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_P_db_has_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "has", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_P_db_compact_size_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_P_db_compact_size_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "compact", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_P_db_batch_put_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_P_db_batch_put_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch put", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_P_db_batch_delete_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_P_db_batch_delete_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch delete", + "range": true, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_P_db_batch_reset_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_P_db_batch_reset_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch reset", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_P_db_batch_replay_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_P_db_batch_replay_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch replay", + "range": true, + "refId": "I" + } + ], + "title": "P-Chain Operations Latency", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Measures how many of each database operation is performed each second across all chains", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ops" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 29 + }, + "id": 10, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_db_put_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "put", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_db_get_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_db_delete_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "delete", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_db_has_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "has", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_db_compact_size_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "compact", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_db_batch_put_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch put", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_db_batch_delete_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch delete", + "range": true, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_db_batch_reset_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch reset", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_C_db_batch_replay_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch replay", + "range": true, + "refId": "I" + } + ], + "title": "C-Chain Operations per Second", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Measures how long each database operation is taking on average on C-Chain", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ns" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 29 + }, + "id": 11, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_C_db_put_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_C_db_put_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "put", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_C_db_get_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_C_db_get_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_C_db_delete_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_C_db_delete_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "delete", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_C_db_has_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_C_db_has_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "has", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_C_db_compact_size_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_C_db_compact_size_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "compact", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_C_db_batch_put_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_C_db_batch_put_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch put", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_C_db_batch_delete_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_C_db_batch_delete_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch delete", + "range": true, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_C_db_batch_reset_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_C_db_batch_reset_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch reset", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_C_db_batch_replay_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_C_db_batch_replay_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch replay", + "range": true, + "refId": "I" + } + ], + "title": "C-Chain Operations Latency", + "type": "timeseries" + } + ], + "refresh": "10s", + "schemaVersion": 38, + "tags": [ + "Avalanche" + ], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "184.73.245.13:9650", + "value": "184.73.245.13:9650" + }, + "definition": "label_values(instance)", + "hide": 0, + "includeAll": true, + "multi": false, + "name": "host", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(instance)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "/9650/", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Database", + "uid": "R8N89hznk", + "version": 12, + "weekStart": "" +} \ No newline at end of file diff --git a/host/monitoring/dashboards/logs.json b/host/monitoring/dashboards/logs.json new file mode 100644 index 0000000..2fdc25b --- /dev/null +++ b/host/monitoring/dashboards/logs.json @@ -0,0 +1,298 @@ +{ + "annotations": { + "list": [ + { + "$$hashKey": "object:75", + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "description": "Log Viewer Dashboard for Loki", + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": 13639, + "graphTooltip": 0, + "id": 6, + "links": [], + "panels": [ + { + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "fillOpacity": 70, + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineWidth": 0, + "spanNulls": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 6, + "options": { + "alignValue": "left", + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "mergeValues": true, + "rowHeight": 0.9, + "showValue": "auto", + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "10.4.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, + "editorMode": "code", + "expr": "sum by (job) (rate({job=~\"$app\",host=~\"$host\",nodeID=~\"$nodeID\"} |= \"$search\" [$__interval]))", + "legendFormat": "", + "queryType": "range", + "refId": "A" + } + ], + "type": "state-timeline" + }, + { + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, + "description": "", + "gridPos": { + "h": 25, + "w": 24, + "x": 0, + "y": 3 + }, + "id": 2, + "maxDataPoints": "", + "options": { + "dedupStrategy": "none", + "enableLogDetails": true, + "prettifyLogMessage": true, + "showCommonLabels": false, + "showLabels": false, + "showTime": false, + "sortOrder": "Descending", + "wrapLogMessage": true + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, + "editorMode": "code", + "expr": "{job=~\"$app\",host=~\"$host\",nodeID=~\"$nodeID\"} |= \"$search\" | decolorize | logfmt" , + "hide": false, + "legendFormat": "", + "queryType": "range", + "refId": "A" + } + ], + "transparent": true, + "type": "logs" + } + ], + "refresh": "5s", + "schemaVersion": 39, + "tags": [ + "Avalanche", + "Logs" + ], + "templating": { + "list": [ + { + "allValue": ".+", + "current": { + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, + "definition": "", + "hide": 0, + "includeAll": true, + "label": "Host", + "multi": true, + "name": "host", + "options": [], + "query": { + "label": "host", + "refId": "LokiVariableQueryEditor-VariableQuery", + "stream": "", + "type": 1 + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "allValue": ".+", + "current": { + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, + "definition": "", + "hide": 0, + "includeAll": true, + "label": "NodeID", + "multi": true, + "name": "nodeID", + "options": [], + "query": { + "label": "nodeID", + "refId": "LokiVariableQueryEditor-VariableQuery", + "stream": "", + "type": 1 + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "allValue": ".+", + "current": { + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, + "definition": "label_values(job)", + "hide": 0, + "includeAll": true, + "label": "Label", + "multi": true, + "name": "app", + "options": [], + "query": "label_values(job)", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": { + "selected": false, + "text": "", + "value": "" + }, + "hide": 0, + "label": "String Match", + "name": "search", + "options": [ + { + "selected": true, + "text": "", + "value": "" + } + ], + "query": "", + "skipUrlSync": false, + "type": "textbox" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "hidden": false, + "refresh_intervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Avalanche Logs", + "uid": "avalanche-loki-logs", + "version": 1, + "weekStart": "" +} diff --git a/host/monitoring/dashboards/machine.json b/host/monitoring/dashboards/machine.json new file mode 100644 index 0000000..62c13bb --- /dev/null +++ b/host/monitoring/dashboards/machine.json @@ -0,0 +1,1062 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "CPU, disk, memory, etc.", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 4, + "links": [ + { + "icon": "external link", + "tags": [ + "Avalanche" + ], + "type": "dashboards" + } + ], + "liveNow": false, + "panels": [ + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 60 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "avg" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "CPU timeline alert Bootstrap nodes", + "noDataState": "no_data", + "notifications": [ + { + "uid": "o4TAzqkGz" + }, + { + "uid": "9vkRgfdMk" + } + ] + }, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + }, + { + "color": "red", + "value": 60 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 14, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "(1 - avg(irate(node_cpu_seconds_total{instance=~\"$machine\", job=~\"avalanchego-machine\", mode=\"idle\"}[1m])) by (instance)) * 100", + "interval": "", + "legendFormat": "CPU", + "range": true, + "refId": "A" + } + ], + "title": "CPU Utilization (%)", + "type": "timeseries" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "hiddenSeries": false, + "id": 20, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.2.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "node_hwmon_temp_celsius{chip=\"platform_coretemp_0\"}", + "interval": "", + "legendFormat": "{{sensor}}", + "range": true, + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Temperature", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "min": "0", + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Include I/O from applications other than AvalancheGo", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "Bps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 16, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "rate(node_network_receive_bytes_total{instance=~\"$machine\"}[5m])", + "interval": "", + "legendFormat": "Receive {{device}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "rate(node_network_transmit_bytes_total{instance=~\"$machine\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "Transmit {{device}}", + "range": true, + "refId": "B" + } + ], + "title": "Machine Network I/O", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Includes I/O from applications other than AvalancheGo", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "Bps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 18, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "expr": "rate(node_disk_read_bytes_total{instance=~\"$machine\"}[5m])", + "interval": "", + "legendFormat": "Read {{device}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "expr": "rate(node_disk_written_bytes_total{instance=~\"$machine\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "Write {{device}}", + "range": true, + "refId": "B" + } + ], + "title": "Disk I/O", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 90 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "avg" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Memory alert Bootstrap", + "noDataState": "no_data", + "notifications": [ + { + "uid": "o4TAzqkGz" + } + ] + }, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + }, + { + "color": "red", + "value": 90 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 16 + }, + "id": 4, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "100 * (node_memory_MemTotal_bytes{instance=~\"$machine\",job=~\"avalanchego-machine\"} - node_memory_MemFree_bytes{instance=~\"$machine\",job=~\"avalanchego-machine\"} - node_memory_Buffers_bytes{instance=~\"$machine\",job=~\"avalanchego-machine\"} - node_memory_Cached_bytes{instance=~\"$machine\",job=~\"avalanchego-machine\"}) / node_memory_MemTotal_bytes{instance=~\"$machine\",job=~\"avalanchego-machine\"}", + "interval": "", + "legendFormat": "Memory", + "range": true, + "refId": "A" + } + ], + "title": "Memory Utilization (%)", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 90 + ], + "type": "gt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "A", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "avg" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "5m", + "frequency": "1m", + "handler": 1, + "name": "Disk space alert Bootstrap", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + }, + { + "color": "red", + "value": 90 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 16 + }, + "id": 2, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "max(((node_filesystem_size_bytes{instance=~\"$machine\",job=~\"avalanchego-machine\", fstype=~\"ext4|vfat\"} - node_filesystem_free_bytes{instance=~\"$machine\",job=~\"avalanchego-machine\", fstype=~\"ext4|vfat\"}) / node_filesystem_size_bytes{instance=~\"$machine\",job=~\"avalanchego-machine\", fstype=~\"ext4|vfat\"}) * 100) by (instance)", + "interval": "", + "legendFormat": "Disk", + "range": true, + "refId": "A" + } + ], + "title": "Disk Utilization (%)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Number of parallel execution threads in the client runtime", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 24 + }, + "id": 22, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "expr": "avalanche_go_goroutines{instance=~\"$host\",job=~\"avalanchego\"}", + "interval": "", + "legendFormat": "goroutines", + "range": true, + "refId": "A" + } + ], + "title": "Number of Go goroutines", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Number of open file handles the client is keeping", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 24 + }, + "id": 24, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "expr": "avalanche_process_open_fds{instance=~\"$host\",job=~\"avalanchego\"}", + "legendFormat": "Open files", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "avalanche_process_max_fds{instance=~\"$host\",job=~\"avalanchego\"}", + "hide": false, + "instant": false, + "legendFormat": "Max number allowed", + "range": true, + "refId": "B" + } + ], + "title": "Number of Open Files", + "type": "timeseries" + } + ], + "refresh": "10s", + "schemaVersion": 38, + "tags": [ + "Avalanche" + ], + "templating": { + "list": [ + { + "current": { + "selected": true, + "text": "184.73.245.13:9100", + "value": "184.73.245.13:9100" + }, + "definition": "label_values(instance)", + "hide": 0, + "includeAll": true, + "multi": false, + "name": "machine", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(instance)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "/9100/", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": true, + "text": "184.73.245.13:9650", + "value": "184.73.245.13:9650" + }, + "definition": "label_values(instance)", + "hide": 0, + "includeAll": true, + "multi": false, + "name": "host", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(instance)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "/9650/", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Machine Metrics", + "uid": "DHT8r2znz", + "version": 9, + "weekStart": "" +} \ No newline at end of file diff --git a/host/monitoring/dashboards/main.json b/host/monitoring/dashboards/main.json new file mode 100644 index 0000000..d9f42bc --- /dev/null +++ b/host/monitoring/dashboards/main.json @@ -0,0 +1,1977 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "Home dashboard with the most important indicators for your node and machine", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 2, + "links": [ + { + "icon": "external link", + "tags": [ + "Avalanche" + ], + "type": "dashboards" + } + ], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Stake weighted average uptime of your node, as reported by network peers. If this falls below 80% node probably won't be rewarded for the current staking period.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + }, + { + "color": "dark-red", + "value": 80 + }, + { + "color": "red", + "value": 85 + }, + { + "color": "yellow", + "value": 90 + }, + { + "color": "green", + "value": 95 + }, + { + "color": "green", + "value": 100 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 0 + }, + "id": 39, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "text": {} + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avalanche_network_node_uptime_weighted_average{instance=~\"$host\", job=~\"avalanchego\"} ", + "interval": "", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "title": "Uptime average", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Percentage of the stake that view your node as sufficiently online and correct to vote that node be awarded at the end of the staking period.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + }, + { + "color": "red", + "value": 60 + }, + { + "color": "#EAB839", + "value": 70 + }, + { + "color": "green", + "value": 80 + }, + { + "color": "green", + "value": 100 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 0 + }, + "id": 41, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "text": {} + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avalanche_network_node_uptime_rewarding_stake{instance=~\"$host\",job=~\"avalanchego\"}", + "interval": "", + "legendFormat": "Rewarding stake", + "range": true, + "refId": "A" + } + ], + "title": "Rewarding stake", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Number of accepted and rejected blocks on the X chain in the last minute", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 9, + "x": 12, + "y": 0 + }, + "id": 16, + "links": [ + { + "title": "X Chain dashboard", + "url": "/d/ceRH2Am7z/x-chain?orgId=1" + } + ], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "round(increase(avalanche_X_blks_accepted_count{instance=~\"$host\", job=\"avalanchego\"}[1m]))>0", + "interval": "", + "legendFormat": "Accepted", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "round(increase(avalanche_X_blks_rejected_count{instance=~\"$host\", job=\"avalanchego\"}[1m]))>0", + "hide": false, + "interval": "", + "legendFormat": "Rejected", + "range": true, + "refId": "B" + } + ], + "title": "X Chain Blocks", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Number of X-Chain blocks this node has proposed on the network in the last day. Since block production on P-Chain is usually below the target rate, every node proposes P blocks.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 21, + "y": 0 + }, + "id": 44, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "round(increase(avalanche_X_blks_built{instance=~\"$host\", job=\"avalanchego\"}[1d]))", + "interval": "", + "legendFormat": "Proposed P blocks", + "range": true, + "refId": "A" + } + ], + "title": "Proposed X blocks", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Number of accepted and rejected blocks on the P chain in the last minute.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 9, + "x": 12, + "y": 6 + }, + "id": 21, + "links": [ + { + "title": "P Chain dashboard", + "url": "/d/uWlS20i7z/p-chain?orgId=1" + } + ], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "round(increase(avalanche_P_blks_accepted_count{instance=~\"$host\",job=\"avalanchego\"}[1m]))>0", + "interval": "", + "legendFormat": "Accepted", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "round(increase(avalanche_P_blks_rejected_count{instance=~\"$host\",job=\"avalanchego\"}[1m]))>0", + "hide": false, + "interval": "", + "legendFormat": "Rejected", + "range": true, + "refId": "B" + } + ], + "title": "P Chain Blocks", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Number of P-Chain blocks this node has proposed on the network in the last day. Since block production on P-Chain is usually below the target rate, every node proposes P blocks.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 21, + "y": 6 + }, + "id": 45, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "round(increase(avalanche_P_blks_built{instance=~\"$host\", job=\"avalanchego\"}[1d]))", + "interval": "", + "legendFormat": "Proposed P blocks", + "range": true, + "refId": "A" + } + ], + "title": "Proposed P blocks", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Percentage of CPU used", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "links": [ + { + "title": "Machine details", + "url": "/d/DHT8r2znz/machine-metrics?orgId=1&refresh=10s" + } + ], + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 60 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 0, + "y": 7 + }, + "id": 4, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "text": {} + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "expr": "(1 - avg(irate(node_cpu_seconds_total{instance=~\"$machine\",job=~\"avalanchego-machine\", mode=~\"idle\"}[1m])) by (instance)) * 100", + "interval": "", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "title": "CPU", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Percentage of storage filled", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "links": [ + { + "title": "Detail view", + "url": "/d/DHT8r2znz/machine-metrics?orgId=1&refresh=10s" + } + ], + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 60 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 3, + "y": 7 + }, + "id": 2, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "text": {} + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "expr": "max(((node_filesystem_size_bytes{instance=~\"$machine\", job=~\"avalanchego-machine\", fstype=~\"ext4|vfat\"} - node_filesystem_free_bytes{instance=~\"$machine\", job=~\"avalanchego-machine\", fstype=~\"ext4|vfat\"}) / node_filesystem_size_bytes{instance=~\"$machine\", job=~\"avalanchego-machine\", fstype=~\"ext4|vfat\"}) * 100) by (instance)", + "interval": "", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "title": "Disk Space Used", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Number of currently failing internal health checks", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "max": 4, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 1 + }, + { + "color": "red", + "value": 2 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 6, + "y": 7 + }, + "id": 37, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "text": {} + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "expr": "avalanche_health_checks_failing{instance=~\"$host\", job=\"avalanchego\",tag=\"all\"}", + "interval": "", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "title": "Failing health checks", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Average time to get a response from a peer", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "links": [ + { + "title": "Networking Dashboard", + "url": "/d/jB1TgdZ7z/network?orgId=1&refresh=10s" + } + ], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 500000000 + }, + { + "color": "dark-red", + "value": 1000000000 + } + ] + }, + "unit": "ns" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 9, + "y": 7 + }, + "id": 8, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avalanche_requests_average_latency{instance=~\"$host\"}", + "interval": "", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "title": "Network Latency", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Amount of AVAX currently staked", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 0, + "y": 12 + }, + "id": 34, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value", + "wideLayout": true + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avalanche_P_vm_total_staked{instance=~\"$host\", job=\"avalanchego\"}/1000000000", + "interval": "", + "legendFormat": "AVAX", + "range": true, + "refId": "A" + } + ], + "title": "Total staked", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Amount of network stake node is currently connected to", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + }, + { + "color": "dark-orange", + "value": 0.75 + }, + { + "color": "dark-green", + "value": 0.9 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 3, + "y": 12 + }, + "id": 35, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value", + "wideLayout": true + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "expr": "avalanche_P_percent_connected{instance=~\"$host\", job=\"avalanchego\"}", + "interval": "", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "title": "Stake connected", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Number of peers node is connected to", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 2, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [ + { + "title": "Networking Dashboard", + "url": "/d/jB1TgdZ7z/network?orgId=1&refresh=10s" + } + ], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 6, + "x": 6, + "y": 12 + }, + "id": 6, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "expr": "avalanche_network_peers{instance=~\"$host\", job=\"avalanchego\"}", + "interval": "", + "legendFormat": "Peers", + "range": true, + "refId": "A" + } + ], + "title": "Peer count", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Number of accepted and rejected blocks on the C chain in the last minute.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 9, + "x": 12, + "y": 12 + }, + "id": 23, + "links": [ + { + "title": "C Chain dashboard", + "url": "/d/Gl1I20mnk/c-chain?orgId=1" + } + ], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "round(increase(avalanche_C_blks_accepted_count{instance=~\"$host\", job=\"avalanchego\"}[1m]))>0", + "interval": "", + "legendFormat": "Accepted", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "round(increase(avalanche_C_blks_rejected_count{instance=~\"$host\", job=\"avalanchego\"}[1m]))>0", + "hide": false, + "interval": "", + "legendFormat": "Rejected", + "range": true, + "refId": "B" + } + ], + "title": "C Chain Blocks", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Number of blocks this node has proposed on the C-Chain in the last day. Since C-Chain blocks are produced at a fast rate, block producers are selected by stake weight.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 21, + "y": 12 + }, + "id": 43, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "round(increase(avalanche_C_blks_built{instance=~\"$host\", job=\"avalanchego\"}[1d]))", + "interval": "", + "legendFormat": "Built C blocks", + "range": true, + "refId": "A" + } + ], + "title": "Proposed C blocks", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Number of blocks accepted in the last minute", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "max": 100, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 3, + "x": 0, + "y": 17 + }, + "id": 28, + "options": { + "displayMode": "gradient", + "minVizHeight": 10, + "minVizWidth": 0, + "namePlacement": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true, + "text": {}, + "valueMode": "color" + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "expr": "round(increase(avalanche_X_blks_accepted_count{instance=~\"$host\", job=\"avalanchego\"}[1m]))", + "interval": "", + "legendFormat": "X Chain", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "expr": "round(increase(avalanche_P_blks_accepted_count{instance=~\"$host\", job=\"avalanchego\"}[1m]))", + "hide": false, + "interval": "", + "legendFormat": "P Chain", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "expr": "round(increase(avalanche_C_blks_accepted_count{instance=~\"$host\", job=\"avalanchego\"}[1m]))", + "hide": false, + "interval": "", + "legendFormat": "C Chain", + "range": true, + "refId": "C" + } + ], + "title": "Accepted Blocks", + "type": "bargauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Number of blocks currently being processed by the node", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "max": 100, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 40 + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 3, + "x": 3, + "y": 17 + }, + "id": 18, + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "namePlacement": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true, + "text": {}, + "valueMode": "color" + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "expr": "avalanche_X_blks_processing{instance=~\"$host\", job=\"avalanchego\"}", + "interval": "", + "legendFormat": "X Chain", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "expr": "avalanche_P_blks_processing{instance=~\"$host\", job=\"avalanchego\"}", + "hide": false, + "interval": "", + "legendFormat": "P Chain", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "expr": "avalanche_C_blks_processing{instance=~\"$host\", job=\"avalanchego\"}", + "hide": false, + "interval": "", + "legendFormat": "C Chain", + "range": true, + "refId": "C" + } + ], + "title": "Blocks processing", + "type": "bargauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Number of peers currently being benched (ignored) by the node", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 3, + "x": 6, + "y": 17 + }, + "id": 29, + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "namePlacement": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true, + "text": {}, + "valueMode": "color" + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "expr": "avalanche_X_benchlist_benched_num{instance=~\"$host\", job=\"avalanchego\"}", + "interval": "", + "legendFormat": "X Chain", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "expr": "avalanche_P_benchlist_benched_num{instance=~\"$host\", job=\"avalanchego\"}", + "hide": false, + "interval": "", + "legendFormat": "P Chain", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "expr": "avalanche_C_benchlist_benched_num{instance=~\"$host\", job=\"avalanchego\"}", + "hide": false, + "interval": "", + "legendFormat": "C Chain", + "range": true, + "refId": "C" + } + ], + "title": "Benched nodes", + "type": "bargauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Percentage of successful queries per chain in the last minute", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-RdYlGr" + }, + "mappings": [], + "max": 1, + "min": 0.8, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "yellow", + "value": 90 + }, + { + "color": "green", + "value": 95 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 3, + "x": 9, + "y": 17 + }, + "id": 30, + "options": { + "displayMode": "gradient", + "minVizHeight": 10, + "minVizWidth": 0, + "namePlacement": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true, + "text": {}, + "valueMode": "color" + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "expr": "(increase(avalanche_X_handler_chits_count{instance=~\"$host\", job=\"avalanchego\"}[1m]) + 1) / (increase(avalanche_X_handler_chits_count{instance=~\"$host\", job=\"avalanchego\"}[1m]) + increase(avalanche_X_handler_query_failed_count{instance=~\"$host\", job=\"avalanchego\"}[1m]) + 1)", + "interval": "", + "legendFormat": "X Chain", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "expr": "(increase(avalanche_P_handler_chits_count{instance=~\"$host\", job=\"avalanchego\"}[1m]) + 1) / (increase(avalanche_P_handler_chits_count{instance=~\"$host\", job=\"avalanchego\"}[1m]) + increase(avalanche_P_handler_query_failed_count{instance=~\"$host\", job=\"avalanchego\"}[1m]) + 1)", + "hide": false, + "interval": "", + "legendFormat": "P Chain", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "expr": "(increase(avalanche_C_handler_chits_count{instance=~\"$host\", job=\"avalanchego\"}[1m]) + 1) / (increase(avalanche_C_handler_chits_count{instance=~\"$host\", job=\"avalanchego\"}[1m]) + increase(avalanche_C_handler_query_failed_count{instance=~\"$host\", job=\"avalanchego\"}[1m]) + 1)", + "hide": false, + "interval": "", + "legendFormat": "C Chain", + "range": true, + "refId": "C" + } + ], + "title": "Queries success", + "type": "bargauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "How long each database operation is taking on average", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "ns" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 18 + }, + "id": 32, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_db_put_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_db_put_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "put", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_db_get_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_db_get_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_db_delete_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_db_delete_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "delete", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_db_has_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_db_has_count{instance=~\"$host\",job=~\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "has", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_db_compact_size_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_db_compact_size_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "compact", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_db_batch_put_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_db_batch_put_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch put", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_db_batch_delete_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_db_batch_delete_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch delete", + "range": true, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_db_batch_reset_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_db_batch_reset_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch reset", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_db_batch_replay_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/increase(avalanche_db_batch_replay_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "batch replay", + "range": true, + "refId": "I" + } + ], + "title": "Database Operations Latency", + "type": "timeseries" + } + ], + "refresh": "10s", + "schemaVersion": 38, + "tags": [ + "Avalanche" + ], + "templating": { + "list": [ + { + "current": { + "selected": true, + "text": "34.230.45.70:9100", + "value": "34.230.45.70:9100" + }, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "definition": "label_values(instance)", + "hide": 0, + "includeAll": true, + "multi": false, + "name": "machine", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(instance)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "/9100/", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": true, + "text": "34.230.45.70:9650", + "value": "34.230.45.70:9650" + }, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "definition": "label_values(instance)", + "hide": 0, + "includeAll": true, + "multi": false, + "name": "host", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(instance)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "/9650/", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-3h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Avalanche Main Dashboard", + "uid": "kBQpRdWnk", + "version": 24, + "weekStart": "" +} \ No newline at end of file diff --git a/host/monitoring/dashboards/network.json b/host/monitoring/dashboards/network.json new file mode 100644 index 0000000..e840657 --- /dev/null +++ b/host/monitoring/dashboards/network.json @@ -0,0 +1,5706 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 6, + "links": [ + { + "icon": "external link", + "tags": [ + "Avalanche" + ], + "type": "dashboards" + } + ], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "datasource": { + "type": "prometheus" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 53, + "panels": [], + "title": "General", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Stake weighted average uptime of your node, as reported by network peers. If this falls below 80% node probably won't be rewarded for the current staking period.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "area" + } + }, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + }, + { + "color": "red", + "value": 80 + }, + { + "color": "#EAB839", + "value": 85 + }, + { + "color": "semi-dark-green", + "value": 90 + }, + { + "color": "dark-green", + "value": 95 + }, + { + "color": "dark-green", + "value": 100 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 1 + }, + "id": 59, + "options": { + "legend": { + "calcs": [ + "last", + "min", + "mean" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avalanche_network_node_uptime_weighted_average{instance=~\"$host\",job=\"avalanchego\"}", + "interval": "", + "legendFormat": "Uptime average", + "range": true, + "refId": "A" + } + ], + "title": "Uptime average", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Percentage of the stake that view your node as sufficiently online and correct to vote that node be awarded at the end of the staking period.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "area" + } + }, + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + }, + { + "color": "red", + "value": 60 + }, + { + "color": "#EAB839", + "value": 70 + }, + { + "color": "semi-dark-green", + "value": 80 + }, + { + "color": "dark-green", + "value": 90 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 1 + }, + "id": 61, + "options": { + "legend": { + "calcs": [ + "last", + "min", + "mean" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avalanche_network_node_uptime_rewarding_stake{instance=~\"$host\",job=\"avalanchego\"}", + "interval": "", + "legendFormat": "Rewarding stake", + "range": true, + "refId": "A" + } + ], + "title": "Rewarding stake", + "type": "timeseries" + }, + { + "alert": { + "alertRuleTags": {}, + "conditions": [ + { + "evaluator": { + "params": [ + 100 + ], + "type": "lt" + }, + "operator": { + "type": "and" + }, + "query": { + "params": [ + "B", + "5m", + "now" + ] + }, + "reducer": { + "params": [], + "type": "avg" + }, + "type": "query" + } + ], + "executionErrorState": "alerting", + "for": "2m", + "frequency": "1m", + "handler": 1, + "message": "Peer count is low", + "name": "Peer Count alert", + "noDataState": "no_data", + "notifications": [] + }, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Number of network peers the node is connected to", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 9 + }, + "id": 4, + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.6", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avalanche_network_peers{instance=~\"$host\",job=\"avalanchego\"}", + "format": "time_series", + "interval": "", + "legendFormat": "Peers connected", + "range": true, + "refId": "B" + } + ], + "title": "Peer Count", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Shows the amount of time this node will wait for a response to a request before considering the request failed, and the average time it takes to get a response to a request.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ns" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 8, + "y": 9 + }, + "id": 12, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avalanche_requests_current_timeout{instance=~\"$host\"}", + "interval": "", + "legendFormat": "Timeout", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avalanche_requests_average_latency{instance=~\"$host\"}", + "hide": false, + "interval": "", + "legendFormat": "Response Time", + "range": true, + "refId": "B" + } + ], + "title": "Network Timing", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Number of outstanding requests related to consensus/bootstrapping. Doesn't include handshake messages.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 4, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "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": 8, + "w": 8, + "x": 16, + "y": 9 + }, + "id": 34, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avalanche_requests_outstanding{instance=~\"$host\"}", + "interval": "", + "legendFormat": "Outstanding Requests", + "range": true, + "refId": "A" + } + ], + "title": "Outstanding Requests", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "From all chains", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + }, + { + "color": "red", + "value": 2496 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 17 + }, + "id": 9, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_accepted_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "accepted", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_get_accepted_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get accepted", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_get_accepted_frontier_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get accepted frontier", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_get_ancestors_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get ancestors", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_put_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "put", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_multi_put_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "multiput", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_get_version_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get version", + "range": true, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_get_peerlist_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get peerlist", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_pull_query_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "pull query", + "range": true, + "refId": "I" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_push_query_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "push query", + "range": true, + "refId": "J" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_version_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "version", + "range": true, + "refId": "K" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_ping_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "ping", + "range": true, + "refId": "L" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_pong_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "pong", + "range": true, + "refId": "M" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_get_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get", + "range": true, + "refId": "N" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_chits_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "hide": false, + "interval": "", + "legendFormat": "chits", + "range": true, + "refId": "O" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_app_gossip_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "hide": false, + "interval": "", + "legendFormat": "app gossip", + "range": true, + "refId": "P" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_app_request_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "hide": false, + "interval": "", + "legendFormat": "app request", + "range": true, + "refId": "Q" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_app_response_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "hide": false, + "interval": "", + "legendFormat": "app response", + "range": true, + "refId": "R" + } + ], + "title": "Messages Received per Second", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "From all chains", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + }, + { + "color": "red", + "value": 2500 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 17 + }, + "id": 6, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "rate(avalanche_network_accepted_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "accepted", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "rate(avalanche_network_get_accepted_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get accepted", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "rate(avalanche_network_get_accepted_frontier_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get accepted frontier", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "rate(avalanche_network_get_ancestors_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get ancestors", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "rate(avalanche_network_put_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "put", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "rate(avalanche_network_multi_put_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "multiput", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "rate(avalanche_network_get_version_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get version", + "range": true, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "rate(avalanche_network_get_peerlist_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get peerlist", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "rate(avalanche_network_pull_query_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "pull query", + "range": true, + "refId": "I" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "rate(avalanche_network_push_query_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "push query", + "range": true, + "refId": "J" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "rate(avalanche_network_version_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "version", + "range": true, + "refId": "K" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "rate(avalanche_network_ping_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "ping", + "range": true, + "refId": "L" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "rate(avalanche_network_pong_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "pong", + "range": true, + "refId": "M" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_get_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get", + "range": true, + "refId": "N" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_chits_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "hide": false, + "interval": "", + "legendFormat": "chits", + "range": true, + "refId": "O" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_app_gossip_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "hide": false, + "interval": "", + "legendFormat": "app gossip", + "range": true, + "refId": "P" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_app_request_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "hide": false, + "interval": "", + "legendFormat": "app request", + "range": true, + "refId": "Q" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_app_response_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "hide": false, + "interval": "", + "legendFormat": "app response", + "range": true, + "refId": "R" + } + ], + "title": "Messages Sent per Second", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "From all chains", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisGridShow": true, + "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": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + } + ] + }, + "unit": "binBps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 25 + }, + "id": 62, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.0.3", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_accepted_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "accepted", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_get_accepted_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get accepted", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_get_accepted_frontier_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get accepted frontier", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_get_ancestors_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get ancestors", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_put_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "put", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_multi_put_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "multiput", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_get_version_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get version", + "range": true, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_get_peerlist_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get peerlist", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_pull_query_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "pull query", + "range": true, + "refId": "I" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_push_query_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "push query", + "range": true, + "refId": "J" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_version_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "version", + "range": true, + "refId": "K" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_ping_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "ping", + "range": true, + "refId": "L" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_pong_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "pong", + "range": true, + "refId": "M" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_get_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get", + "range": true, + "refId": "N" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_chits_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "hide": false, + "interval": "", + "legendFormat": "chits", + "range": true, + "refId": "O" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_app_gossip_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "hide": false, + "interval": "", + "legendFormat": "app gossip", + "range": true, + "refId": "P" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_app_request_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "hide": false, + "interval": "", + "legendFormat": "app request", + "range": true, + "refId": "Q" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_app_response_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "hide": false, + "interval": "", + "legendFormat": "app response", + "range": true, + "refId": "R" + } + ], + "title": "Messages Received Bandwidth", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "From all chains", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisGridShow": true, + "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": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + } + ] + }, + "unit": "binBps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 25 + }, + "id": 63, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.0.3", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_accepted_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "accepted", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_get_accepted_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get accepted", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_get_accepted_frontier_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get accepted frontier", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_get_ancestors_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get ancestors", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_put_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "put", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_multi_put_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "multiput", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_get_version_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get version", + "range": true, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_get_peerlist_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get peerlist", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_pull_query_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "pull query", + "range": true, + "refId": "I" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_push_query_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "push query", + "range": true, + "refId": "J" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_version_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "version", + "range": true, + "refId": "K" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_ping_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "ping", + "range": true, + "refId": "L" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_pong_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "pong", + "range": true, + "refId": "M" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_get_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get", + "range": true, + "refId": "N" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_chits_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "hide": false, + "interval": "", + "legendFormat": "chits", + "range": true, + "refId": "O" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_app_gossip_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "hide": false, + "interval": "", + "legendFormat": "app gossip", + "range": true, + "refId": "P" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_app_request_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "hide": false, + "interval": "", + "legendFormat": "app request", + "range": true, + "refId": "Q" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_app_response_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "hide": false, + "interval": "", + "legendFormat": "app response", + "range": true, + "refId": "R" + } + ], + "title": "Messages Sent Bandwidth", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "From all chains", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisGridShow": true, + "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": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 33 + }, + "id": 64, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.0.3", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_accepted_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_accepted_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "accepted", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_get_accepted_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_get_accepted_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get accepted", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_get_accepted_frontier_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_get_accepted_frontier_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get accepted frontier", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_get_ancestors_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_get_ancestors_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get ancestors", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_put_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_put_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "put", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_multi_put_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_multi_put_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "multiput", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_get_version_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_get_version_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get version", + "range": true, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_get_peerlist_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_get_peerlist_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get peerlist", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_pull_query_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_pull_query_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "pull query", + "range": true, + "refId": "I" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_push_query_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_push_query_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "push query", + "range": true, + "refId": "J" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_version_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_version_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "version", + "range": true, + "refId": "K" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_ping_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_ping_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "ping", + "range": true, + "refId": "L" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_pong_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_pong_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "pong", + "range": true, + "refId": "M" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_get_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_get_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get", + "range": true, + "refId": "N" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_chits_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_chits_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "hide": false, + "interval": "", + "legendFormat": "chits", + "range": true, + "refId": "O" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_app_gossip_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_app_gossip_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "hide": false, + "interval": "", + "legendFormat": "app gossip", + "range": true, + "refId": "P" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_app_request_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_app_request_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "hide": false, + "interval": "", + "legendFormat": "app request", + "range": true, + "refId": "Q" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_app_response_received_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_app_response_received{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "hide": false, + "interval": "", + "legendFormat": "app response", + "range": true, + "refId": "R" + } + ], + "title": "Average Received Message Size", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "From all chains", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisGridShow": true, + "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": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 33 + }, + "id": 65, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.0.3", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_accepted_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_accepted_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "accepted", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_get_accepted_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_get_accepted_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get accepted", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_get_accepted_frontier_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_get_accepted_frontier_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get accepted frontier", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_get_ancestors_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_get_ancestors_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get ancestors", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_put_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_put_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "put", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_multi_put_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_multi_put_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "multiput", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_get_version_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_get_version_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get version", + "range": true, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_get_peerlist_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_get_peerlist_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get peerlist", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_pull_query_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_pull_query_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "pull query", + "range": true, + "refId": "I" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_push_query_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_push_query_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "push query", + "range": true, + "refId": "J" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_version_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_version_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "version", + "range": true, + "refId": "K" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_ping_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_ping_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "ping", + "range": true, + "refId": "L" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_pong_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_pong_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "pong", + "range": true, + "refId": "M" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_get_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_get_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get", + "range": true, + "refId": "N" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_chits_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_chits_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "hide": false, + "interval": "", + "legendFormat": "chits", + "range": true, + "refId": "O" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_app_gossip_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_app_gossip_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "hide": false, + "interval": "", + "legendFormat": "app gossip", + "range": true, + "refId": "P" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_app_request_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_app_request_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "hide": false, + "interval": "", + "legendFormat": "app request", + "range": true, + "refId": "Q" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_app_response_sent_bytes{instance=~\"$host\",job=\"avalanchego\"}[1m])/increase(avalanche_network_app_response_sent{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "hide": false, + "interval": "", + "legendFormat": "app response", + "range": true, + "refId": "R" + } + ], + "title": "Average Sent Message Size", + "type": "timeseries" + }, + { + "datasource": { + "type": "__expr__", + "uid": "__expr__" + }, + "description": "Considers the X-Chain, P-Chain and C-Chain. A lower value indicates vote pipelining (good.) A higher value indicates failed polls (not good.)", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "__systemRef": "hideSeriesFrom", + "matcher": { + "id": "byNames", + "options": { + "mode": "exclude", + "names": [ + "Queries per Accepted Container {instance=\"localhost:9650\", job=\"avalanchego\"}" + ], + "prefix": "All except:", + "readOnly": true + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": false, + "tooltip": false, + "viz": true + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 41 + }, + "id": 45, + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "last" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.3", + "targets": [ + { + "datasource": "Prometheus", + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_pull_query_sent{job=\"avalanchego\"}[5m])", + "hide": true, + "interval": "", + "legendFormat": "pull query", + "range": true, + "refId": "A" + }, + { + "datasource": "Prometheus", + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_push_query_sent{job=\"avalanchego\"}[5m])", + "hide": true, + "interval": "", + "legendFormat": "push query", + "range": true, + "refId": "B" + }, + { + "datasource": "Prometheus", + "exemplar": true, + "expr": "increase(avalanche_X_blks_accepted_count{job=\"avalanchego\"}[5m]) ", + "hide": true, + "interval": "", + "legendFormat": "", + "refId": "C" + }, + { + "datasource": "Prometheus", + "exemplar": true, + "expr": "increase(avalanche_C_blks_accepted_count{job=\"avalanchego\"}[5m]) ", + "hide": true, + "interval": "", + "legendFormat": "", + "refId": "D" + }, + { + "datasource": "Prometheus", + "exemplar": true, + "expr": "increase(avalanche_P_blks_accepted_count{job=\"avalanchego\"}[5m])", + "hide": true, + "interval": "", + "legendFormat": "", + "refId": "E" + }, + { + "datasource": { + "type": "__expr__", + "uid": "__expr__" + }, + "expression": "($A + $B) / ($C + $D + $E)", + "hide": false, + "refId": "Queries per Accepted Container", + "type": "math" + } + ], + "title": "Queries Sent per Accepted Container", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Number of messages that are queued to be sent to peers", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "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": 8, + "w": 6, + "x": 6, + "y": 41 + }, + "id": 29, + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "last" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avalanche_network_throttler_outbound_awaiting_release{instance=~\"$host\"}", + "interval": "", + "legendFormat": "Messages", + "range": true, + "refId": "A" + } + ], + "title": "Messages Awaiting Send", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Amount of the stake in AVAX that is benched (ignored) because the nodes are unhealthy", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 41 + }, + "id": 14, + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "last" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "avalanche_X_benchlist_benched_weight{instance=~\"$host\"}/1000000000", + "interval": "", + "legendFormat": "X chain", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "avalanche_P_benchlist_benched_weight{instance=~\"$host\"}/1000000000", + "hide": false, + "interval": "", + "legendFormat": "P Chain", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "avalanche_C_benchlist_benched_weight{instance=~\"$host\"}/1000000000", + "hide": false, + "interval": "", + "legendFormat": "C Chain", + "range": true, + "refId": "C" + } + ], + "title": "Benched stake", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 49 + }, + "id": 48, + "panels": [], + "title": "Inbound Throttling", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Number of messages waiting to acquire bytes from the inbound message throttler.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "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": 8, + "w": 8, + "x": 0, + "y": 50 + }, + "id": 18, + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "last" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avalanche_network_byte_throttler_inbound_awaiting_acquire{instance=~\"$host\"}", + "interval": "", + "legendFormat": "Messages Awaiting Acquire", + "range": true, + "refId": "A" + } + ], + "title": "Inbound Byte Throttler Awaiting Acquire", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Number of bytes left in the validator byte allocation of the inbound message throttler", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "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": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 8, + "y": 50 + }, + "id": 23, + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "last" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avalanche_network_byte_throttler_inbound_remaining_validator_bytes{instance=~\"$host\"}", + "interval": "", + "legendFormat": "Bytes Remaining", + "range": true, + "refId": "A" + } + ], + "title": "Inbound Byte Throttler Remaining Validator Bytyes", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "The amount of time, on average, that we wait to acquire bytes from the throttler before reading a message.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "ns" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 50 + }, + "id": 16, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_byte_throttler_inbound_acquire_latency_sum{instance=~\"$host\"}[2m])/increase(avalanche_network_byte_throttler_inbound_acquire_latency_count{instance=~\"$host\"}[2m])", + "interval": "", + "legendFormat": "Acquire", + "range": true, + "refId": "A" + } + ], + "title": "Inbound Byte Throttler Acquire Latency", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "The amount of time, on average, that we wait to acquire from the throttler before reading a message.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "ns" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 58 + }, + "id": 50, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_buffer_throttler_inbound_acquire_latency_sum{instance=~\"$host\"}[2m])/increase(avalanche_network_buffer_throttler_inbound_acquire_latency_count{instance=~\"$host\"}[2m])", + "interval": "", + "legendFormat": "Acquire", + "range": true, + "refId": "A" + } + ], + "title": "Inbound Buffer Throttler Acquire Latency", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Number of messages that are currently being handled and haven't yet returned their bytes to the inbound message throttler.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "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": 8, + "w": 8, + "x": 8, + "y": 58 + }, + "id": 20, + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "last" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avalanche_network_byte_throttler_inbound_awaiting_release{instance=~\"$host\"}", + "interval": "", + "legendFormat": "Messages Awaiting Release", + "range": true, + "refId": "A" + } + ], + "title": "Inbound Byte Throttler Awaiting Release (Messages Processing)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Number of messages waiting to acquire from the inbound message buffer throttler.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "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": 8, + "w": 8, + "x": 16, + "y": 58 + }, + "id": 49, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avalanche_network_buffer_throttler_inbound_awaiting_acquire{instance=~\"$host\"}", + "interval": "", + "legendFormat": "Messages Awaiting", + "range": true, + "refId": "A" + } + ], + "title": "Inbound Buffer Throttler Awaiting Acquire", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Number of bytes left in the at-large byte allocation of the inbound message throttler", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 66 + }, + "id": 22, + "options": { + "legend": { + "calcs": [ + "mean", + "min" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avalanche_network_byte_throttler_inbound_remaining_at_large_bytes{instance=~\"$host\"}", + "interval": "", + "legendFormat": "Remaining Bytes", + "range": true, + "refId": "A" + } + ], + "title": "Inbound Byte Throttler Remaining At-Large Bytes", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Number of messages waiting to acquire bytes from the inbound bandwidth throttler.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "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": 8, + "w": 8, + "x": 8, + "y": 66 + }, + "id": 60, + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "last" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avalanche_network_bandwidth_throttler_inbound_awaiting_acquire{instance=~\"$host\"}", + "interval": "", + "legendFormat": "Messages Awaiting Acquire", + "range": true, + "refId": "A" + } + ], + "title": "Inbound Bandwidth Throttler Awaiting Acquire", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 74 + }, + "id": 28, + "panels": [], + "title": "Outbound Throttling", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Number of bytes left in the at-large byte allocation of the outbound message throttler", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 75 + }, + "id": 30, + "options": { + "legend": { + "calcs": [ + "mean", + "min" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avalanche_network_throttler_outbound_remaining_at_large_bytes{instance=~\"$host\"}", + "interval": "", + "legendFormat": "Bytes Remaining", + "range": true, + "refId": "A" + } + ], + "title": "Outbound Throttler Remaining At-Large Bytyes", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Number of bytes left in the validator byte allocation of the outbound message throttler", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 75 + }, + "id": 31, + "options": { + "legend": { + "calcs": [ + "mean", + "min" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avalanche_network_throttler_outbound_remaining_validator_bytes{instance=~\"$host\"}", + "interval": "", + "legendFormat": "Bytes Remaining", + "range": true, + "refId": "A" + } + ], + "title": "Outbound Throttler Remaining Validator Bytyes", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 83 + }, + "id": 57, + "panels": [], + "title": "Failures", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "From all chains", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + }, + { + "color": "red", + "value": 2500 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 84 + }, + "id": 10, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_accepted_failed{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "accepted", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_get_accepted_failed{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get accepted", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_get_accepted_frontier_failed{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get accepted frontier", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_get_ancestors_failed{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get ancestors", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_put_failed{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "put", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_multi_put_failed{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "multiput", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_get_version_failed{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get version", + "range": true, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_get_peerlist_failed{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "get peerlist", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_pull_query_failed{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "pull query", + "range": true, + "refId": "I" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_push_query_failed{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "push query", + "range": true, + "refId": "J" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_version_failed{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "version", + "range": true, + "refId": "K" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_ping_failed{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "ping", + "range": true, + "refId": "L" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_pong_failed{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "interval": "", + "legendFormat": "pong", + "range": true, + "refId": "M" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_chits_failed{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "hide": false, + "interval": "", + "legendFormat": "chits", + "range": true, + "refId": "N" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_app_gossip_failed{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "hide": false, + "interval": "", + "legendFormat": "app gossip", + "range": true, + "refId": "O" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_app_request_failed{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "hide": false, + "interval": "", + "legendFormat": "app request", + "range": true, + "refId": "P" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_app_response_failed{instance=~\"$host\",job=\"avalanchego\"}[1m])", + "hide": false, + "interval": "", + "legendFormat": "app response", + "range": true, + "refId": "Q" + } + ], + "title": "Messages Failed To Send per Second", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Number of messages that could not be parsed because they were of unknown type or invalidly formatted.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 84 + }, + "id": 25, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_msgs_failed_to_parse{instance=~\"$host\"}[1m])>0", + "interval": "", + "legendFormat": "Failed to Parse", + "range": true, + "refId": "A" + } + ], + "title": "Messages Failed To Parse per Minute", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Number of inbound messages dropped (not processed) due to expiration in last minute.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "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": 8, + "w": 8, + "x": 0, + "y": 92 + }, + "id": 32, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_P_handler_expired{instance=~\"$host\"}[1m])+increase(avalanche_C_handler_expired{instance=~\"$host\"}[1m])+increase(avalanche_X_handler_expired{instance=~\"$host\"}[1m])", + "interval": "", + "legendFormat": "Messages Dropped", + "range": true, + "refId": "A" + } + ], + "title": "Inbound Messages Dropped in Last Minute", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Number of outbound messages dropped (not sent) due to rate-limiting in the last minute", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 8, + "y": 92 + }, + "id": 26, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_throttler_outbound_acquire_failures{instance=~\"$host\"}[1m])", + "interval": "", + "legendFormat": "Messages Dropped", + "range": true, + "refId": "A" + } + ], + "title": "Outbound Messages Dropped in Last Minute", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Number of inbound connections dropped due to inbound connection rate-limiting", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 92 + }, + "id": 36, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_network_inbound_conn_throttler_rate_limited{instance=~\"$host\"}[1m])", + "interval": "", + "legendFormat": "Rate-Limited", + "range": true, + "refId": "A" + } + ], + "title": "Inbound Connections Dropped due to Rate-Limiting per Minute", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 100 + }, + "id": 55, + "panels": [], + "title": "Compression", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ns" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 101 + }, + "id": 39, + "options": { + "legend": { + "calcs": [ + "max", + "mean" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "(increase(avalanche_network_codec_gzip_push_query_compress_time_sum{instance=~\"$host\"}[5m])+1)/(increase(avalanche_network_codec_gzip_push_query_compress_time_count{instance=~\"$host\"}[5m])+1)", + "hide": false, + "interval": "", + "legendFormat": "Push Query", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "(increase(avalanche_network_codec_gzip_put_compress_time_sum{instance=~\"$host\"}[5m])+1)/(increase(avalanche_network_codec_gzip_put_compress_time_count{instance=~\"$host\"}[5m])+1)", + "hide": false, + "interval": "", + "legendFormat": "Put", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "(increase(avalanche_network_codec_gzip_peerlist_compress_time_sum{instance=~\"$host\"}[5m])+1)/(increase(avalanche_network_codec_gzip_peerlist_compress_time_count{instance=~\"$host\"}[5m])+1)", + "hide": false, + "interval": "", + "legendFormat": "Peer List", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "(increase(avalanche_network_codec_gzip_app_gossip_compress_time_sum{instance=~\"$host\"}[5m])+1)/(increase(avalanche_network_codec_gzip_app_gossip_compress_time_count{instance=~\"$host\"}[5m])+1)", + "hide": false, + "interval": "", + "legendFormat": "App Gossip", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "(increase(avalanche_network_codec_gzip_app_request_compress_time_sum{instance=~\"$host\"}[5m])+1)/(increase(avalanche_network_codec_gzip_app_request_compress_time_count{instance=~\"$host\"}[5m])+1)", + "hide": false, + "interval": "", + "legendFormat": "App Request", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "(increase(avalanche_network_codec_app_gzip_response_compress_time_sum{instance=~\"$host\"}[5m])+1)/(increase(avalanche_network_codec_gzip_app_response_compress_time_count{instance=~\"$host\"}[5m])+1)", + "hide": false, + "interval": "", + "legendFormat": "App Response", + "range": true, + "refId": "G" + } + ], + "title": "Average Message Compression Time (gzip codec)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ns" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 101 + }, + "id": 66, + "options": { + "legend": { + "calcs": [ + "max", + "mean" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "(increase(avalanche_network_codec_gzip_push_query_compress_time_sum{instance=~\"$host\"}[5m])+1)/(increase(avalanche_network_codec_gzip_push_query_compress_time_count{instance=~\"$host\"}[5m])+1)", + "hide": false, + "interval": "", + "legendFormat": "Push Query", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "(increase(avalanche_network_codec_gzip_put_compress_time_sum{instance=~\"$host\"}[5m])+1)/(increase(avalanche_network_codec_gzip_put_compress_time_count{instance=~\"$host\"}[5m])+1)", + "hide": false, + "interval": "", + "legendFormat": "Put", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "(increase(avalanche_network_codec_gzip_peerlist_compress_time_sum{instance=~\"$host\"}[5m])+1)/(increase(avalanche_network_codec_gzip_peerlist_compress_time_count{instance=~\"$host\"}[5m])+1)", + "hide": false, + "interval": "", + "legendFormat": "Peer List", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "(increase(avalanche_network_codec_gzip_app_gossip_compress_time_sum{instance=~\"$host\"}[5m])+1)/(increase(avalanche_network_codec_gzip_app_gossip_compress_time_count{instance=~\"$host\"}[5m])+1)", + "hide": false, + "interval": "", + "legendFormat": "App Gossip", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "(increase(avalanche_network_codec_gzip_app_request_compress_time_sum{instance=~\"$host\"}[5m])+1)/(increase(avalanche_network_codec_gzip_app_request_compress_time_count{instance=~\"$host\"}[5m])+1)", + "hide": false, + "interval": "", + "legendFormat": "App Request", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "(increase(avalanche_network_codec_app_gzip_response_compress_time_sum{instance=~\"$host\"}[5m])+1)/(increase(avalanche_network_codec_gzip_app_response_compress_time_count{instance=~\"$host\"}[5m])+1)", + "hide": false, + "interval": "", + "legendFormat": "App Response", + "range": true, + "refId": "G" + } + ], + "title": "Average Message Compression Time (gzip codec)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ns" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 109 + }, + "id": 46, + "options": { + "legend": { + "calcs": [ + "max", + "mean" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_codec_zstd_push_query_compress_time_sum{instance=~\"$host\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "Push Query", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_codec_zstd_put_compress_time_sum{instance=~\"$host\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "Put", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_codec_zstd_peerlist_compress_time_sum{instance=~\"$host\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "Peer List", + "range": true, + "refId": "I" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_codec_zstd_app_gossip_compress_time_sum{instance=~\"$host\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "App Gossip", + "range": true, + "refId": "J" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_codec_zstd_app_request_compress_time_sum{instance=~\"$host\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "App Request", + "range": true, + "refId": "K" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_codec_zstd_app_response_compress_time_sum{instance=~\"$host\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "App Response", + "range": true, + "refId": "L" + } + ], + "title": "Total Message Compression Time per Second (zstd codec)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ns" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 109 + }, + "id": 67, + "options": { + "legend": { + "calcs": [ + "max", + "mean" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Mean", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "(increase(avalanche_network_codec_zstd_push_query_compress_time_sum{instance=~\"$host\"}[5m])+1)/(increase(avalanche_network_codec_zstd_push_query_compress_time_count{instance=~\"$host\"}[5m])+1)", + "hide": false, + "interval": "", + "legendFormat": "Push Query", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "(increase(avalanche_network_codec_zstd_put_compress_time_sum{instance=~\"$host\"}[5m])+1)/(increase(avalanche_network_codec_zstd_put_compress_time_count{instance=~\"$host\"}[5m])+1)", + "hide": false, + "interval": "", + "legendFormat": "Put", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "(increase(avalanche_network_codec_zstd_peerlist_compress_time_sum{instance=~\"$host\"}[5m])+1)/(increase(avalanche_network_codec_zstd_peerlist_compress_time_count{instance=~\"$host\"}[5m])+1)", + "hide": false, + "interval": "", + "legendFormat": "Peer List", + "range": true, + "refId": "I" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "(increase(avalanche_network_codec_zstd_app_gossip_compress_time_sum{instance=~\"$host\"}[5m])+1)/(increase(avalanche_network_codec_zstd_app_gossip_compress_time_count{instance=~\"$host\"}[5m])+1)", + "hide": false, + "interval": "", + "legendFormat": "App Gossip", + "range": true, + "refId": "J" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "(increase(avalanche_network_codec_zstd_app_request_compress_time_sum{instance=~\"$host\"}[5m])+1)/(increase(avalanche_network_codec_zstd_app_request_compress_time_count{instance=~\"$host\"}[5m])+1)", + "hide": false, + "interval": "", + "legendFormat": "App Request", + "range": true, + "refId": "K" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "(increase(avalanche_network_codec_app_zstd_response_compress_time_sum{instance=~\"$host\"}[5m])+1)/(increase(avalanche_network_codec_zstd_app_response_compress_time_count{instance=~\"$host\"}[5m])+1)", + "hide": false, + "interval": "", + "legendFormat": "App Response", + "range": true, + "refId": "L" + } + ], + "title": "Average Message Compression Time (zstd codec)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Rate at which we save bytes (don't send/receive them over the network) by compressing messages/receiving compressed messages.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "Bps" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 24, + "x": 0, + "y": 117 + }, + "id": 38, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_multi_put_compression_saved_received_bytes_sum{instance=~\"$host\"}[5m])", + "interval": "", + "legendFormat": "Inbound Multiput", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_multi_put_compression_saved_sent_bytes_sum{instance=~\"$host\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "Outbound Multiput", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_put_compression_saved_received_bytes_sum{instance=~\"$host\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "Inbound Put", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_put_compression_saved_sent_bytes_sum{instance=~\"$host\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "Outbound Put", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_push_query_compression_saved_received_bytes_sum{instance=~\"$host\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "Inbound Push Query", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_push_query_compression_saved_sent_bytes_sum{instance=~\"$host\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "Outbound Push Query", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_peerlist_compression_saved_received_bytes_sum{instance=~\"$host\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "Inbound Peer List", + "range": true, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_peerlist_compression_saved_sent_bytes_sum{instance=~\"$host\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "Outbound Peer List", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_app_gossip_compression_saved_received_bytes_sum{instance=~\"$host\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "Inbound App Gossip", + "range": true, + "refId": "I" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_app_gossip_compression_saved_sent_bytes_sum{instance=~\"$host\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "Outbound App Gossip", + "range": true, + "refId": "J" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_app_request_compression_saved_received_bytes_sum{instance=~\"$host\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "Inbound App Request", + "range": true, + "refId": "K" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_app_request_compression_saved_sent_bytes_sum{instance=~\"$host\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "Outbound App Request", + "range": true, + "refId": "L" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_app_response_compression_saved_received_bytes_sum{instance=~\"$host\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "Inbound App Response", + "range": true, + "refId": "M" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_network_app_response_compression_saved_sent_bytes_sum{instance=~\"$host\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "Outbound App Response", + "range": true, + "refId": "N" + } + ], + "title": "Bytes Saved by Compression", + "type": "timeseries" + } + ], + "refresh": "10s", + "schemaVersion": 38, + "tags": [ + "Avalanche" + ], + "templating": { + "list": [ + { + "current": { + "selected": true, + "text": "184.73.245.13:9650", + "value": "184.73.245.13:9650" + }, + "definition": "label_values(instance)", + "hide": 0, + "includeAll": true, + "multi": false, + "name": "host", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(instance)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "/9650/", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-3h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Network", + "uid": "jB1TgdZ7z", + "version": 32, + "weekStart": "" +} \ No newline at end of file diff --git a/host/monitoring/dashboards/p_chain.json b/host/monitoring/dashboards/p_chain.json new file mode 100644 index 0000000..7269883 --- /dev/null +++ b/host/monitoring/dashboards/p_chain.json @@ -0,0 +1,2018 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 7, + "links": [ + { + "icon": "external link", + "tags": [ + "Avalanche" + ], + "type": "dashboards" + } + ], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 21, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "round(increase(avalanche_P_blks_accepted_count{instance=~\"$host\",job=\"avalanchego\"}[1m]))>0", + "interval": "", + "legendFormat": "Accepted", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "round(increase(avalanche_P_blks_acc_count{instance=~\"$host\",job=\"avalanchego\"}[1m]))>0", + "hide": false, + "interval": "", + "legendFormat": "", + "range": true, + "refId": "B" + } + ], + "title": "Accepted Blocks in Last Minute", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 15, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "round(increase(avalanche_P_blks_rejected_count{instance=~\"$host\",job=\"avalanchego\"}[1m]))>0", + "interval": "", + "legendFormat": "Rejected", + "range": true, + "refId": "A" + } + ], + "title": "Rejected Blocks in Last Minute", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "The average time between a block's issuance and acceptance by this node over the last 5 minutes.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + } + ] + }, + "unit": "ns" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 23, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "rate(avalanche_P_blks_accepted_sum{instance=~\"$host\",job=\"avalanchego\"}[5m]) / rate(avalanche_P_blks_accepted_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "Avg Acceptance Latency", + "range": true, + "refId": "A" + } + ], + "title": "Average Block Acceptance Latency", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "The average time between a block's issuance and rejection by this node over the last 5 minutes.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + } + ] + }, + "unit": "ns" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 25, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_blks_rejected_sum{instance=~\"$host\",job=\"avalanchego\"}[5m]) / rate(avalanche_P_blks_rejected_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "Rejection Latency", + "range": true, + "refId": "A" + } + ], + "title": "Average Block Rejection Latency", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Transactions", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + }, + { + "color": "red", + "value": 500 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 16 + }, + "id": 9, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "avalanche_P_blks_processing{instance=~\"$host\",job=\"avalanchego\"}", + "interval": "", + "legendFormat": "Transactions", + "range": true, + "refId": "A" + } + ], + "title": "Processing Blocks", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Percentage of queries for which we receive chits on time.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "transparent", + "value": 0.85 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 16 + }, + "id": 11, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "min" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "(increase(avalanche_P_handler_chits_count{instance=~\"$host\",job=\"avalanchego\"}[5m]) + 1) / (increase(avalanche_P_handler_chits_count{instance=~\"$host\",job=\"avalanchego\"}[5m]) + increase(avalanche_P_handler_query_failed_count{instance=~\"$host\",job=\"avalanchego\"}[5m]) + 1)", + "instant": false, + "interval": "", + "legendFormat": "% Successful", + "refId": "A" + } + ], + "title": "Percentage of Successful Queries", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Measures how much of each second is being spent handling different kinds of messages on the P-Chain.\nThe value for chits, for example, is the number of seconds spent handling chits messages per second, over the last 30 seconds.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "seconds/second", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ns" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 24 + }, + "id": 5, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_pull_query_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "pull query", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_push_query_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "push query", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_chits_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "chits", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_accepted_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "accepted", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_get_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_put_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "put", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_multiput_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "multiput", + "range": true, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_get_ancestors_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get ancestors", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_get_failed_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get failed", + "range": true, + "refId": "I" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_query_failed_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "query failed", + "range": true, + "refId": "J" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_get_accepted_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get accepted", + "range": true, + "refId": "K" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_get_ancestors_failed_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get ancestors failed", + "range": true, + "refId": "L" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_app_request_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app request ", + "range": true, + "refId": "N" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_app_request_failed_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app request failed ", + "range": true, + "refId": "M" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_app_response_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app response", + "range": true, + "refId": "O" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_app_gossip_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app gossip", + "range": true, + "refId": "P" + } + ], + "title": "Message Handling Time (Total)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Measures how long each kind of request on the P-Chain takes to handle.\nThe value for chits, for example, is how long, in seconds, it takes to handle a chits message.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "seconds", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ns" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 24 + }, + "id": 7, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_pull_query_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_P_handler_pull_query_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "pull query", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_push_query_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_P_handler_push_query_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "push query", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_chits_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_P_handler_chits_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "chits", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_accepted_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_P_handler_accepted_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "accepted", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_get_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_P_handler_get_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_put_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_P_handler_put_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "put", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_multiput_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_P_handler_multi_put_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "multiput", + "range": true, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_get_ancestors_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_P_handler_get_ancestors_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get ancestors", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_get_failed_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_P_handler_get_failed_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get failed", + "range": true, + "refId": "I" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_query_failed_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_P_handler_query_failed_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "query failed", + "range": true, + "refId": "J" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_get_accepted_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_P_handler_get_accepted_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get accepted", + "range": true, + "refId": "K" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_get_ancestors_failed_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_P_handler_get_ancestors_failed_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get ancestors failed", + "range": true, + "refId": "L" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_app_request_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_P_handler_app_request_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app request", + "range": true, + "refId": "M" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_app_request_failed_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_P_handler_app_request_failed_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app request failed", + "range": true, + "refId": "N" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_app_gossip_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_P_handler_app_gossip_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app gossip", + "range": true, + "refId": "O" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_app_response_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_P_handler_app_response_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app response", + "range": true, + "refId": "P" + } + ], + "title": "Message Handling Time (per Message)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "The total stake of validators currently \"benched\" due to poor query responsiveness. Queries to these validators will immediately timeout until they are removed from the \"bench.\"", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 33 + }, + "id": 29, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avg_over_time(avalanche_P_benchlist_benched_weight{instance=~\"$host\",job=\"avalanchego\"}[15m]) / 10^9", + "interval": "", + "legendFormat": "AVAX Benched", + "range": true, + "refId": "A" + } + ], + "title": "AVAX Benched", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Measures how many of each kind of message are received per second on the P-Chain.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Messages received/s", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 33 + }, + "id": 6, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_pull_query_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "pull query", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_push_query_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "push query", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_chits_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "chits", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_accepted_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "accepted", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_get_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_put_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "put", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_multi_put_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "multiput", + "range": true, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_get_ancestors_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get ancestors", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_get_failed_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get failed", + "range": true, + "refId": "I" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_query_failed_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "query failed", + "range": true, + "refId": "J" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_get_accepted_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get accepted", + "range": true, + "refId": "K" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_get_ancestors_failed_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get ancestors failed", + "range": true, + "refId": "L" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_app_request_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app request", + "range": true, + "refId": "P" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_app_request_failed_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app request failed", + "range": true, + "refId": "M" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_app_response_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app response", + "range": true, + "refId": "N" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_P_handler_app_gossip_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app gossip", + "range": true, + "refId": "O" + } + ], + "title": "Messages Received per Second", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 42 + }, + "id": 35, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_P_vm_block_cache_hit{instance=~\"$host\"}[5m])/(increase(avalanche_P_vm_block_cache_hit{instance=~\"$host\"}[5m])+increase(avalanche_P_vm_block_cache_miss{instance=~\"$host\"}[5m]))", + "interval": "", + "legendFormat": "Hit Rate", + "range": true, + "refId": "A" + } + ], + "title": "Block Cache Hit Rate", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 50 + }, + "id": 19, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avalanche_P_handler_unprocessed_msgs_len{instance=~\"$host\"}", + "interval": "", + "legendFormat": "Pending Messages", + "range": true, + "refId": "A" + } + ], + "title": "Unprocessed Incoming Messages", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 50 + }, + "id": 33, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.1.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "increase(avalanche_P_handler_expired{instance=~\"$host\"}[1m])", + "interval": "", + "legendFormat": "Expired", + "range": true, + "refId": "A" + } + ], + "title": "Incoming Messages Expired in Last Minute", + "type": "timeseries" + } + ], + "refresh": "10s", + "schemaVersion": 38, + "tags": [ + "Avalanche" + ], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "184.73.245.13:9650", + "value": "184.73.245.13:9650" + }, + "definition": "label_values(instance)", + "hide": 0, + "includeAll": true, + "multi": false, + "name": "host", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(instance)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "/9650/", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-24h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "P-Chain", + "uid": "uWlS20i7z", + "version": 15, + "weekStart": "" +} \ No newline at end of file diff --git a/host/monitoring/dashboards/subnets.json b/host/monitoring/dashboards/subnets.json new file mode 100644 index 0000000..e0fdf3b --- /dev/null +++ b/host/monitoring/dashboards/subnets.json @@ -0,0 +1,1930 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 8, + "iteration": 1646940220385, + "links": [ + { + "icon": "external link", + "tags": [ + "Avalanche" + ], + "type": "dashboards" + } + ], + "liveNow": false, + "panels": [ + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 15, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "exemplar": true, + "expr": "round(increase(avalanche_${subnet}_blks_accepted_count{job=\"avalanchego\"}[1m]))>0", + "interval": "", + "legendFormat": "Accepted", + "refId": "A" + } + ], + "title": "Accepted Blocks in Last Minute", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 20, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "exemplar": true, + "expr": "round(increase(avalanche_${subnet}_blks_rejected_count{job=\"avalanchego\"}[1m]))>0", + "interval": "", + "legendFormat": "Rejected", + "refId": "A" + } + ], + "title": "Rejected Blocks in Last Minute", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus" + }, + "description": "The average time between a block's issuance and acceptance by this node over the last 5 minutes.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + } + ] + }, + "unit": "ns" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 22, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "expr": "rate(avalanche_${subnet}_blks_accepted_sum{job=\"avalanchego\"}[5m]) / rate(avalanche_${subnet}_blks_accepted_count{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "Avg Acceptance Latency", + "refId": "A" + } + ], + "title": "Average Block Acceptance Latency", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus" + }, + "description": "The average time between a block's issuance and rejection by this node over the last 5 minutes.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ns" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 23, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "expr": "rate(avalanche_${subnet}_blks_rejected_sum{job=\"avalanchego\"}[5m]) / rate(avalanche_${subnet}_blks_rejected_count{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "Avg Rejection Latency", + "refId": "A" + } + ], + "title": "Average Block Rejection Latency", + "type": "timeseries" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "Transactions", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "mappings": [], + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 16 + }, + "id": 9, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "exemplar": true, + "expr": "avalanche_${subnet}_blks_processing{job=\"avalanchego\"}>0", + "interval": "", + "legendFormat": "Transactions", + "refId": "A" + } + ], + "title": "Processing Blocks", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "Incomplete Polls", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 16 + }, + "id": 39, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "exemplar": true, + "expr": "avalanche_${subnet}_polls > 0", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Incomplete Polls", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus" + }, + "description": "Measures how much of each second is being spent handling different kinds of messages on the C-Chain.\nThe value for chits, for example, is the number of seconds spent handling chits messages per second, over the last 30 seconds.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ns" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 24 + }, + "id": 5, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_pull_query_sum{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "pull query", + "refId": "A" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_push_query_sum{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "push query", + "refId": "B" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_chits_sum{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "chits", + "refId": "C" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_accepted_sum{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "accepted", + "refId": "D" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_get_sum{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get", + "refId": "E" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_put_sum{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "put", + "refId": "F" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_multiput_sum{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "multiput", + "refId": "G" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_get_ancestors_sum{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get ancestors", + "refId": "H" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_get_failed_sum{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get failed", + "refId": "I" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_query_failed_sum{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "query failed", + "refId": "J" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_get_accepted_sum{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get accepted", + "refId": "K" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_get_ancestors_failed_sum{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get ancestors failed", + "refId": "L" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_app_request_sum{job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app request", + "refId": "M" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_app_request_failed_sum{job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app request failed", + "refId": "N" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_app_response_sum{job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app response", + "refId": "O" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_app_gossip_sum{job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app gossip", + "refId": "P" + } + ], + "title": "Message Handling Time (Total)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus" + }, + "description": "Percentage of queries for which we receive chits on time.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "transparent", + "value": 0.8 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 24 + }, + "id": 11, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "exemplar": true, + "expr": "(increase(avalanche_${subnet}_handler_chits_count{job=\"avalanchego\"}[5m]) + 1) / (increase(avalanche_${subnet}_handler_chits_count{job=\"avalanchego\"}[5m]) + increase(avalanche_${subnet}_handler_query_failed_count{job=\"avalanchego\"}[5m]) + 1)", + "instant": false, + "interval": "", + "legendFormat": "% Successful", + "refId": "A" + } + ], + "title": "Percentage of Successful Queries", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus" + }, + "description": "Measures how long each kind of request on the C-Chain takes to handle.\nThe value for chits, for example, is how long, in seconds, it takes to handle a chits message.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ns" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 32 + }, + "id": 7, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_pull_query_sum{job=\"avalanchego\"}[5m])/rate(avalanche_${subnet}_handler_pull_query_count{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "pull query", + "refId": "A" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_push_query_sum{job=\"avalanchego\"}[5m])/rate(avalanche_${subnet}_handler_push_query_count{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "push query", + "refId": "B" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_chits_sum{job=\"avalanchego\"}[5m])/rate(avalanche_${subnet}_handler_chits_count{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "chits", + "refId": "C" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_accepted_sum{job=\"avalanchego\"}[5m])/rate(avalanche_${subnet}_handler_accepted_count{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "accepted", + "refId": "D" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_get_sum{job=\"avalanchego\"}[5m])/rate(avalanche_${subnet}_handler_get_count{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get", + "refId": "E" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_put_sum{job=\"avalanchego\"}[5m])/rate(avalanche_${subnet}_handler_put_count{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "put", + "refId": "F" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_multiput_sum{job=\"avalanchego\"}[5m])/rate(avalanche_${subnet}_handler_multi_put_count{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "multiput", + "refId": "G" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_get_ancestors_sum{job=\"avalanchego\"}[5m])/rate(avalanche_${subnet}_handler_get_ancestors_count{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get ancestors", + "refId": "H" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_get_failed_sum{job=\"avalanchego\"}[5m])/rate(avalanche_${subnet}_handler_get_failed_count{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get failed", + "refId": "I" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_query_failed_sum{job=\"avalanchego\"}[5m])/rate(avalanche_${subnet}_handler_query_failed_count{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "query failed", + "refId": "J" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_get_accepted_sum{job=\"avalanchego\"}[5m])/rate(avalanche_${subnet}_handler_get_accepted_count{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get accepted", + "refId": "K" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_get_ancestors_failed_sum{job=\"avalanchego\"}[5m])/rate(avalanche_${subnet}_handler_get_ancestors_failed_count{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get ancestors failed", + "refId": "L" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_app_request_sum{job=\"avalanchego\"}[5m])/rate(avalanche_${subnet}_handler_app_request_count{job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app request", + "refId": "M" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_app_request_failed_sum{job=\"avalanchego\"}[5m])/rate(avalanche_${subnet}_handler_app_request_failed_count{job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app request failed", + "refId": "N" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_app_response_sum{job=\"avalanchego\"}[5m])/rate(avalanche_${subnet}_handler_app_response_count{job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app response", + "refId": "O" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_app_gossip_sum{job=\"avalanchego\"}[5m])/rate(avalanche_${subnet}_handler_app_gossip_count{job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app gossip", + "refId": "P" + } + ], + "title": "Message Handling Time (per Message)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus" + }, + "description": "The total stake of validators currently \"benched\" due to poor query responsiveness. Queries to these validators will immediately timeout until they are removed from the \"bench.\"", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 33 + }, + "id": 25, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "exemplar": true, + "expr": "avg_over_time(avalanche_${subnet}_benchlist_benched_weight{job=\"avalanchego\"}[15m]) / 10^9", + "interval": "", + "legendFormat": "AVAX Benched", + "refId": "A" + } + ], + "title": "Subnet weight benched", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus" + }, + "description": "Measures how many of each kind of message are received per second on the C-Chain.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "Messages / Second", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 41 + }, + "id": 6, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_pull_query_count{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "pull query", + "refId": "A" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_push_query_count{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "push query", + "refId": "B" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_chits_count{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "chits", + "refId": "C" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_accepted_count{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "accepted", + "refId": "D" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_get_count{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get", + "refId": "E" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_put_count{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "put", + "refId": "F" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_multi_put_count{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "multiput", + "refId": "G" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_get_ancestors_count{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get ancestors", + "refId": "H" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_get_failed_count{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get failed", + "refId": "I" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_query_failed_count{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "query failed", + "refId": "J" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_get_accepted_count{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get accepted", + "refId": "K" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_get_ancestors_failed_count{job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get ancestors failed", + "refId": "L" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_app_request_count{job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app request", + "refId": "M" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_app_request_failed_count{job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app request failed", + "refId": "N" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_app_response_count{job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app response", + "refId": "O" + }, + { + "exemplar": true, + "expr": "rate(avalanche_${subnet}_handler_app_gossip_count{job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app gossip", + "refId": "P" + } + ], + "title": "Messages Received per Second", + "type": "timeseries" + }, + { + "description": "Hit rate for the cache where the key is the byte representation of the block, and the value is the block's ID", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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": 8, + "w": 12, + "x": 0, + "y": 42 + }, + "id": 35, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "increase(avalanche_${subnet}_vm_rpcchainvm_bytes_to_id_cache_hit[5m])/(increase(avalanche_${subnet}_vm_rpcchainvm_bytes_to_id_cache_hit[5m])+increase(avalanche_${subnet}_vm_rpcchainvm_bytes_to_id_cache_miss[5m]))", + "interval": "", + "legendFormat": "Hit Rate", + "refId": "A" + } + ], + "title": "Block ID Cache Hit Rate", + "type": "timeseries" + }, + { + "description": "Hit rate for the missing block cache", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 1, + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "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": 8, + "w": 12, + "x": 0, + "y": 50 + }, + "id": 37, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "increase(avalanche_${subnet}_vm_rpcchainvm_missing_cache_hit[5m])/(increase(avalanche_${subnet}_vm_rpcchainvm_missing_cache_hit[5m])+increase(avalanche_${subnet}_vm_rpcchainvm_missing_cache_miss[5m]))", + "interval": "", + "legendFormat": "Hit Rate", + "refId": "A" + } + ], + "title": "Missing Block Cache Hit Rate", + "type": "timeseries" + }, + { + "description": "Hit rate for the decided block cache", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "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": 8, + "w": 12, + "x": 12, + "y": 50 + }, + "id": 36, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "increase(avalanche_${subnet}_vm_rpcchainvm_decided_cache_hit[5m])/(increase(avalanche_${subnet}_vm_rpcchainvm_decided_cache_hit[5m])+increase(avalanche_${subnet}_vm_rpcchainvm_decided_cache_miss[5m]))", + "interval": "", + "legendFormat": "Hit Rate", + "refId": "A" + } + ], + "title": "Decided Cache Hit Rate", + "type": "timeseries" + }, + { + "description": "Hit rate for the unverified block cache", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "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": 8, + "w": 12, + "x": 0, + "y": 58 + }, + "id": 38, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "increase(avalanche_${subnet}_vm_rpcchainvm_unverified_cache_hit[5m])/(increase(avalanche_${subnet}_vm_rpcchainvm_unverified_cache_hit[5m])+increase(avalanche_${subnet}_vm_rpcchainvm_unverified_cache_miss[5m]))", + "interval": "", + "legendFormat": "Hit Rate", + "refId": "A" + } + ], + "title": "Unverified Block Cache Hit Rate", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 66 + }, + "id": 19, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.6", + "targets": [ + { + "exemplar": true, + "expr": "avalanche_${subnet}_handler_unprocessed_msgs_len", + "interval": "", + "legendFormat": "Pending Messages", + "refId": "A" + } + ], + "title": "Unprocessed Incoming Messages", + "type": "timeseries" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 66 + }, + "id": 29, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.6", + "targets": [ + { + "exemplar": true, + "expr": "increase(avalanche_${subnet}_handler_expired[1m])", + "interval": "", + "legendFormat": "Expired", + "refId": "A" + } + ], + "title": "Incoming Messages Expired in Last Minute", + "type": "timeseries" + } + ], + "refresh": "10s", + "schemaVersion": 35, + "style": "dark", + "tags": [ + "Avalanche" + ], + "templating": { + "list": [ + { + "current": { + "selected": true, + "text": "Spaces (Fuji)", + "value": "2ebCneCbwthjQ1rYT41nhd7M76Hc6YmosMAQrTFhBq8qeqh6tt" + }, + "description": "This is a list of popular/known subnets. Your node may not be syncing these subnets in which case you will se no data.", + "hide": 0, + "includeAll": false, + "label": "Subnet", + "multi": false, + "name": "subnet", + "options": [ + { + "selected": true, + "text": "Spaces (Fuji)", + "value": "2ebCneCbwthjQ1rYT41nhd7M76Hc6YmosMAQrTFhBq8qeqh6tt" + }, + { + "selected": false, + "text": "WAGMI (Fuji)", + "value": "2AM3vsuLoJdGBGqX2ibE8RGEq4Lg7g4bot6BT1Z7B9dH5corUD" + } + ], + "query": "Spaces (Fuji) : 2ebCneCbwthjQ1rYT41nhd7M76Hc6YmosMAQrTFhBq8qeqh6tt, WAGMI (Fuji) : 2AM3vsuLoJdGBGqX2ibE8RGEq4Lg7g4bot6BT1Z7B9dH5corUD", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" + } + ] + }, + "time": { + "from": "now-7d", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Subnets", + "uid": "Gl1I21mnk", + "version": 5, + "weekStart": "" +} diff --git a/host/monitoring/dashboards/x_chain.json b/host/monitoring/dashboards/x_chain.json new file mode 100644 index 0000000..0b35bcb --- /dev/null +++ b/host/monitoring/dashboards/x_chain.json @@ -0,0 +1,1791 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 4, + "links": [ + { + "icon": "external link", + "tags": [ + "Avalanche" + ], + "type": "dashboards" + } + ], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 15, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "round(increase(avalanche_X_blks_accepted_count{instance=~\"$host\",job=\"avalanchego\"}[1m]))>0", + "interval": "", + "legendFormat": "Accepted", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "round(increase(avalanche_X_blks_rejected_count{instance=~\"$host\",job=\"avalanchego\"}[1m]))>0", + "hide": true, + "interval": "", + "legendFormat": "Rejected", + "range": true, + "refId": "B" + } + ], + "title": "Blocks Accepted/Rejected in Last Minute", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "The average time between a block's issuance and acceptance by this node over the last 5 minutes.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + } + ] + }, + "unit": "ns" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 23, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "expr": "rate(avalanche_X_blks_accepted_sum{instance=~\"$host\",job=\"avalanchego\"}[5m]) / rate(avalanche_X_blks_accepted_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "Accepted", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "expr": "rate(avalanche_X_blks_rejected_sum{instance=~\"$host\",job=\"avalanchego\"}[5m]) / rate(avalanche_X_blks_rejected_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "Rejected", + "range": true, + "refId": "B" + } + ], + "title": "Block Acceptance Latency", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 9, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avalanche_X_blks_processing{instance=~\"$host\", job=\"avalanchego\"}>0", + "hide": false, + "interval": "", + "legendFormat": "Blocks", + "range": true, + "refId": "B" + } + ], + "title": "Blocks Processing", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Percentage of queries sent that we receive a response to. (Average over the last 5 minutes.)", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 1, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "transparent", + "value": 0.9 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 11, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "min" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "(increase(avalanche_X_handler_chits_count{instance=~\"$host\",job=\"avalanchego\"}[5m]) + 1) / (increase(avalanche_X_handler_chits_count{instance=~\"$host\",job=\"avalanchego\"}[5m]) + increase(avalanche_X_handler_query_failed_count{instance=~\"$host\",job=\"avalanchego\"}[5m]) + 1)", + "instant": false, + "interval": "", + "legendFormat": "% Successful", + "refId": "A" + } + ], + "title": "Percentage of Successful Queries", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Measures how much of each second is being spent handling different kinds of messages on the X-Chain.\nThe value for chits, for example, is the number of seconds spent handling chits messages per second.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "seconds/second", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ns" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 16 + }, + "id": 5, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_pull_query_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "pull query", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_push_query_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "push query", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_chits_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "chits", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_accepted_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "accepted", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_get_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_put_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "put", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_multiput_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "multiput", + "range": true, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_get_ancestors_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get ancestors", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_get_failed_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get failed", + "range": true, + "refId": "I" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_query_failed_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "query failed", + "range": true, + "refId": "J" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_get_accepted_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get accepted", + "range": true, + "refId": "K" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_get_ancestors_failed_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get ancestors failed", + "range": true, + "refId": "L" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_app_request_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app request", + "range": true, + "refId": "M" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_app_request_failed_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app request failed", + "range": true, + "refId": "N" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_app_response_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app response", + "range": true, + "refId": "O" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_app_gossip_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app gossip", + "range": true, + "refId": "P" + } + ], + "title": "Message Handling Time (Total)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Measures how long each kind of request on the X-Chain takes to handle.\nThe value for chits, for example, is how long, in seconds, it takes to handle a chits message.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "seconds", + "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": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ns" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 16 + }, + "id": 7, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_pull_query_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_X_handler_pull_query_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "pull query", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_push_query_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_X_handler_push_query_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "push query", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_chits_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_X_handler_chits_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "chits", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_accepted_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_X_handler_accepted_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "accepted", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_get_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_X_handler_get_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_put_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_X_handler_put_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "put", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_multiput_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_X_handler_multi_put_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "multiput", + "range": true, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_get_ancestors_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_X_handler_get_ancestors_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get ancestors", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_get_failed_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_X_handler_get_failed_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get failed", + "range": true, + "refId": "I" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_query_failed_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_X_handler_query_failed_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "query failed", + "range": true, + "refId": "J" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_get_accepted_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_X_handler_get_accepted_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get accepted", + "range": true, + "refId": "K" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_get_ancestors_failed_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_X_handler_get_ancestors_failed_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get ancestors failed", + "range": true, + "refId": "L" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_app_request_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_X_handler_app_request_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app request", + "range": true, + "refId": "M" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_app_request_failed_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_X_handler_app_request_failed_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app request failed", + "range": true, + "refId": "N" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_app_gossip_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_X_handler_app_gossip_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app gossip", + "range": true, + "refId": "O" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_app_response_sum{instance=~\"$host\",job=\"avalanchego\"}[5m])/rate(avalanche_X_handler_app_response_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app response", + "range": true, + "refId": "P" + } + ], + "title": "Message Handling Time", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "The total stake of validators currently \"benched\" due to poor query responsiveness. Queries to these validators will immediately timeout until they are removed from the \"bench.\"", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 25 + }, + "id": 25, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avg_over_time(avalanche_X_benchlist_benched_weight{instance=~\"$host\",job=\"avalanchego\"}[15m]) / 10^9", + "interval": "", + "legendFormat": "AVAX Benched", + "range": true, + "refId": "A" + } + ], + "title": "AVAX Benched", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Measures how many of each kind of message are received per second on the X-Chain.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Messages / Second", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "smooth", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 25 + }, + "id": 6, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_pull_query_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "pull query", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_push_query_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "push query", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_chits_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "chits", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_accepted_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "accepted", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_get_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_put_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "put", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_multi_put_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "multiput", + "range": true, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_get_ancestors_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get ancestors", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_get_failed_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get failed", + "range": true, + "refId": "I" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_query_failed_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "query failed", + "range": true, + "refId": "J" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_get_accepted_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get accepted", + "range": true, + "refId": "K" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_get_ancestors_failed_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "interval": "", + "legendFormat": "get ancestors failed", + "range": true, + "refId": "L" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_chits_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "chits", + "range": true, + "refId": "M" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_app_request_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app request", + "range": true, + "refId": "N" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_app_request_failed_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app request failed", + "range": true, + "refId": "O" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_app_response_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app response", + "range": true, + "refId": "P" + }, + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(avalanche_X_handler_app_gossip_count{instance=~\"$host\",job=\"avalanchego\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "app gossip", + "range": true, + "refId": "Q" + } + ], + "title": "Messages Received per Second", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 34 + }, + "id": 45, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "increase(avalanche_X_vm_avalanche_utxo_cache_hit{instance=~\"$host\"}[5m])/(increase(avalanche_X_vm_avalanche_utxo_cache_hit{instance=~\"$host\"}[5m])+increase(avalanche_X_vm_avalanche_utxo_cache_miss{instance=~\"$host\"}[5m]))", + "interval": "", + "legendFormat": "Hit Rate", + "range": true, + "refId": "A" + } + ], + "title": "UTXO Cache Hit Rate", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 34 + }, + "id": 43, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avalanche_X_handler_unprocessed_msgs_len{instance=~\"$host\"}", + "interval": "", + "legendFormat": "Pending Messages", + "range": true, + "refId": "A" + } + ], + "title": "Unprocessed Incoming Messages", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 8, + "x": 16, + "y": 34 + }, + "id": 33, + "options": { + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.0.4", + "targets": [ + { + "datasource": { + "type": "prometheus" + }, + "editorMode": "code", + "expr": "increase(avalanche_X_handler_expired{instance=~\"$host\"}[1m])", + "interval": "", + "legendFormat": "Expired", + "range": true, + "refId": "A" + } + ], + "title": "Incoming Messages Expired in Last Minute", + "type": "timeseries" + } + ], + "refresh": "10s", + "schemaVersion": 38, + "tags": [ + "Avalanche" + ], + "templating": { + "list": [ + { + "current": { + "selected": true, + "text": "18.214.155.207:9650", + "value": "18.214.155.207:9650" + }, + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "definition": "label_values(instance)", + "hide": 0, + "includeAll": true, + "multi": false, + "name": "host", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(instance)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "/9650/", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-24h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "X-Chain", + "uid": "ceRH2Am7z", + "version": 3, + "weekStart": "" +} \ No newline at end of file diff --git a/host/monitoring/monitoring.go b/host/monitoring/monitoring.go new file mode 100644 index 0000000..f627b99 --- /dev/null +++ b/host/monitoring/monitoring.go @@ -0,0 +1,117 @@ +// Copyright (C) 2022, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +package monitoring + +import ( + "bytes" + "embed" + "fmt" + "os" + "path/filepath" + "strings" + "text/template" + + "github.com/ava-labs/avalanche-tooling-sdk-go/constants" + "github.com/ava-labs/avalanche-tooling-sdk-go/utils" +) + +type configInputs struct { + AvalancheGoPorts string + MachinePorts string + LoadTestPorts string + IP string + Port string + Host string + NodeID string + ChainID string +} + +//go:embed dashboards/* +var dashboards embed.FS + +//go:embed configs/* +var configs embed.FS + +func Setup(monitoringDir string) error { + return WriteMonitoringJSONFiles(monitoringDir) +} + +func WriteMonitoringJSONFiles(monitoringDir string) error { + dashboardDir := filepath.Join(monitoringDir, constants.DashboardsDir) + files, err := dashboards.ReadDir(constants.DashboardsDir) + if err != nil { + return err + } + for _, file := range files { + fileContent, err := dashboards.ReadFile(filepath.Join(constants.DashboardsDir, file.Name())) + if err != nil { + return err + } + dashboardJSONFile, err := os.Create(filepath.Join(dashboardDir, file.Name())) + if err != nil { + return err + } + _, err = dashboardJSONFile.Write(fileContent) + if err != nil { + return err + } + } + return nil +} + +func GenerateConfig(configPath string, configDesc string, templateVars configInputs) (string, error) { + configTemplate, err := configs.ReadFile(configPath) + if err != nil { + return "", err + } + var config bytes.Buffer + t, err := template.New(configDesc).Parse(string(configTemplate)) + if err != nil { + return "", err + } + err = t.Execute(&config, templateVars) + if err != nil { + return "", err + } + return config.String(), nil +} + +func WritePrometheusConfig(filePath string, avalancheGoPorts []string, machinePorts []string, loadTestPorts []string) error { + config, err := GenerateConfig("configs/prometheus.yml", "Prometheus Config", configInputs{ + AvalancheGoPorts: strings.Join(utils.AddSingleQuotes(avalancheGoPorts), ","), + MachinePorts: strings.Join(utils.AddSingleQuotes(machinePorts), ","), + LoadTestPorts: strings.Join(utils.AddSingleQuotes(loadTestPorts), ","), + }) + if err != nil { + return err + } + return os.WriteFile(filePath, []byte(config), constants.WriteReadReadPerms) +} + +func WriteLokiConfig(filePath string, port string) error { + config, err := GenerateConfig("configs/loki.yml", "Loki Config", configInputs{ + Port: port, + }) + if err != nil { + return err + } + return os.WriteFile(filePath, []byte(config), constants.WriteReadReadPerms) +} + +func WritePromtailConfig(filePath string, lokiIP string, lokiPort string, host string, nodeID string, chainID string) error { + if !utils.IsValidIP(lokiIP) { + return fmt.Errorf("invalid IP address: %s", lokiIP) + } + config, err := GenerateConfig("configs/promtail.yml", "Promtail Config", configInputs{ + IP: lokiIP, + Port: lokiPort, + Host: host, + NodeID: nodeID, + ChainID: chainID, + }) + if err != nil { + return err + } + return os.WriteFile(filePath, []byte(config), constants.WriteReadReadPerms) +} diff --git a/host/shell/buildLoadTestDeps.sh b/host/shell/buildLoadTestDeps.sh new file mode 100644 index 0000000..daf7bdb --- /dev/null +++ b/host/shell/buildLoadTestDeps.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# install gcc +echo "ensuring that gcc is installed ..." +export DEBIAN_FRONTEND=noninteractive +while ! gcc --version >/dev/null 2>&1; do + echo "GCC is not installed. Trying to install..." + sudo apt-get -y -o DPkg::Lock::Timeout=120 update + sudo apt-get -y -o DPkg::Lock::Timeout=120 install gcc + if [ $? -ne 0 ]; then + echo "Failed to install GCC. Retrying in 10 seconds..." + sleep 10 + fi +done +# install go +echo "ensuring that go is installed ..." +go version || sudo snap install go --classic diff --git a/host/shell/getNewSubnetEVMRelease.sh b/host/shell/getNewSubnetEVMRelease.sh new file mode 100644 index 0000000..76072e3 --- /dev/null +++ b/host/shell/getNewSubnetEVMRelease.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +set -e +#name:TASK [download new subnet EVM release] +wget -N "{{ .SubnetEVMReleaseURL }}" +#name:TASK [unpack new subnet EVM release] +tar xvf "{{ .SubnetEVMArchive}}" diff --git a/host/shell/setupBuildEnv.sh b/host/shell/setupBuildEnv.sh new file mode 100755 index 0000000..2ad7842 --- /dev/null +++ b/host/shell/setupBuildEnv.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash +#name:TASK [install gcc if not available] +export DEBIAN_FRONTEND=noninteractive +while ! gcc --version >/dev/null 2>&1; do + echo "GCC is not installed. Trying to install..." + sudo apt-get -y -o DPkg::Lock::Timeout=120 update + sudo apt-get -y -o DPkg::Lock::Timeout=120 install gcc + if [ $? -ne 0 ]; then + echo "Failed to install GCC. Retrying in 10 seconds..." + sleep 10 + fi +done +#name:TASK [install go] +install_go() { + ARCH=amd64 + [[ "$(uname -m)" == "aarch64" ]] && ARCH=arm64 + GOFILE="go{{ .GoVersion }}.linux-$ARCH.tar.gz" + cd + sudo rm -rf $GOFILE go + wget -q -nv https://go.dev/dl/$GOFILE + tar xfz $GOFILE + echo >> ~/.bashrc + echo export PATH=\$PATH:~/go/bin:~/bin >> ~/.bashrc + echo export CGO_ENABLED=1 >> ~/.bashrc +} +go version || install_go diff --git a/host/shell/setupCLIFromSource.sh b/host/shell/setupCLIFromSource.sh new file mode 100644 index 0000000..a1a7283 --- /dev/null +++ b/host/shell/setupCLIFromSource.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +set -e + +#name:TASK [install gcc] +export DEBIAN_FRONTEND=noninteractive +while ! gcc --version >/dev/null 2>&1; do + echo "GCC is not installed. Trying to install..." + sudo apt-get -y -o DPkg::Lock::Timeout=120 update + sudo apt-get -y -o DPkg::Lock::Timeout=120 install gcc + if [ $? -ne 0 ]; then + echo "Failed to install GCC. Retrying in 10 seconds..." + sleep 10 + fi +done +#name:TASK [install go] +install_go() { + ARCH=amd64 + [[ "$(uname -m)" == "aarch64" ]] && ARCH=arm64 + GOFILE="go{{ .GoVersion }}.linux-$ARCH.tar.gz" + cd + sudo rm -rf $GOFILE go + wget -q -nv https://go.dev/dl/$GOFILE + tar xfz $GOFILE + echo >> ~/.bashrc + echo export PATH=\$PATH:~/go/bin:~/bin >> ~/.bashrc + echo export CGO_ENABLED=1 >> ~/.bashrc +} +go version || install_go +export PATH=$PATH:~/go/bin +#name:TASK [build avalanche-cli] +cd ~ +rm -rf avalanche-cli +git clone --single-branch -b {{ .CliBranch }} https://github.com/ava-labs/avalanche-cli +cd avalanche-cli +./scripts/build.sh +cp bin/avalanche ~/bin/avalanche diff --git a/host/shell/setupDockerService.sh b/host/shell/setupDockerService.sh new file mode 100644 index 0000000..64219d7 --- /dev/null +++ b/host/shell/setupDockerService.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +# Provide docker-compose systemctl unit file +cat << EOF | sudo tee /etc/systemd/system/avalanche-cli-docker.service +[Unit] +Description=Avalanche CLI Docker Compose Service +Requires=docker.service +After=docker.service + +[Service] +User=ubuntu +Group=ubuntu +Restart=on-failure +ExecStart=/usr/bin/docker compose -f /home/ubuntu/.avalanche-cli/services/docker-compose.yml up +ExecStop=/usr/bin/docker compose -f /home/ubuntu/.avalanche-cli/services/docker-compose.yml down + +[Install] +WantedBy=default.target +EOF + +sudo systemctl enable avalanche-cli-docker.service diff --git a/host/shell/setupNode.sh b/host/shell/setupNode.sh new file mode 100644 index 0000000..9bfe77b --- /dev/null +++ b/host/shell/setupNode.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +export DEBIAN_FRONTEND=noninteractive +sudo apt-get -y update && sudo apt-get -y install busybox-static software-properties-common +sudo add-apt-repository -y ppa:longsleep/golang-backports +sudo apt-get -y update && sudo apt-get -y dist-upgrade && sudo apt-get -y install ca-certificates curl gcc git golang-go +sudo install -m 0755 -d /etc/apt/keyrings && sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc && sudo chmod a+r /etc/apt/keyrings/docker.asc +echo deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo \"$VERSION_CODENAME\") stable | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null +sudo apt-get -y update && sudo apt-get -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-compose +sudo usermod -aG docker ubuntu +sudo chgrp ubuntu /var/run/docker.sock +sudo chmod +rw /var/run/docker.sock +export PATH=$PATH:~/go/bin +mkdir -p ~/.avalanche-cli +rm -vf install.sh && busybox wget -q -nd https://raw.githubusercontent.com/ava-labs/avalanche-cli/main/scripts/install.sh +#name:TASK [modify permissions] +chmod 755 install.sh +#name:TASK [run install script] +./install.sh {{ .CLIVersion }} diff --git a/host/ssh.go b/host/ssh.go new file mode 100644 index 0000000..7f05b67 --- /dev/null +++ b/host/ssh.go @@ -0,0 +1,200 @@ +// Copyright (C) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +package host + +import ( + "bytes" + "embed" + "fmt" + "html/template" + "os" + "path/filepath" + "strconv" + "time" + + "github.com/ava-labs/avalanche-tooling-sdk-go/constants" + remoteconfig "github.com/ava-labs/avalanche-tooling-sdk-go/host/config" + "github.com/ava-labs/avalanche-tooling-sdk-go/host/monitoring" + "github.com/ava-labs/avalanche-tooling-sdk-go/utils" +) + +type scriptInputs struct { + AvalancheGoVersion string + CLIVersion string + SubnetExportFileName string + SubnetName string + ClusterName string + GoVersion string + CliBranch string + IsDevNet bool + NetworkFlag string + SubnetEVMBinaryPath string + SubnetEVMReleaseURL string + SubnetEVMArchive string + LoadTestRepoDir string + LoadTestRepo string + LoadTestPath string + LoadTestCommand string + LoadTestBranch string + LoadTestGitCommit string + CheckoutCommit bool + LoadTestResultFile string + GrafanaPkg string +} + +//go:embed shell/*.sh +var script embed.FS + +// RunOverSSH runs provided script path over ssh. +// This script can be template as it will be rendered using scriptInputs vars +func (h *Host) RunOverSSH( + scriptDesc string, + timeout time.Duration, + scriptPath string, + templateVars scriptInputs, +) error { + startTime := time.Now() + shellScript, err := script.ReadFile(scriptPath) + if err != nil { + return err + } + var script bytes.Buffer + t, err := template.New(scriptDesc).Parse(string(shellScript)) + if err != nil { + return err + } + err = t.Execute(&script, templateVars) + if err != nil { + return err + } + + if output, err := h.Command(nil, timeout, script.String()); err != nil { + return fmt.Errorf("%w: %s", err, string(output)) + } + executionTime := time.Since(startTime) + h.Logger.Infof("RunOverSSH[%s]%s took %s with err: %v", h.NodeID, scriptDesc, executionTime, err) + return nil +} + +// RunSSHSetupNode runs script to setup sdk dependencies on a remote host over SSH. +func (h *Host) RunSSHSetupNode(configPath, cliVersion string) error { + if err := h.RunOverSSH( + "Setup Node", + constants.SSHLongRunningScriptTimeout, + "shell/setupNode.sh", + scriptInputs{CLIVersion: cliVersion}, + ); err != nil { + return err + } + return nil +} + +// RunSSHSetupDockerService runs script to setup docker compose service for CLI +func (h *Host) RunSSHSetupDockerService() error { + if h.IsSystemD() { + return h.RunOverSSH( + "Setup Docker Service", + constants.SSHLongRunningScriptTimeout, + "shell/setupDockerService.sh", + scriptInputs{}, + ) + } else { + // no need to setup docker service + return nil + } +} + +// RunSSHRestartNode runs script to restart avalanchego +func (h *Host) RunSSHRestartNode() error { + remoteComposeFile := utils.GetRemoteComposeFile() + return h.RestartDockerComposeService(remoteComposeFile, "avalanchego", constants.SSHLongRunningScriptTimeout) +} + +// RunSSHStartAWMRelayerService runs script to start an AWM Relayer Service +func (h *Host) RunSSHStartAWMRelayerService() error { + return h.StartDockerComposeService(utils.GetRemoteComposeFile(), "awm-relayer", constants.SSHLongRunningScriptTimeout) +} + +// RunSSHStopAWMRelayerService runs script to start an AWM Relayer Service +func (h *Host) RunSSHStopAWMRelayerService() error { + return h.StopDockerComposeService(utils.GetRemoteComposeFile(), "awm-relayer", constants.SSHLongRunningScriptTimeout) +} + +// RunSSHUpgradeAvalanchego runs script to upgrade avalanchego +func (h *Host) RunSSHUpgradeAvalanchego(networkID string, avalancheGoVersion string) error { + withMonitoring, err := h.WasNodeSetupWithMonitoring() + if err != nil { + return err + } + + if err := h.ComposeSSHSetupNode(networkID, avalancheGoVersion, withMonitoring); err != nil { + return err + } + return h.RestartDockerCompose(constants.SSHLongRunningScriptTimeout) +} + +// RunSSHStartNode runs script to start avalanchego +func (h *Host) RunSSHStartNode() error { + return h.StartDockerComposeService(utils.GetRemoteComposeFile(), "avalanchego", constants.SSHLongRunningScriptTimeout) +} + +// RunSSHStopNode runs script to stop avalanchego +func (h *Host) RunSSHStopNode() error { + return h.StopDockerComposeService(utils.GetRemoteComposeFile(), "avalanchego", constants.SSHLongRunningScriptTimeout) +} + +// RunSSHUpgradeSubnetEVM runs script to upgrade subnet evm +func (h *Host) RunSSHUpgradeSubnetEVM(subnetEVMBinaryPath string) error { + return h.RunOverSSH( + "Upgrade Subnet EVM", + constants.SSHScriptTimeout, + "shell/upgradeSubnetEVM.sh", + scriptInputs{SubnetEVMBinaryPath: subnetEVMBinaryPath}, + ) +} + +func (h *Host) RunSSHSetupPromtailConfig(lokiIP string, lokiPort int, cloudID string, nodeID string, chainID string) error { + for _, folder := range remoteconfig.PromtailFoldersToCreate() { + if err := h.MkdirAll(folder, constants.SSHFileOpsTimeout); err != nil { + return err + } + } + cloudNodePromtailConfigTemp := utils.GetRemoteComposeServicePath("promtail", "promtail.yml") + promtailConfig, err := os.CreateTemp("", "promtail") + if err != nil { + return err + } + defer os.Remove(promtailConfig.Name()) + + if err := monitoring.WritePromtailConfig(promtailConfig.Name(), lokiIP, strconv.Itoa(lokiPort), cloudID, nodeID, chainID); err != nil { + return err + } + return h.Upload( + promtailConfig.Name(), + cloudNodePromtailConfigTemp, + constants.SSHFileOpsTimeout, + ) +} + +func (h *Host) RunSSHUploadNodeAWMRelayerConfig(nodeInstanceDirPath string) error { + cloudAWMRelayerConfigDir := filepath.Join(constants.CloudNodeCLIConfigBasePath, constants.ServicesDir, constants.AWMRelayerInstallDir) + if err := h.MkdirAll(cloudAWMRelayerConfigDir, constants.SSHFileOpsTimeout); err != nil { + return err + } + return h.Upload( + filepath.Join(nodeInstanceDirPath, constants.ServicesDir, constants.AWMRelayerInstallDir, constants.AWMRelayerConfigFilename), + filepath.Join(cloudAWMRelayerConfigDir, constants.AWMRelayerConfigFilename), + constants.SSHFileOpsTimeout, + ) +} + +// RunSSHGetNewSubnetEVMRelease runs script to download new subnet evm +func (h *Host) RunSSHGetNewSubnetEVMRelease(subnetEVMReleaseURL, subnetEVMArchive string) error { + return h.RunOverSSH( + "Get Subnet EVM Release", + constants.SSHScriptTimeout, + "shell/getNewSubnetEVMRelease.sh", + scriptInputs{SubnetEVMReleaseURL: subnetEVMReleaseURL, SubnetEVMArchive: subnetEVMArchive}, + ) +} diff --git a/utils/net.go b/utils/net.go new file mode 100644 index 0000000..d82f925 --- /dev/null +++ b/utils/net.go @@ -0,0 +1,10 @@ +// Copyright (C) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +package utils + +import "net" + +func IsValidIP(ipStr string) bool { + return net.ParseIP(ipStr) != nil +} diff --git a/utils/strings.go b/utils/strings.go index fcb6817..2ed5e97 100644 --- a/utils/strings.go +++ b/utils/strings.go @@ -33,3 +33,22 @@ func ExtractPlaceholderValue(pattern, text string) (string, error) { return "", fmt.Errorf("no match found") } } + +// AddSingleQuotes adds single quotes to each string in the given slice. +func AddSingleQuotes(s []string) []string { + return Map(s, func(item string) string { + if item == "" { + return "''" + } + if !strings.HasPrefix(item, "'") { + item = fmt.Sprintf("'%s", item) + } + if !strings.HasSuffix(item, "'") { + item = fmt.Sprintf("%s'", item) + } + if !strings.HasPrefix(item, "'") && !strings.HasSuffix(item, "'") { + item = fmt.Sprintf("'%s'", item) + } + return item + }) +} diff --git a/utils/strings_test.go b/utils/strings_test.go index b6b3faf..e7a7f44 100644 --- a/utils/strings_test.go +++ b/utils/strings_test.go @@ -3,6 +3,7 @@ package utils import ( + "reflect" "testing" ) @@ -50,3 +51,13 @@ func TestExtractPlaceholderValue(t *testing.T) { }) } } + +func TestAddSingleQuotes(t *testing.T) { + input := []string{"", "b", "orange banana", "'apple'", "'a", "b'"} + expected := []string{"''", "'b'", "'orange banana'", "'apple'", "'a'", "'b'"} + output := AddSingleQuotes(input) + + if !reflect.DeepEqual(output, expected) { + t.Errorf("AddSingleQuotes(%v) = %v, expected %v", input, output, expected) + } +} From ace0222e6fab2c3c8d180390f266e24306fc849d Mon Sep 17 00:00:00 2001 From: Artur Reznikov Date: Tue, 25 Jun 2024 13:11:38 -0700 Subject: [PATCH 05/30] add monitoring provisioning --- host/ssh.go | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/host/ssh.go b/host/ssh.go index 7f05b67..cfd903d 100644 --- a/host/ssh.go +++ b/host/ssh.go @@ -154,6 +154,51 @@ func (h *Host) RunSSHUpgradeSubnetEVM(subnetEVMBinaryPath string) error { ) } +func (h *Host) RunSSHSetupPrometheusConfig(avalancheGoPorts, machinePorts, loadTestPorts []string) error { + for _, folder := range remoteconfig.PrometheusFoldersToCreate() { + if err := h.MkdirAll(folder, constants.SSHFileOpsTimeout); err != nil { + return err + } + } + cloudNodePrometheusConfigTemp := utils.GetRemoteComposeServicePath("prometheus", "prometheus.yml") + promConfig, err := os.CreateTemp("", "prometheus") + if err != nil { + return err + } + defer os.Remove(promConfig.Name()) + if err := monitoring.WritePrometheusConfig(promConfig.Name(), avalancheGoPorts, machinePorts, loadTestPorts); err != nil { + return err + } + + return h.Upload( + promConfig.Name(), + cloudNodePrometheusConfigTemp, + constants.SSHFileOpsTimeout, + ) +} + +func (h *Host) RunSSHSetupLokiConfig(port int) error { + for _, folder := range remoteconfig.LokiFoldersToCreate() { + if err := h.MkdirAll(folder, constants.SSHFileOpsTimeout); err != nil { + return err + } + } + cloudNodeLokiConfigTemp := utils.GetRemoteComposeServicePath("loki", "loki.yml") + lokiConfig, err := os.CreateTemp("", "loki") + if err != nil { + return err + } + defer os.Remove(lokiConfig.Name()) + if err := monitoring.WriteLokiConfig(lokiConfig.Name(), strconv.Itoa(port)); err != nil { + return err + } + return h.Upload( + lokiConfig.Name(), + cloudNodeLokiConfigTemp, + constants.SSHFileOpsTimeout, + ) +} + func (h *Host) RunSSHSetupPromtailConfig(lokiIP string, lokiPort int, cloudID string, nodeID string, chainID string) error { for _, folder := range remoteconfig.PromtailFoldersToCreate() { if err := h.MkdirAll(folder, constants.SSHFileOpsTimeout); err != nil { From 15eacf97ed4d73d4133fa3f4a735066275f31cda Mon Sep 17 00:00:00 2001 From: Artur Reznikov Date: Tue, 25 Jun 2024 13:50:34 -0700 Subject: [PATCH 06/30] add staking cert ops --- constants/constants.go | 4 +++ examples/aws.go | 21 ++++++++++++-- host/create.go | 36 +++++++++++++++++------ host/ssh.go | 31 +++++++++++++++++++- host/staking.go | 66 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 146 insertions(+), 12 deletions(-) create mode 100644 host/staking.go diff --git a/constants/constants.go b/constants/constants.go index 05f2466..5feb893 100644 --- a/constants/constants.go +++ b/constants/constants.go @@ -66,4 +66,8 @@ const ( AWMRelayerInstallDir = "awm-relayer" AWMRelayerConfigFilename = "awm-relayer-config.json" + + StakerCertFileName = "staker.crt" + StakerKeyFileName = "staker.key" + BLSKeyFileName = "signer.key" ) diff --git a/examples/aws.go b/examples/aws.go index 2a48323..dec009b 100644 --- a/examples/aws.go +++ b/examples/aws.go @@ -19,12 +19,23 @@ func main() { // Please set your own values for the following fields cp.AWSProfile = "default" cp.AWSSecurityGroupID = "sg-0e198c427f8f0616b" - cp.AWSKeyPair = "default" + cp.AWSKeyPair = "artur-us-east-1-avalanche-cli" if err != nil { panic(err) } // Create a new host instance. Count is 1 so only one host will be created - hosts, err := host.CreateInstanceList(ctx, *cp, 1) + const ( + avalanchegoVersion = "v1.11.8" + avalancheCliVersion = "v1.6.2" + ) + hosts, err := host.CreateInstanceList(ctx, + *cp, + 1, + []host.SupportedRole{host.Validator}, + "fuji", + avalanchegoVersion, + avalancheCliVersion, + false) if err != nil { panic(err) } @@ -46,5 +57,11 @@ func main() { } else { fmt.Println(string(output)) } + //check if avalanchego is running + if output, err := h.Commandf(nil, sshCommandTimeout, "docker ps"); err != nil { + panic(err) + } else { + fmt.Println(string(output)) + } } } diff --git a/host/create.go b/host/create.go index 6ba6bd4..033e886 100644 --- a/host/create.go +++ b/host/create.go @@ -127,7 +127,16 @@ func createInstanceList(ctx context.Context, cp CloudParams, count int) ([]Host, } // CreateInstanceList creates a list of nodes. -func CreateInstanceList(ctx context.Context, cp CloudParams, count int, roles []SupportedRole, networkID string, avalancheGoVersion string, withMonitoring bool) ([]Host, error) { +func CreateInstanceList( + ctx context.Context, + cp CloudParams, + count int, + roles []SupportedRole, + networkID string, + avalancheGoVersion string, + avalancheCliVersion string, + withMonitoring bool, +) ([]Host, error) { hosts, err := createInstanceList(ctx, cp, count) if err != nil { return nil, err @@ -143,7 +152,7 @@ func CreateInstanceList(ctx context.Context, cp CloudParams, count int, roles [] hostResults.AddResult(host.NodeID, nil, err) return } - if err := provisionHost(host, roles, networkID, avalancheGoVersion, withMonitoring); err != nil { + if err := provisionHost(host, roles, networkID, avalancheGoVersion, avalancheCliVersion, withMonitoring); err != nil { hostResults.AddResult(host.NodeID, nil, err) return } @@ -166,7 +175,7 @@ func CreateInstanceList(ctx context.Context, cp CloudParams, count int, roles [] } // provisionHost provisions a host with the given roles. -func provisionHost(host Host, roles []SupportedRole, networkID string, avalancheGoVersion string, withMonitoring bool) error { +func provisionHost(host Host, roles []SupportedRole, networkID string, avalancheGoVersion string, avalancheCliVersion string, withMonitoring bool) error { if err := CheckRoles(roles); err != nil { return err } @@ -176,8 +185,11 @@ func provisionHost(host Host, roles []SupportedRole, networkID string, avalanche for _, role := range roles { switch role { case Validator: + if err := provisionAvagoHost(host, networkID, avalancheGoVersion, avalancheCliVersion, withMonitoring); err != nil { + return err + } case API: - if err := provisionAvagoHost(host, networkID, avalancheGoVersion, withMonitoring); err != nil { + if err := provisionAvagoHost(host, networkID, avalancheGoVersion, avalancheCliVersion, withMonitoring); err != nil { return err } case Loadtest: @@ -196,17 +208,23 @@ func provisionHost(host Host, roles []SupportedRole, networkID string, avalanche return nil } -func provisionAvagoHost(host Host, networkID string, avalancheGoVersion string, withMonitoring bool) error { +func provisionAvagoHost(host Host, networkID string, avalancheGoVersion string, avalancheCliVersion string, withMonitoring bool) error { + if err := host.RunSSHSetupNode(avalancheCliVersion); err != nil { + return err + } + if err := host.RunSSHSetupDockerService(); err != nil { + return err + } if err := host.ComposeSSHSetupNode(networkID, avalancheGoVersion, withMonitoring); err != nil { return err } - if err := host.RestartDockerCompose(constants.SSHScriptTimeout); err != nil { + if err := host.StartDockerCompose(constants.SSHScriptTimeout); err != nil { return err } return nil } -func provisionLoadTestHost(host Host) error { +func provisionLoadTestHost(host Host) error { //stub if err := host.ComposeSSHSetupLoadTest(); err != nil { return err } @@ -216,7 +234,7 @@ func provisionLoadTestHost(host Host) error { return nil } -func provisionMonitoringHost(host Host) error { +func provisionMonitoringHost(host Host) error { //stub if err := host.ComposeSSHSetupMonitoring(); err != nil { return err } @@ -226,7 +244,7 @@ func provisionMonitoringHost(host Host) error { return nil } -func provisionAWMRelayerHost(host Host) error { +func provisionAWMRelayerHost(host Host) error { //stub if err := host.ComposeSSHSetupAWMRelayer(); err != nil { return err } diff --git a/host/ssh.go b/host/ssh.go index cfd903d..0d337d4 100644 --- a/host/ssh.go +++ b/host/ssh.go @@ -78,7 +78,7 @@ func (h *Host) RunOverSSH( } // RunSSHSetupNode runs script to setup sdk dependencies on a remote host over SSH. -func (h *Host) RunSSHSetupNode(configPath, cliVersion string) error { +func (h *Host) RunSSHSetupNode(cliVersion string) error { if err := h.RunOverSSH( "Setup Node", constants.SSHLongRunningScriptTimeout, @@ -243,3 +243,32 @@ func (h *Host) RunSSHGetNewSubnetEVMRelease(subnetEVMReleaseURL, subnetEVMArchiv scriptInputs{SubnetEVMReleaseURL: subnetEVMReleaseURL, SubnetEVMArchive: subnetEVMArchive}, ) } + +// RunSSHUploadStakingFiles uploads staking files to a remote host via SSH. +func (h *Host) RunSSHUploadStakingFiles(keyPath string) error { + if err := h.MkdirAll( + constants.CloudNodeStakingPath, + constants.SSHFileOpsTimeout, + ); err != nil { + return err + } + if err := h.Upload( + filepath.Join(keyPath, constants.StakerCertFileName), + filepath.Join(constants.CloudNodeStakingPath, constants.StakerCertFileName), + constants.SSHFileOpsTimeout, + ); err != nil { + return err + } + if err := h.Upload( + filepath.Join(keyPath, constants.StakerKeyFileName), + filepath.Join(constants.CloudNodeStakingPath, constants.StakerKeyFileName), + constants.SSHFileOpsTimeout, + ); err != nil { + return err + } + return h.Upload( + filepath.Join(keyPath, constants.BLSKeyFileName), + filepath.Join(constants.CloudNodeStakingPath, constants.BLSKeyFileName), + constants.SSHFileOpsTimeout, + ) +} diff --git a/host/staking.go b/host/staking.go new file mode 100644 index 0000000..689b458 --- /dev/null +++ b/host/staking.go @@ -0,0 +1,66 @@ +// Copyright (C) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +package host + +import ( + "os" + "path/filepath" + + "github.com/ava-labs/avalanche-cli/pkg/constants" + "github.com/ava-labs/avalanche-cli/pkg/utils" + "github.com/ava-labs/avalanche-tooling-sdk-go/constants" + "github.com/ava-labs/avalanchego/ids" + "github.com/ava-labs/avalanchego/staking" +) + +func (h *Host) ProvideStakingCertAndKey(keyPath string) error { + if nodeID, err := h.GenerateNodeCertAndKeys(keyPath); err != nil { + return err + } else { + h.Logger.Infof("Generated Staking Cert and Key for NodeID: %s in folder %s", nodeID.PrefixedString(), keyPath) + } + return h.RunSSHUploadStakingFiles(keyPath) +} + +// GenerateNodeCertAndKeys generates a node certificate and keys and return nodeID +func (h *Host) GenerateNodeCertAndKeys(keyPath string) (ids.NodeID, error) { + if err := os.MkdirAll(keyPath, constants.DefaultPerms755); err != nil { + return ids.EmptyNodeID, err + } + stakerCertFilePath := filepath.Join(keyPath, constants.StakerCertFileName) + stakerKeyFilePath := filepath.Join(keyPath, constants.StakerKeyFileName) + blsKeyFilePath := filepath.Join(keyPath, constants.BLSKeyFileName) + + certBytes, keyBytes, err := staking.NewCertAndKeyBytes() + if err != nil { + return ids.EmptyNodeID, err + } + nodeID, err := utils.ToNodeID(certBytes) + if err != nil { + return ids.EmptyNodeID, err + } + if err := os.MkdirAll(filepath.Dir(stakerCertFilePath), constants.DefaultPerms755); err != nil { + return ids.EmptyNodeID, err + } + if err := os.WriteFile(stakerCertFilePath, certBytes, constants.WriteReadUserOnlyPerms); err != nil { + return ids.EmptyNodeID, err + } + if err := os.MkdirAll(filepath.Dir(stakerKeyFilePath), constants.DefaultPerms755); err != nil { + return ids.EmptyNodeID, err + } + if err := os.WriteFile(stakerKeyFilePath, keyBytes, constants.WriteReadUserOnlyPerms); err != nil { + return ids.EmptyNodeID, err + } + blsSignerKeyBytes, err := utils.NewBlsSecretKeyBytes() + if err != nil { + return ids.EmptyNodeID, err + } + if err := os.MkdirAll(filepath.Dir(blsKeyFilePath), constants.DefaultPerms755); err != nil { + return ids.EmptyNodeID, err + } + if err := os.WriteFile(blsKeyFilePath, blsSignerKeyBytes, constants.WriteReadUserOnlyPerms); err != nil { + return ids.EmptyNodeID, err + } + return nodeID, nil +} From ac50bef7af67e1da8ef644782e9afe90d544598e Mon Sep 17 00:00:00 2001 From: Artur Reznikov Date: Tue, 25 Jun 2024 13:56:40 -0700 Subject: [PATCH 07/30] staking utils --- examples/aws.go | 10 ++++++++++ host/staking.go | 5 ++--- utils/staking.go | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 utils/staking.go diff --git a/examples/aws.go b/examples/aws.go index dec009b..a52ae57 100644 --- a/examples/aws.go +++ b/examples/aws.go @@ -6,6 +6,7 @@ package main import ( "context" "fmt" + "os" "time" "github.com/ava-labs/avalanche-tooling-sdk-go/host" @@ -63,5 +64,14 @@ func main() { } else { fmt.Println(string(output)) } + + //generate and provide staking certificate and key + keyPath := os.TempDir() + defer os.RemoveAll(keyPath) + if err := h.ProvideStakingCertAndKey(keyPath); err != nil { + panic(err) + } + // show content of the local keyPath folder + } } diff --git a/host/staking.go b/host/staking.go index 689b458..5e9e51c 100644 --- a/host/staking.go +++ b/host/staking.go @@ -7,9 +7,8 @@ import ( "os" "path/filepath" - "github.com/ava-labs/avalanche-cli/pkg/constants" - "github.com/ava-labs/avalanche-cli/pkg/utils" "github.com/ava-labs/avalanche-tooling-sdk-go/constants" + "github.com/ava-labs/avalanche-tooling-sdk-go/utils" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/staking" ) @@ -18,7 +17,7 @@ func (h *Host) ProvideStakingCertAndKey(keyPath string) error { if nodeID, err := h.GenerateNodeCertAndKeys(keyPath); err != nil { return err } else { - h.Logger.Infof("Generated Staking Cert and Key for NodeID: %s in folder %s", nodeID.PrefixedString(), keyPath) + h.Logger.Infof("Generated Staking Cert and Key for NodeID: %s in folder %s", nodeID.String(), keyPath) } return h.RunSSHUploadStakingFiles(keyPath) } diff --git a/utils/staking.go b/utils/staking.go new file mode 100644 index 0000000..ecd16fe --- /dev/null +++ b/utils/staking.go @@ -0,0 +1,32 @@ +// Copyright (C) 2023, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. +package utils + +import ( + "encoding/pem" + "fmt" + + "github.com/ava-labs/avalanchego/ids" + "github.com/ava-labs/avalanchego/staking" + "github.com/ava-labs/avalanchego/utils/crypto/bls" +) + +func NewBlsSecretKeyBytes() ([]byte, error) { + blsSignerKey, err := bls.NewSecretKey() + if err != nil { + return nil, err + } + return bls.SecretKeyToBytes(blsSignerKey), nil +} + +func ToNodeID(certBytes []byte) (ids.NodeID, error) { + block, _ := pem.Decode(certBytes) + if block == nil { + return ids.EmptyNodeID, fmt.Errorf("failed to decode certificate") + } + cert, err := staking.ParseCertificate(block.Bytes) + if err != nil { + return ids.EmptyNodeID, err + } + return ids.NodeIDFromCert(cert), nil +} From f78d6a5b8f2ec55b6873f629d002493fc359aadb Mon Sep 17 00:00:00 2001 From: Artur Reznikov Date: Tue, 25 Jun 2024 14:15:56 -0700 Subject: [PATCH 08/30] update script --- host/shell/setupDockerService.sh | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/host/shell/setupDockerService.sh b/host/shell/setupDockerService.sh index 64219d7..a6ac140 100644 --- a/host/shell/setupDockerService.sh +++ b/host/shell/setupDockerService.sh @@ -1,5 +1,17 @@ #!/usr/bin/env bash +# Check if Docker is installed +if ! command -v docker &> /dev/null; then + echo "Docker is not installed. Please install Docker and try again." + exit 1 +fi + +# Check if Docker Compose is installed +if ! docker compose version &> /dev/null; then + echo "Docker Compose is not installed or not configured correctly. Please install Docker Compose and try again." + exit 1 +fi + # Provide docker-compose systemctl unit file cat << EOF | sudo tee /etc/systemd/system/avalanche-cli-docker.service [Unit] @@ -15,7 +27,14 @@ ExecStart=/usr/bin/docker compose -f /home/ubuntu/.avalanche-cli/services/docker ExecStop=/usr/bin/docker compose -f /home/ubuntu/.avalanche-cli/services/docker-compose.yml down [Install] -WantedBy=default.target +WantedBy=multi-user.target EOF +# Reload systemd manager configuration +sudo systemctl daemon-reload + +# Enable the new service sudo systemctl enable avalanche-cli-docker.service + +echo "Service created and enabled successfully." + From 2188f4f15c1c4e632cd10352536bc9f76984cb83 Mon Sep 17 00:00:00 2001 From: Artur Reznikov Date: Tue, 25 Jun 2024 15:29:42 -0700 Subject: [PATCH 09/30] shell lint --- host/shell/buildLoadTestDeps.sh | 14 ++++++------- host/shell/setupBuildEnv.sh | 34 +++++++++++++++--------------- host/shell/setupCLIFromSource.sh | 36 ++++++++++++++++---------------- host/shell/setupDockerService.sh | 15 +++++++------ host/shell/setupNode.sh | 6 +++--- 5 files changed, 52 insertions(+), 53 deletions(-) diff --git a/host/shell/buildLoadTestDeps.sh b/host/shell/buildLoadTestDeps.sh index daf7bdb..14cfe0e 100644 --- a/host/shell/buildLoadTestDeps.sh +++ b/host/shell/buildLoadTestDeps.sh @@ -3,13 +3,13 @@ echo "ensuring that gcc is installed ..." export DEBIAN_FRONTEND=noninteractive while ! gcc --version >/dev/null 2>&1; do - echo "GCC is not installed. Trying to install..." - sudo apt-get -y -o DPkg::Lock::Timeout=120 update - sudo apt-get -y -o DPkg::Lock::Timeout=120 install gcc - if [ $? -ne 0 ]; then - echo "Failed to install GCC. Retrying in 10 seconds..." - sleep 10 - fi + echo "GCC is not installed. Trying to install..." + sudo apt-get -y -o DPkg::Lock::Timeout=120 update + sudo apt-get -y -o DPkg::Lock::Timeout=120 install gcc + if [ $? -ne 0 ]; then + echo "Failed to install GCC. Retrying in 10 seconds..." + sleep 10 + fi done # install go echo "ensuring that go is installed ..." diff --git a/host/shell/setupBuildEnv.sh b/host/shell/setupBuildEnv.sh index 2ad7842..c3ebb03 100755 --- a/host/shell/setupBuildEnv.sh +++ b/host/shell/setupBuildEnv.sh @@ -2,25 +2,25 @@ #name:TASK [install gcc if not available] export DEBIAN_FRONTEND=noninteractive while ! gcc --version >/dev/null 2>&1; do - echo "GCC is not installed. Trying to install..." - sudo apt-get -y -o DPkg::Lock::Timeout=120 update - sudo apt-get -y -o DPkg::Lock::Timeout=120 install gcc - if [ $? -ne 0 ]; then - echo "Failed to install GCC. Retrying in 10 seconds..." - sleep 10 - fi + echo "GCC is not installed. Trying to install..." + sudo apt-get -y -o DPkg::Lock::Timeout=120 update + sudo apt-get -y -o DPkg::Lock::Timeout=120 install gcc + if [[ $? -ne 0 ]]; then + echo "Failed to install GCC. Retrying in 10 seconds..." + sleep 10 + fi done #name:TASK [install go] install_go() { - ARCH=amd64 - [[ "$(uname -m)" == "aarch64" ]] && ARCH=arm64 - GOFILE="go{{ .GoVersion }}.linux-$ARCH.tar.gz" - cd - sudo rm -rf $GOFILE go - wget -q -nv https://go.dev/dl/$GOFILE - tar xfz $GOFILE - echo >> ~/.bashrc - echo export PATH=\$PATH:~/go/bin:~/bin >> ~/.bashrc - echo export CGO_ENABLED=1 >> ~/.bashrc + ARCH=amd64 + [[ "$(uname -m)" == "aarch64" ]] && ARCH=arm64 + GOFILE="go{{ .GoVersion }}.linux-$ARCH.tar.gz" + cd + sudo rm -rf $GOFILE go + wget -q -nv https://go.dev/dl/$GOFILE + tar xfz $GOFILE + echo >>~/.bashrc + echo export PATH=\$PATH:~/go/bin:~/bin >>~/.bashrc + echo export CGO_ENABLED=1 >>~/.bashrc } go version || install_go diff --git a/host/shell/setupCLIFromSource.sh b/host/shell/setupCLIFromSource.sh index a1a7283..c6055f5 100644 --- a/host/shell/setupCLIFromSource.sh +++ b/host/shell/setupCLIFromSource.sh @@ -4,33 +4,33 @@ set -e #name:TASK [install gcc] export DEBIAN_FRONTEND=noninteractive while ! gcc --version >/dev/null 2>&1; do - echo "GCC is not installed. Trying to install..." - sudo apt-get -y -o DPkg::Lock::Timeout=120 update - sudo apt-get -y -o DPkg::Lock::Timeout=120 install gcc - if [ $? -ne 0 ]; then - echo "Failed to install GCC. Retrying in 10 seconds..." - sleep 10 - fi + echo "GCC is not installed. Trying to install..." + sudo apt-get -y -o DPkg::Lock::Timeout=120 update + sudo apt-get -y -o DPkg::Lock::Timeout=120 install gcc + if [ $? -ne 0 ]; then + echo "Failed to install GCC. Retrying in 10 seconds..." + sleep 10 + fi done #name:TASK [install go] install_go() { - ARCH=amd64 - [[ "$(uname -m)" == "aarch64" ]] && ARCH=arm64 - GOFILE="go{{ .GoVersion }}.linux-$ARCH.tar.gz" - cd - sudo rm -rf $GOFILE go - wget -q -nv https://go.dev/dl/$GOFILE - tar xfz $GOFILE - echo >> ~/.bashrc - echo export PATH=\$PATH:~/go/bin:~/bin >> ~/.bashrc - echo export CGO_ENABLED=1 >> ~/.bashrc + ARCH=amd64 + [[ "$(uname -m)" == "aarch64" ]] && ARCH=arm64 + GOFILE="go{{ .GoVersion }}.linux-$ARCH.tar.gz" + cd + sudo rm -rf $GOFILE go + wget -q -nv https://go.dev/dl/$GOFILE + tar xfz $GOFILE + echo >>~/.bashrc + echo export PATH=\$PATH:~/go/bin:~/bin >>~/.bashrc + echo export CGO_ENABLED=1 >>~/.bashrc } go version || install_go export PATH=$PATH:~/go/bin #name:TASK [build avalanche-cli] cd ~ rm -rf avalanche-cli -git clone --single-branch -b {{ .CliBranch }} https://github.com/ava-labs/avalanche-cli +git clone --single-branch -b {{ .CliBranch }} https://github.com/ava-labs/avalanche-cli cd avalanche-cli ./scripts/build.sh cp bin/avalanche ~/bin/avalanche diff --git a/host/shell/setupDockerService.sh b/host/shell/setupDockerService.sh index a6ac140..547f25d 100644 --- a/host/shell/setupDockerService.sh +++ b/host/shell/setupDockerService.sh @@ -1,19 +1,19 @@ #!/usr/bin/env bash # Check if Docker is installed -if ! command -v docker &> /dev/null; then - echo "Docker is not installed. Please install Docker and try again." - exit 1 +if ! command -v docker &>/dev/null; then + echo "Docker is not installed. Please install Docker and try again." + exit 1 fi # Check if Docker Compose is installed -if ! docker compose version &> /dev/null; then - echo "Docker Compose is not installed or not configured correctly. Please install Docker Compose and try again." - exit 1 +if ! docker compose version &>/dev/null; then + echo "Docker Compose is not installed or not configured correctly. Please install Docker Compose and try again." + exit 1 fi # Provide docker-compose systemctl unit file -cat << EOF | sudo tee /etc/systemd/system/avalanche-cli-docker.service +cat < /dev/null +echo deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo \"$VERSION_CODENAME\") stable | sudo tee /etc/apt/sources.list.d/docker.list >/dev/null sudo apt-get -y update && sudo apt-get -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-compose sudo usermod -aG docker ubuntu sudo chgrp ubuntu /var/run/docker.sock sudo chmod +rw /var/run/docker.sock export PATH=$PATH:~/go/bin mkdir -p ~/.avalanche-cli -rm -vf install.sh && busybox wget -q -nd https://raw.githubusercontent.com/ava-labs/avalanche-cli/main/scripts/install.sh +rm -vf install.sh && busybox wget -q -nd https://raw.githubusercontent.com/ava-labs/avalanche-cli/main/scripts/install.sh #name:TASK [modify permissions] chmod 755 install.sh #name:TASK [run install script] From 9d5a0058135f234534bc708e4512ed1a6972795e Mon Sep 17 00:00:00 2001 From: Artur Reznikov Date: Tue, 25 Jun 2024 15:34:36 -0700 Subject: [PATCH 10/30] text/template --- host/dockerCompose.go | 2 +- host/ssh.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/host/dockerCompose.go b/host/dockerCompose.go index 97c4c24..1f339ff 100644 --- a/host/dockerCompose.go +++ b/host/dockerCompose.go @@ -7,10 +7,10 @@ import ( "bytes" "embed" "fmt" - "html/template" "os" "path/filepath" "strings" + "text/template" "time" "github.com/ava-labs/avalanche-tooling-sdk-go/constants" diff --git a/host/ssh.go b/host/ssh.go index 0d337d4..d05c93a 100644 --- a/host/ssh.go +++ b/host/ssh.go @@ -7,10 +7,10 @@ import ( "bytes" "embed" "fmt" - "html/template" "os" "path/filepath" "strconv" + "text/template" "time" "github.com/ava-labs/avalanche-tooling-sdk-go/constants" From 331039833528fe1d6ad455de0fef80e9bacb45a1 Mon Sep 17 00:00:00 2001 From: Artur Reznikov Date: Tue, 25 Jun 2024 15:47:33 -0700 Subject: [PATCH 11/30] fix tmpl --- host/config/avalanche.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/host/config/avalanche.go b/host/config/avalanche.go index dfc8cfa..8c4bf3a 100644 --- a/host/config/avalanche.go +++ b/host/config/avalanche.go @@ -5,8 +5,8 @@ package services import ( "bytes" - "html/template" "path/filepath" + "text/template" "github.com/ava-labs/avalanche-tooling-sdk-go/constants" ) From 7739b507762469d0e64dd9b92f66cc7e706f46ff Mon Sep 17 00:00:00 2001 From: Artur Reznikov Date: Tue, 25 Jun 2024 15:59:52 -0700 Subject: [PATCH 12/30] fix example --- examples/aws.go | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/examples/aws.go b/examples/aws.go index a52ae57..1405c7f 100644 --- a/examples/aws.go +++ b/examples/aws.go @@ -6,7 +6,6 @@ package main import ( "context" "fmt" - "os" "time" "github.com/ava-labs/avalanche-tooling-sdk-go/host" @@ -58,20 +57,13 @@ func main() { } else { fmt.Println(string(output)) } + // sleep for 10 seconds allowing avalancghego container to start + time.Sleep(10 * time.Second) //check if avalanchego is running if output, err := h.Commandf(nil, sshCommandTimeout, "docker ps"); err != nil { panic(err) } else { fmt.Println(string(output)) } - - //generate and provide staking certificate and key - keyPath := os.TempDir() - defer os.RemoveAll(keyPath) - if err := h.ProvideStakingCertAndKey(keyPath); err != nil { - panic(err) - } - // show content of the local keyPath folder - } } From 44bc7d2bf3f7236ac7e6a590cf6d962257d87a52 Mon Sep 17 00:00:00 2001 From: Artur Reznikov Date: Tue, 25 Jun 2024 16:19:43 -0700 Subject: [PATCH 13/30] mv host to node --- {host => node}/cloud.go | 0 {host => node}/config/avalanche.go | 0 {host => node}/config/grafana.go | 0 {host => node}/config/loki.go | 0 {host => node}/config/main.go | 0 {host => node}/config/prometheus.go | 0 {host => node}/config/promtail.go | 0 {host => node}/config/templates/avalanche-cchain.tmpl | 0 {host => node}/config/templates/avalanche-node.tmpl | 0 {host => node}/config/templates/grafana-dashboards.yaml | 0 {host => node}/config/templates/grafana-loki-datasource.yaml | 0 .../config/templates/grafana-prometheus-datasource.yaml | 0 {host => node}/config/templates/grafana.ini | 0 {host => node}/create.go | 0 {host => node}/destroy.go | 0 {host => node}/dockerCompose.go | 0 {host => node}/dockerConfig.go | 0 {host => node}/dockerImage.go | 0 {host => node}/dockerSsh.go | 0 {host => node}/host.go | 0 {host => node}/hostResult.go | 0 {host => node}/monitoring/configs/loki.yml | 0 {host => node}/monitoring/configs/prometheus.yml | 0 {host => node}/monitoring/configs/promtail.yml | 0 {host => node}/monitoring/dashboards/c_chain.json | 0 {host => node}/monitoring/dashboards/database.json | 0 {host => node}/monitoring/dashboards/logs.json | 0 {host => node}/monitoring/dashboards/machine.json | 0 {host => node}/monitoring/dashboards/main.json | 0 {host => node}/monitoring/dashboards/network.json | 0 {host => node}/monitoring/dashboards/p_chain.json | 0 {host => node}/monitoring/dashboards/subnets.json | 0 {host => node}/monitoring/dashboards/x_chain.json | 0 {host => node}/monitoring/monitoring.go | 0 {host => node}/net.go | 0 {host => node}/shell/buildLoadTestDeps.sh | 0 {host => node}/shell/getNewSubnetEVMRelease.sh | 0 {host => node}/shell/setupBuildEnv.sh | 0 {host => node}/shell/setupCLIFromSource.sh | 0 {host => node}/shell/setupDockerService.sh | 0 {host => node}/shell/setupNode.sh | 0 {host => node}/ssh.go | 0 {host => node}/staking.go | 0 {host => node}/supported.go | 0 {host => node}/templates/avalanchego.docker-compose.yml | 0 {host => node}/templates/awmrelayer.docker-compose.yml | 0 {host => node}/templates/monitoring.docker-compose.yml | 0 {host => node}/utils.go | 0 {host => node}/utils_test.go | 0 49 files changed, 0 insertions(+), 0 deletions(-) rename {host => node}/cloud.go (100%) rename {host => node}/config/avalanche.go (100%) rename {host => node}/config/grafana.go (100%) rename {host => node}/config/loki.go (100%) rename {host => node}/config/main.go (100%) rename {host => node}/config/prometheus.go (100%) rename {host => node}/config/promtail.go (100%) rename {host => node}/config/templates/avalanche-cchain.tmpl (100%) rename {host => node}/config/templates/avalanche-node.tmpl (100%) rename {host => node}/config/templates/grafana-dashboards.yaml (100%) rename {host => node}/config/templates/grafana-loki-datasource.yaml (100%) rename {host => node}/config/templates/grafana-prometheus-datasource.yaml (100%) rename {host => node}/config/templates/grafana.ini (100%) rename {host => node}/create.go (100%) rename {host => node}/destroy.go (100%) rename {host => node}/dockerCompose.go (100%) rename {host => node}/dockerConfig.go (100%) rename {host => node}/dockerImage.go (100%) rename {host => node}/dockerSsh.go (100%) rename {host => node}/host.go (100%) rename {host => node}/hostResult.go (100%) rename {host => node}/monitoring/configs/loki.yml (100%) rename {host => node}/monitoring/configs/prometheus.yml (100%) rename {host => node}/monitoring/configs/promtail.yml (100%) rename {host => node}/monitoring/dashboards/c_chain.json (100%) rename {host => node}/monitoring/dashboards/database.json (100%) rename {host => node}/monitoring/dashboards/logs.json (100%) rename {host => node}/monitoring/dashboards/machine.json (100%) rename {host => node}/monitoring/dashboards/main.json (100%) rename {host => node}/monitoring/dashboards/network.json (100%) rename {host => node}/monitoring/dashboards/p_chain.json (100%) rename {host => node}/monitoring/dashboards/subnets.json (100%) rename {host => node}/monitoring/dashboards/x_chain.json (100%) rename {host => node}/monitoring/monitoring.go (100%) rename {host => node}/net.go (100%) rename {host => node}/shell/buildLoadTestDeps.sh (100%) rename {host => node}/shell/getNewSubnetEVMRelease.sh (100%) rename {host => node}/shell/setupBuildEnv.sh (100%) rename {host => node}/shell/setupCLIFromSource.sh (100%) rename {host => node}/shell/setupDockerService.sh (100%) rename {host => node}/shell/setupNode.sh (100%) rename {host => node}/ssh.go (100%) rename {host => node}/staking.go (100%) rename {host => node}/supported.go (100%) rename {host => node}/templates/avalanchego.docker-compose.yml (100%) rename {host => node}/templates/awmrelayer.docker-compose.yml (100%) rename {host => node}/templates/monitoring.docker-compose.yml (100%) rename {host => node}/utils.go (100%) rename {host => node}/utils_test.go (100%) diff --git a/host/cloud.go b/node/cloud.go similarity index 100% rename from host/cloud.go rename to node/cloud.go diff --git a/host/config/avalanche.go b/node/config/avalanche.go similarity index 100% rename from host/config/avalanche.go rename to node/config/avalanche.go diff --git a/host/config/grafana.go b/node/config/grafana.go similarity index 100% rename from host/config/grafana.go rename to node/config/grafana.go diff --git a/host/config/loki.go b/node/config/loki.go similarity index 100% rename from host/config/loki.go rename to node/config/loki.go diff --git a/host/config/main.go b/node/config/main.go similarity index 100% rename from host/config/main.go rename to node/config/main.go diff --git a/host/config/prometheus.go b/node/config/prometheus.go similarity index 100% rename from host/config/prometheus.go rename to node/config/prometheus.go diff --git a/host/config/promtail.go b/node/config/promtail.go similarity index 100% rename from host/config/promtail.go rename to node/config/promtail.go diff --git a/host/config/templates/avalanche-cchain.tmpl b/node/config/templates/avalanche-cchain.tmpl similarity index 100% rename from host/config/templates/avalanche-cchain.tmpl rename to node/config/templates/avalanche-cchain.tmpl diff --git a/host/config/templates/avalanche-node.tmpl b/node/config/templates/avalanche-node.tmpl similarity index 100% rename from host/config/templates/avalanche-node.tmpl rename to node/config/templates/avalanche-node.tmpl diff --git a/host/config/templates/grafana-dashboards.yaml b/node/config/templates/grafana-dashboards.yaml similarity index 100% rename from host/config/templates/grafana-dashboards.yaml rename to node/config/templates/grafana-dashboards.yaml diff --git a/host/config/templates/grafana-loki-datasource.yaml b/node/config/templates/grafana-loki-datasource.yaml similarity index 100% rename from host/config/templates/grafana-loki-datasource.yaml rename to node/config/templates/grafana-loki-datasource.yaml diff --git a/host/config/templates/grafana-prometheus-datasource.yaml b/node/config/templates/grafana-prometheus-datasource.yaml similarity index 100% rename from host/config/templates/grafana-prometheus-datasource.yaml rename to node/config/templates/grafana-prometheus-datasource.yaml diff --git a/host/config/templates/grafana.ini b/node/config/templates/grafana.ini similarity index 100% rename from host/config/templates/grafana.ini rename to node/config/templates/grafana.ini diff --git a/host/create.go b/node/create.go similarity index 100% rename from host/create.go rename to node/create.go diff --git a/host/destroy.go b/node/destroy.go similarity index 100% rename from host/destroy.go rename to node/destroy.go diff --git a/host/dockerCompose.go b/node/dockerCompose.go similarity index 100% rename from host/dockerCompose.go rename to node/dockerCompose.go diff --git a/host/dockerConfig.go b/node/dockerConfig.go similarity index 100% rename from host/dockerConfig.go rename to node/dockerConfig.go diff --git a/host/dockerImage.go b/node/dockerImage.go similarity index 100% rename from host/dockerImage.go rename to node/dockerImage.go diff --git a/host/dockerSsh.go b/node/dockerSsh.go similarity index 100% rename from host/dockerSsh.go rename to node/dockerSsh.go diff --git a/host/host.go b/node/host.go similarity index 100% rename from host/host.go rename to node/host.go diff --git a/host/hostResult.go b/node/hostResult.go similarity index 100% rename from host/hostResult.go rename to node/hostResult.go diff --git a/host/monitoring/configs/loki.yml b/node/monitoring/configs/loki.yml similarity index 100% rename from host/monitoring/configs/loki.yml rename to node/monitoring/configs/loki.yml diff --git a/host/monitoring/configs/prometheus.yml b/node/monitoring/configs/prometheus.yml similarity index 100% rename from host/monitoring/configs/prometheus.yml rename to node/monitoring/configs/prometheus.yml diff --git a/host/monitoring/configs/promtail.yml b/node/monitoring/configs/promtail.yml similarity index 100% rename from host/monitoring/configs/promtail.yml rename to node/monitoring/configs/promtail.yml diff --git a/host/monitoring/dashboards/c_chain.json b/node/monitoring/dashboards/c_chain.json similarity index 100% rename from host/monitoring/dashboards/c_chain.json rename to node/monitoring/dashboards/c_chain.json diff --git a/host/monitoring/dashboards/database.json b/node/monitoring/dashboards/database.json similarity index 100% rename from host/monitoring/dashboards/database.json rename to node/monitoring/dashboards/database.json diff --git a/host/monitoring/dashboards/logs.json b/node/monitoring/dashboards/logs.json similarity index 100% rename from host/monitoring/dashboards/logs.json rename to node/monitoring/dashboards/logs.json diff --git a/host/monitoring/dashboards/machine.json b/node/monitoring/dashboards/machine.json similarity index 100% rename from host/monitoring/dashboards/machine.json rename to node/monitoring/dashboards/machine.json diff --git a/host/monitoring/dashboards/main.json b/node/monitoring/dashboards/main.json similarity index 100% rename from host/monitoring/dashboards/main.json rename to node/monitoring/dashboards/main.json diff --git a/host/monitoring/dashboards/network.json b/node/monitoring/dashboards/network.json similarity index 100% rename from host/monitoring/dashboards/network.json rename to node/monitoring/dashboards/network.json diff --git a/host/monitoring/dashboards/p_chain.json b/node/monitoring/dashboards/p_chain.json similarity index 100% rename from host/monitoring/dashboards/p_chain.json rename to node/monitoring/dashboards/p_chain.json diff --git a/host/monitoring/dashboards/subnets.json b/node/monitoring/dashboards/subnets.json similarity index 100% rename from host/monitoring/dashboards/subnets.json rename to node/monitoring/dashboards/subnets.json diff --git a/host/monitoring/dashboards/x_chain.json b/node/monitoring/dashboards/x_chain.json similarity index 100% rename from host/monitoring/dashboards/x_chain.json rename to node/monitoring/dashboards/x_chain.json diff --git a/host/monitoring/monitoring.go b/node/monitoring/monitoring.go similarity index 100% rename from host/monitoring/monitoring.go rename to node/monitoring/monitoring.go diff --git a/host/net.go b/node/net.go similarity index 100% rename from host/net.go rename to node/net.go diff --git a/host/shell/buildLoadTestDeps.sh b/node/shell/buildLoadTestDeps.sh similarity index 100% rename from host/shell/buildLoadTestDeps.sh rename to node/shell/buildLoadTestDeps.sh diff --git a/host/shell/getNewSubnetEVMRelease.sh b/node/shell/getNewSubnetEVMRelease.sh similarity index 100% rename from host/shell/getNewSubnetEVMRelease.sh rename to node/shell/getNewSubnetEVMRelease.sh diff --git a/host/shell/setupBuildEnv.sh b/node/shell/setupBuildEnv.sh similarity index 100% rename from host/shell/setupBuildEnv.sh rename to node/shell/setupBuildEnv.sh diff --git a/host/shell/setupCLIFromSource.sh b/node/shell/setupCLIFromSource.sh similarity index 100% rename from host/shell/setupCLIFromSource.sh rename to node/shell/setupCLIFromSource.sh diff --git a/host/shell/setupDockerService.sh b/node/shell/setupDockerService.sh similarity index 100% rename from host/shell/setupDockerService.sh rename to node/shell/setupDockerService.sh diff --git a/host/shell/setupNode.sh b/node/shell/setupNode.sh similarity index 100% rename from host/shell/setupNode.sh rename to node/shell/setupNode.sh diff --git a/host/ssh.go b/node/ssh.go similarity index 100% rename from host/ssh.go rename to node/ssh.go diff --git a/host/staking.go b/node/staking.go similarity index 100% rename from host/staking.go rename to node/staking.go diff --git a/host/supported.go b/node/supported.go similarity index 100% rename from host/supported.go rename to node/supported.go diff --git a/host/templates/avalanchego.docker-compose.yml b/node/templates/avalanchego.docker-compose.yml similarity index 100% rename from host/templates/avalanchego.docker-compose.yml rename to node/templates/avalanchego.docker-compose.yml diff --git a/host/templates/awmrelayer.docker-compose.yml b/node/templates/awmrelayer.docker-compose.yml similarity index 100% rename from host/templates/awmrelayer.docker-compose.yml rename to node/templates/awmrelayer.docker-compose.yml diff --git a/host/templates/monitoring.docker-compose.yml b/node/templates/monitoring.docker-compose.yml similarity index 100% rename from host/templates/monitoring.docker-compose.yml rename to node/templates/monitoring.docker-compose.yml diff --git a/host/utils.go b/node/utils.go similarity index 100% rename from host/utils.go rename to node/utils.go diff --git a/host/utils_test.go b/node/utils_test.go similarity index 100% rename from host/utils_test.go rename to node/utils_test.go From 8e8d9815dd5b2fed1a7c1b90743c394fe91f1b5a Mon Sep 17 00:00:00 2001 From: Artur Reznikov Date: Tue, 25 Jun 2024 16:23:48 -0700 Subject: [PATCH 14/30] prepare for merge --- node/cloud.go | 2 +- node/create.go | 10 +++--- node/destroy.go | 2 +- node/dockerCompose.go | 2 +- node/dockerConfig.go | 2 +- node/dockerImage.go | 2 +- node/dockerSsh.go | 2 +- node/net.go | 2 +- node/{host.go => node.go} | 2 +- node/{hostResult.go => nodeResult.go} | 48 +++++++++++++-------------- node/ssh.go | 2 +- node/staking.go | 2 +- node/supported.go | 2 +- node/utils.go | 2 +- node/utils_test.go | 2 +- 15 files changed, 42 insertions(+), 42 deletions(-) rename node/{host.go => node.go} (99%) rename node/{hostResult.go => nodeResult.go} (56%) diff --git a/node/cloud.go b/node/cloud.go index 9fd6571..bb825dc 100644 --- a/node/cloud.go +++ b/node/cloud.go @@ -1,7 +1,7 @@ // Copyright (C) 2024, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. -package host +package node import ( "context" diff --git a/node/create.go b/node/create.go index 033e886..d4ca208 100644 --- a/node/create.go +++ b/node/create.go @@ -1,7 +1,7 @@ // Copyright (C) 2024, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. -package host +package node import ( "context" @@ -142,18 +142,18 @@ func CreateInstanceList( return nil, err } wg := sync.WaitGroup{} - wgResults := HostResults{} + wgResults := NodeResults{} // wait for all hosts to be ready and provision based on the role list for _, host := range hosts { wg.Add(1) - go func(hostResults *HostResults, host Host) { + go func(NodeResults *NodeResults, host Host) { defer wg.Done() if err := host.WaitForSSHShell(constants.SSHScriptTimeout); err != nil { - hostResults.AddResult(host.NodeID, nil, err) + NodeResults.AddResult(host.NodeID, nil, err) return } if err := provisionHost(host, roles, networkID, avalancheGoVersion, avalancheCliVersion, withMonitoring); err != nil { - hostResults.AddResult(host.NodeID, nil, err) + NodeResults.AddResult(host.NodeID, nil, err) return } }(&wgResults, host) diff --git a/node/destroy.go b/node/destroy.go index 85082e7..e2dfd02 100644 --- a/node/destroy.go +++ b/node/destroy.go @@ -1,7 +1,7 @@ // Copyright (C) 2024, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. -package host +package node import ( "context" diff --git a/node/dockerCompose.go b/node/dockerCompose.go index 1f339ff..c0c5975 100644 --- a/node/dockerCompose.go +++ b/node/dockerCompose.go @@ -1,7 +1,7 @@ // Copyright (C) 2024, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. -package host +package node import ( "bytes" diff --git a/node/dockerConfig.go b/node/dockerConfig.go index e0bcbbb..d7f833e 100644 --- a/node/dockerConfig.go +++ b/node/dockerConfig.go @@ -1,7 +1,7 @@ // Copyright (C) 2024, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. -package host +package node import ( "os" diff --git a/node/dockerImage.go b/node/dockerImage.go index 185663f..0da0d11 100644 --- a/node/dockerImage.go +++ b/node/dockerImage.go @@ -1,7 +1,7 @@ // Copyright (C) 2024, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. -package host +package node import ( "strings" diff --git a/node/dockerSsh.go b/node/dockerSsh.go index 567fc8a..8c3de8a 100644 --- a/node/dockerSsh.go +++ b/node/dockerSsh.go @@ -1,7 +1,7 @@ // Copyright (C) 2024, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. -package host +package node import ( "fmt" diff --git a/node/net.go b/node/net.go index 9cc1251..c9e6e28 100644 --- a/node/net.go +++ b/node/net.go @@ -1,7 +1,7 @@ // Copyright (C) 2024, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. -package host +package node import ( "fmt" diff --git a/node/host.go b/node/node.go similarity index 99% rename from node/host.go rename to node/node.go index 4868922..a3bfd20 100644 --- a/node/host.go +++ b/node/node.go @@ -1,7 +1,7 @@ // Copyright (C) 2024, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. -package host +package node import ( "bufio" diff --git a/node/hostResult.go b/node/nodeResult.go similarity index 56% rename from node/hostResult.go rename to node/nodeResult.go index 65faf1b..0f3f02e 100644 --- a/node/hostResult.go +++ b/node/nodeResult.go @@ -1,9 +1,9 @@ -package host +package node import "sync" -// HostResult is a struct that holds the result of a async command executed on a host -type HostResult struct { +// NodeResult is a struct that holds the result of a async command executed on a host +type NodeResult struct { // ID of the host NodeID string @@ -14,32 +14,32 @@ type HostResult struct { Err error } -// HostResults is a struct that holds the results of multiple async commands executed on multiple hosts -type HostResults struct { - Results []HostResult +// NodeResults is a struct that holds the results of multiple async commands executed on multiple hosts +type NodeResults struct { + Results []NodeResult Lock sync.Mutex } -// AddResult adds a result to the HostResults -func (nr *HostResults) AddResult(nodeID string, value interface{}, err error) { +// AddResult adds a result to the NodeResults +func (nr *NodeResults) AddResult(nodeID string, value interface{}, err error) { nr.Lock.Lock() defer nr.Lock.Unlock() - nr.Results = append(nr.Results, HostResult{ + nr.Results = append(nr.Results, NodeResult{ NodeID: nodeID, Value: value, Err: err, }) } -// GetResults returns the results of the HostResults -func (nr *HostResults) GetResults() []HostResult { +// GetResults returns the results of the NodeResults +func (nr *NodeResults) GetResults() []NodeResult { nr.Lock.Lock() defer nr.Lock.Unlock() return nr.Results } -// GetResultMap returns a map of the results of the HostResults with the nodeID as the key -func (nr *HostResults) GetResultMap() map[string]interface{} { +// GetResultMap returns a map of the results of the NodeResults with the nodeID as the key +func (nr *NodeResults) GetResultMap() map[string]interface{} { nr.Lock.Lock() defer nr.Lock.Unlock() result := map[string]interface{}{} @@ -49,15 +49,15 @@ func (nr *HostResults) GetResultMap() map[string]interface{} { return result } -// GetErrorMap returns a map of the errors of the HostResults with the nodeID as the key -func (nr *HostResults) Len() int { +// GetErrorMap returns a map of the errors of the NodeResults with the nodeID as the key +func (nr *NodeResults) Len() int { nr.Lock.Lock() defer nr.Lock.Unlock() return len(nr.Results) } -// GetNodeList returns a list of the nodeIDs of the HostResults -func (nr *HostResults) GetNodeList() []string { +// GetNodeList returns a list of the nodeIDs of the NodeResults +func (nr *NodeResults) GetNodeList() []string { nr.Lock.Lock() defer nr.Lock.Unlock() nodes := []string{} @@ -67,8 +67,8 @@ func (nr *HostResults) GetNodeList() []string { return nodes } -// GetErrorMap returns a map of the errors of the HostResults with the nodeID as the key -func (nr *HostResults) GetErrorHostMap() map[string]error { +// GetErrorMap returns a map of the errors of the NodeResults with the nodeID as the key +func (nr *NodeResults) GetErrorHostMap() map[string]error { nr.Lock.Lock() defer nr.Lock.Unlock() hostErrors := make(map[string]error) @@ -81,7 +81,7 @@ func (nr *HostResults) GetErrorHostMap() map[string]error { } // HasNodeIDWithError checks if a node with the given nodeID has an error -func (nr *HostResults) HasNodeIDWithError(nodeID string) bool { +func (nr *NodeResults) HasNodeIDWithError(nodeID string) bool { nr.Lock.Lock() defer nr.Lock.Unlock() for _, node := range nr.Results { @@ -92,13 +92,13 @@ func (nr *HostResults) HasNodeIDWithError(nodeID string) bool { return false } -// HasErrors returns true if the HostResults has any errors -func (nr *HostResults) HasErrors() bool { +// HasErrors returns true if the NodeResults has any errors +func (nr *NodeResults) HasErrors() bool { return len(nr.GetErrorHostMap()) > 0 } -// GetErrorHosts returns a list of the nodeIDs of the HostResults that have errors -func (nr *HostResults) GetErrorHosts() []string { +// GetErrorHosts returns a list of the nodeIDs of the NodeResults that have errors +func (nr *NodeResults) GetErrorHosts() []string { var nodes []string for _, node := range nr.Results { if node.Err != nil { diff --git a/node/ssh.go b/node/ssh.go index d05c93a..9a44120 100644 --- a/node/ssh.go +++ b/node/ssh.go @@ -1,7 +1,7 @@ // Copyright (C) 2024, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. -package host +package node import ( "bytes" diff --git a/node/staking.go b/node/staking.go index 5e9e51c..40a6959 100644 --- a/node/staking.go +++ b/node/staking.go @@ -1,7 +1,7 @@ // Copyright (C) 2024, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. -package host +package node import ( "os" diff --git a/node/supported.go b/node/supported.go index 99d2986..5932668 100644 --- a/node/supported.go +++ b/node/supported.go @@ -1,7 +1,7 @@ // Copyright (C) 2024, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. -package host +package node import ( "fmt" diff --git a/node/utils.go b/node/utils.go index 07aaa2e..3f604a8 100644 --- a/node/utils.go +++ b/node/utils.go @@ -1,7 +1,7 @@ // Copyright (C) 2024, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. -package host +package node import ( "encoding/json" diff --git a/node/utils_test.go b/node/utils_test.go index bd2d1f0..821d2b4 100644 --- a/node/utils_test.go +++ b/node/utils_test.go @@ -1,7 +1,7 @@ // Copyright (C) 2024, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. -package host +package node import ( "os" From e3d55726136c58f975668bfc4a3fd1c5e207a67f Mon Sep 17 00:00:00 2001 From: Artur Reznikov Date: Tue, 25 Jun 2024 16:28:02 -0700 Subject: [PATCH 15/30] fmt --- examples/aws.go | 2 +- node/create.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/aws.go b/examples/aws.go index 1405c7f..b611179 100644 --- a/examples/aws.go +++ b/examples/aws.go @@ -59,7 +59,7 @@ func main() { } // sleep for 10 seconds allowing avalancghego container to start time.Sleep(10 * time.Second) - //check if avalanchego is running + // check if avalanchego is running if output, err := h.Commandf(nil, sshCommandTimeout, "docker ps"); err != nil { panic(err) } else { diff --git a/node/create.go b/node/create.go index d4ca208..b403c64 100644 --- a/node/create.go +++ b/node/create.go @@ -224,7 +224,7 @@ func provisionAvagoHost(host Host, networkID string, avalancheGoVersion string, return nil } -func provisionLoadTestHost(host Host) error { //stub +func provisionLoadTestHost(host Host) error { // stub if err := host.ComposeSSHSetupLoadTest(); err != nil { return err } @@ -234,7 +234,7 @@ func provisionLoadTestHost(host Host) error { //stub return nil } -func provisionMonitoringHost(host Host) error { //stub +func provisionMonitoringHost(host Host) error { // stub if err := host.ComposeSSHSetupMonitoring(); err != nil { return err } @@ -244,7 +244,7 @@ func provisionMonitoringHost(host Host) error { //stub return nil } -func provisionAWMRelayerHost(host Host) error { //stub +func provisionAWMRelayerHost(host Host) error { // stub if err := host.ComposeSSHSetupAWMRelayer(); err != nil { return err } From f349363ab61fa0fb582f5f9f2bbee6bfd27789fc Mon Sep 17 00:00:00 2001 From: Artur Reznikov Date: Tue, 25 Jun 2024 22:55:52 -0700 Subject: [PATCH 16/30] fix rename --- node/ssh.go | 32 ++++++++++++++++---------------- node/staking.go | 4 ++-- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/node/ssh.go b/node/ssh.go index 9a44120..13405b7 100644 --- a/node/ssh.go +++ b/node/ssh.go @@ -48,7 +48,7 @@ var script embed.FS // RunOverSSH runs provided script path over ssh. // This script can be template as it will be rendered using scriptInputs vars -func (h *Host) RunOverSSH( +func (h *Node) RunOverSSH( scriptDesc string, timeout time.Duration, scriptPath string, @@ -78,7 +78,7 @@ func (h *Host) RunOverSSH( } // RunSSHSetupNode runs script to setup sdk dependencies on a remote host over SSH. -func (h *Host) RunSSHSetupNode(cliVersion string) error { +func (h *Node) RunSSHSetupNode(cliVersion string) error { if err := h.RunOverSSH( "Setup Node", constants.SSHLongRunningScriptTimeout, @@ -91,7 +91,7 @@ func (h *Host) RunSSHSetupNode(cliVersion string) error { } // RunSSHSetupDockerService runs script to setup docker compose service for CLI -func (h *Host) RunSSHSetupDockerService() error { +func (h *Node) RunSSHSetupDockerService() error { if h.IsSystemD() { return h.RunOverSSH( "Setup Docker Service", @@ -106,23 +106,23 @@ func (h *Host) RunSSHSetupDockerService() error { } // RunSSHRestartNode runs script to restart avalanchego -func (h *Host) RunSSHRestartNode() error { +func (h *Node) RunSSHRestartNode() error { remoteComposeFile := utils.GetRemoteComposeFile() return h.RestartDockerComposeService(remoteComposeFile, "avalanchego", constants.SSHLongRunningScriptTimeout) } // RunSSHStartAWMRelayerService runs script to start an AWM Relayer Service -func (h *Host) RunSSHStartAWMRelayerService() error { +func (h *Node) RunSSHStartAWMRelayerService() error { return h.StartDockerComposeService(utils.GetRemoteComposeFile(), "awm-relayer", constants.SSHLongRunningScriptTimeout) } // RunSSHStopAWMRelayerService runs script to start an AWM Relayer Service -func (h *Host) RunSSHStopAWMRelayerService() error { +func (h *Node) RunSSHStopAWMRelayerService() error { return h.StopDockerComposeService(utils.GetRemoteComposeFile(), "awm-relayer", constants.SSHLongRunningScriptTimeout) } // RunSSHUpgradeAvalanchego runs script to upgrade avalanchego -func (h *Host) RunSSHUpgradeAvalanchego(networkID string, avalancheGoVersion string) error { +func (h *Node) RunSSHUpgradeAvalanchego(networkID string, avalancheGoVersion string) error { withMonitoring, err := h.WasNodeSetupWithMonitoring() if err != nil { return err @@ -135,17 +135,17 @@ func (h *Host) RunSSHUpgradeAvalanchego(networkID string, avalancheGoVersion str } // RunSSHStartNode runs script to start avalanchego -func (h *Host) RunSSHStartNode() error { +func (h *Node) RunSSHStartNode() error { return h.StartDockerComposeService(utils.GetRemoteComposeFile(), "avalanchego", constants.SSHLongRunningScriptTimeout) } // RunSSHStopNode runs script to stop avalanchego -func (h *Host) RunSSHStopNode() error { +func (h *Node) RunSSHStopNode() error { return h.StopDockerComposeService(utils.GetRemoteComposeFile(), "avalanchego", constants.SSHLongRunningScriptTimeout) } // RunSSHUpgradeSubnetEVM runs script to upgrade subnet evm -func (h *Host) RunSSHUpgradeSubnetEVM(subnetEVMBinaryPath string) error { +func (h *Node) RunSSHUpgradeSubnetEVM(subnetEVMBinaryPath string) error { return h.RunOverSSH( "Upgrade Subnet EVM", constants.SSHScriptTimeout, @@ -154,7 +154,7 @@ func (h *Host) RunSSHUpgradeSubnetEVM(subnetEVMBinaryPath string) error { ) } -func (h *Host) RunSSHSetupPrometheusConfig(avalancheGoPorts, machinePorts, loadTestPorts []string) error { +func (h *Node) RunSSHSetupPrometheusConfig(avalancheGoPorts, machinePorts, loadTestPorts []string) error { for _, folder := range remoteconfig.PrometheusFoldersToCreate() { if err := h.MkdirAll(folder, constants.SSHFileOpsTimeout); err != nil { return err @@ -177,7 +177,7 @@ func (h *Host) RunSSHSetupPrometheusConfig(avalancheGoPorts, machinePorts, loadT ) } -func (h *Host) RunSSHSetupLokiConfig(port int) error { +func (h *Node) RunSSHSetupLokiConfig(port int) error { for _, folder := range remoteconfig.LokiFoldersToCreate() { if err := h.MkdirAll(folder, constants.SSHFileOpsTimeout); err != nil { return err @@ -199,7 +199,7 @@ func (h *Host) RunSSHSetupLokiConfig(port int) error { ) } -func (h *Host) RunSSHSetupPromtailConfig(lokiIP string, lokiPort int, cloudID string, nodeID string, chainID string) error { +func (h *Node) RunSSHSetupPromtailConfig(lokiIP string, lokiPort int, cloudID string, nodeID string, chainID string) error { for _, folder := range remoteconfig.PromtailFoldersToCreate() { if err := h.MkdirAll(folder, constants.SSHFileOpsTimeout); err != nil { return err @@ -222,7 +222,7 @@ func (h *Host) RunSSHSetupPromtailConfig(lokiIP string, lokiPort int, cloudID st ) } -func (h *Host) RunSSHUploadNodeAWMRelayerConfig(nodeInstanceDirPath string) error { +func (h *Node) RunSSHUploadNodeAWMRelayerConfig(nodeInstanceDirPath string) error { cloudAWMRelayerConfigDir := filepath.Join(constants.CloudNodeCLIConfigBasePath, constants.ServicesDir, constants.AWMRelayerInstallDir) if err := h.MkdirAll(cloudAWMRelayerConfigDir, constants.SSHFileOpsTimeout); err != nil { return err @@ -235,7 +235,7 @@ func (h *Host) RunSSHUploadNodeAWMRelayerConfig(nodeInstanceDirPath string) erro } // RunSSHGetNewSubnetEVMRelease runs script to download new subnet evm -func (h *Host) RunSSHGetNewSubnetEVMRelease(subnetEVMReleaseURL, subnetEVMArchive string) error { +func (h *Node) RunSSHGetNewSubnetEVMRelease(subnetEVMReleaseURL, subnetEVMArchive string) error { return h.RunOverSSH( "Get Subnet EVM Release", constants.SSHScriptTimeout, @@ -245,7 +245,7 @@ func (h *Host) RunSSHGetNewSubnetEVMRelease(subnetEVMReleaseURL, subnetEVMArchiv } // RunSSHUploadStakingFiles uploads staking files to a remote host via SSH. -func (h *Host) RunSSHUploadStakingFiles(keyPath string) error { +func (h *Node) RunSSHUploadStakingFiles(keyPath string) error { if err := h.MkdirAll( constants.CloudNodeStakingPath, constants.SSHFileOpsTimeout, diff --git a/node/staking.go b/node/staking.go index 40a6959..834ff54 100644 --- a/node/staking.go +++ b/node/staking.go @@ -13,7 +13,7 @@ import ( "github.com/ava-labs/avalanchego/staking" ) -func (h *Host) ProvideStakingCertAndKey(keyPath string) error { +func (h *Node) ProvideStakingCertAndKey(keyPath string) error { if nodeID, err := h.GenerateNodeCertAndKeys(keyPath); err != nil { return err } else { @@ -23,7 +23,7 @@ func (h *Host) ProvideStakingCertAndKey(keyPath string) error { } // GenerateNodeCertAndKeys generates a node certificate and keys and return nodeID -func (h *Host) GenerateNodeCertAndKeys(keyPath string) (ids.NodeID, error) { +func (h *Node) GenerateNodeCertAndKeys(keyPath string) (ids.NodeID, error) { if err := os.MkdirAll(keyPath, constants.DefaultPerms755); err != nil { return ids.EmptyNodeID, err } From a6b0d538ecb4e6b9e6445355d4d328c936b62d50 Mon Sep 17 00:00:00 2001 From: Raymond Sukanto Date: Wed, 26 Jun 2024 12:23:48 -0400 Subject: [PATCH 17/30] node params --- node/create.go | 116 ++++++++++++++++++++++++---------------------- node/dockerSsh.go | 12 ++--- 2 files changed, 66 insertions(+), 62 deletions(-) diff --git a/node/create.go b/node/create.go index 24fb713..877299f 100644 --- a/node/create.go +++ b/node/create.go @@ -15,6 +15,58 @@ import ( "github.com/aws/aws-sdk-go-v2/service/ec2/types" ) +type NodeParams struct { + CloudParams *CloudParams + Count int + Roles []SupportedRole + NetworkID string + AvalancheGoVersion string + AvalancheCliVersion string + WithMonitoring bool +} + +// CreateNodes creates a list of nodes. +func CreateNodes( + ctx context.Context, + nodeParams *NodeParams, +) ([]Node, error) { + nodes, err := createCloudInstances(ctx, *nodeParams.CloudParams, nodeParams.Count) + if err != nil { + return nil, err + } + wg := sync.WaitGroup{} + wgResults := NodeResults{} + // wait for all hosts to be ready and provision based on the role list + for _, node := range nodes { + wg.Add(1) + go func(NodeResults *NodeResults, node Node) { + defer wg.Done() + if err := node.WaitForSSHShell(constants.SSHScriptTimeout); err != nil { + NodeResults.AddResult(node.NodeID, nil, err) + return + } + if err := provisionHost(node, nodeParams); err != nil { + NodeResults.AddResult(node.NodeID, nil, err) + return + } + }(&wgResults, node) + node.Roles = nodeParams.Roles + } + wg.Wait() + if wgResults.HasErrors() { + // if there are errors, collect and return them with nodeIds + hostErrorMap := wgResults.GetErrorHostMap() + errStr := "" + for nodeID, err := range hostErrorMap { + errStr += fmt.Sprintf("NodeID: %s, Error: %s\n", nodeID, err) + } + return nil, fmt.Errorf("failed to provision all hosts: %s", errStr) + + } + + return nodes, nil +} + // preCreateCheck checks if the cloud parameters are valid. func preCreateCheck(cp CloudParams, count int) error { if count < 1 { @@ -122,70 +174,22 @@ func createCloudInstances(ctx context.Context, cp CloudParams, count int) ([]Nod return nodes, nil } -// CreateNodes creates a list of nodes. -func CreateNodes( - ctx context.Context, - cp CloudParams, - count int, - roles []SupportedRole, - networkID string, - avalancheGoVersion string, - avalancheCliVersion string, - withMonitoring bool, -) ([]Node, error) { - nodes, err := createCloudInstances(ctx, cp, count) - if err != nil { - return nil, err - } - wg := sync.WaitGroup{} - wgResults := NodeResults{} - // wait for all hosts to be ready and provision based on the role list - for _, node := range nodes { - wg.Add(1) - go func(NodeResults *NodeResults, node Node) { - defer wg.Done() - if err := node.WaitForSSHShell(constants.SSHScriptTimeout); err != nil { - NodeResults.AddResult(node.NodeID, nil, err) - return - } - if err := provisionHost(node, roles, networkID, avalancheGoVersion, avalancheCliVersion, withMonitoring); err != nil { - NodeResults.AddResult(node.NodeID, nil, err) - return - } - }(&wgResults, node) - node.Roles = roles - } - wg.Wait() - if wgResults.HasErrors() { - // if there are errors, collect and return them with nodeIds - hostErrorMap := wgResults.GetErrorHostMap() - errStr := "" - for nodeID, err := range hostErrorMap { - errStr += fmt.Sprintf("NodeID: %s, Error: %s\n", nodeID, err) - } - return nil, fmt.Errorf("failed to provision all hosts: %s", errStr) - - } - - return nodes, nil -} - // provisionHost provisions a host with the given roles. -func provisionHost(node Node, roles []SupportedRole, networkID string, avalancheGoVersion string, avalancheCliVersion string, withMonitoring bool) error { - if err := CheckRoles(roles); err != nil { +func provisionHost(node Node, nodeParams *NodeParams) error { + if err := CheckRoles(nodeParams.Roles); err != nil { return err } if err := node.Connect(constants.SSHTCPPort); err != nil { return err } - for _, role := range roles { + for _, role := range nodeParams.Roles { switch role { case Validator: - if err := provisionAvagoHost(node, networkID, avalancheGoVersion, avalancheCliVersion, withMonitoring); err != nil { + if err := provisionAvagoHost(node, nodeParams); err != nil { return err } case API: - if err := provisionAvagoHost(node, networkID, avalancheGoVersion, avalancheCliVersion, withMonitoring); err != nil { + if err := provisionAvagoHost(node, nodeParams); err != nil { return err } case Loadtest: @@ -204,14 +208,14 @@ func provisionHost(node Node, roles []SupportedRole, networkID string, avalanche return nil } -func provisionAvagoHost(node Node, networkID string, avalancheGoVersion string, avalancheCliVersion string, withMonitoring bool) error { - if err := node.RunSSHSetupNode(avalancheCliVersion); err != nil { +func provisionAvagoHost(node Node, nodeParams *NodeParams) error { + if err := node.RunSSHSetupNode(nodeParams.AvalancheCliVersion); err != nil { return err } if err := node.RunSSHSetupDockerService(); err != nil { return err } - if err := node.ComposeSSHSetupNode(networkID, avalancheGoVersion, withMonitoring); err != nil { + if err := node.ComposeSSHSetupNode(nodeParams); err != nil { return err } if err := node.StartDockerCompose(constants.SSHScriptTimeout); err != nil { diff --git a/node/dockerSsh.go b/node/dockerSsh.go index c5f36da..451d2e9 100644 --- a/node/dockerSsh.go +++ b/node/dockerSsh.go @@ -23,7 +23,7 @@ func (h *Node) ValidateComposeFile(composeFile string, timeout time.Duration) er } // ComposeSSHSetupNode sets up an AvalancheGo node and dependencies on a remote node over SSH. -func (h *Node) ComposeSSHSetupNode(networkID string, avalancheGoVersion string, withMonitoring bool) error { +func (h *Node) ComposeSSHSetupNode(nodeParams *NodeParams) error { startTime := time.Now() folderStructure := config.RemoteFoldersToCreateAvalanchego() for _, dir := range folderStructure { @@ -32,13 +32,13 @@ func (h *Node) ComposeSSHSetupNode(networkID string, avalancheGoVersion string, } } h.Logger.Infof("avalancheCLI folder structure created on remote node %s after %s", folderStructure, time.Since(startTime)) - avagoDockerImage := fmt.Sprintf("%s:%s", constants.AvalancheGoDockerImage, avalancheGoVersion) + avagoDockerImage := fmt.Sprintf("%s:%s", constants.AvalancheGoDockerImage, nodeParams.AvalancheGoVersion) h.Logger.Infof("Preparing AvalancheGo Docker image %s on %s[%s]", avagoDockerImage, h.NodeID, h.IP) - if err := h.PrepareDockerImageWithRepo(avagoDockerImage, constants.AvalancheGoGitRepo, avalancheGoVersion); err != nil { + if err := h.PrepareDockerImageWithRepo(avagoDockerImage, constants.AvalancheGoGitRepo, nodeParams.AvalancheGoVersion); err != nil { return err } h.Logger.Infof("AvalancheGo Docker image %s ready on %s[%s] after %s", avagoDockerImage, h.NodeID, h.IP, time.Since(startTime)) - nodeConfFile, cChainConfFile, err := h.prepareAvalanchegoConfig(networkID) + nodeConfFile, cChainConfFile, err := h.prepareAvalanchegoConfig(nodeParams.NetworkID) if err != nil { return err } @@ -62,8 +62,8 @@ func (h *Node) ComposeSSHSetupNode(networkID string, avalancheGoVersion string, constants.SSHScriptTimeout, "templates/avalanchego.docker-compose.yml", dockerComposeInputs{ - AvalanchegoVersion: avalancheGoVersion, - WithMonitoring: withMonitoring, + AvalanchegoVersion: nodeParams.AvalancheGoVersion, + WithMonitoring: nodeParams.WithMonitoring, WithAvalanchego: true, E2E: utils.IsE2E(), E2EIP: utils.E2EConvertIP(h.IP), From 9719b43d1d8d5bfe3db3568432b6ead92b5c28b6 Mon Sep 17 00:00:00 2001 From: Raymond Sukanto Date: Wed, 26 Jun 2024 12:27:31 -0400 Subject: [PATCH 18/30] fix lint --- node/create.go | 2 +- node/dockerSsh.go | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/node/create.go b/node/create.go index 877299f..a386fb4 100644 --- a/node/create.go +++ b/node/create.go @@ -215,7 +215,7 @@ func provisionAvagoHost(node Node, nodeParams *NodeParams) error { if err := node.RunSSHSetupDockerService(); err != nil { return err } - if err := node.ComposeSSHSetupNode(nodeParams); err != nil { + if err := node.ComposeSSHSetupNode(nodeParams.NetworkID, nodeParams.AvalancheGoVersion, nodeParams.WithMonitoring); err != nil { return err } if err := node.StartDockerCompose(constants.SSHScriptTimeout); err != nil { diff --git a/node/dockerSsh.go b/node/dockerSsh.go index 451d2e9..c5f36da 100644 --- a/node/dockerSsh.go +++ b/node/dockerSsh.go @@ -23,7 +23,7 @@ func (h *Node) ValidateComposeFile(composeFile string, timeout time.Duration) er } // ComposeSSHSetupNode sets up an AvalancheGo node and dependencies on a remote node over SSH. -func (h *Node) ComposeSSHSetupNode(nodeParams *NodeParams) error { +func (h *Node) ComposeSSHSetupNode(networkID string, avalancheGoVersion string, withMonitoring bool) error { startTime := time.Now() folderStructure := config.RemoteFoldersToCreateAvalanchego() for _, dir := range folderStructure { @@ -32,13 +32,13 @@ func (h *Node) ComposeSSHSetupNode(nodeParams *NodeParams) error { } } h.Logger.Infof("avalancheCLI folder structure created on remote node %s after %s", folderStructure, time.Since(startTime)) - avagoDockerImage := fmt.Sprintf("%s:%s", constants.AvalancheGoDockerImage, nodeParams.AvalancheGoVersion) + avagoDockerImage := fmt.Sprintf("%s:%s", constants.AvalancheGoDockerImage, avalancheGoVersion) h.Logger.Infof("Preparing AvalancheGo Docker image %s on %s[%s]", avagoDockerImage, h.NodeID, h.IP) - if err := h.PrepareDockerImageWithRepo(avagoDockerImage, constants.AvalancheGoGitRepo, nodeParams.AvalancheGoVersion); err != nil { + if err := h.PrepareDockerImageWithRepo(avagoDockerImage, constants.AvalancheGoGitRepo, avalancheGoVersion); err != nil { return err } h.Logger.Infof("AvalancheGo Docker image %s ready on %s[%s] after %s", avagoDockerImage, h.NodeID, h.IP, time.Since(startTime)) - nodeConfFile, cChainConfFile, err := h.prepareAvalanchegoConfig(nodeParams.NetworkID) + nodeConfFile, cChainConfFile, err := h.prepareAvalanchegoConfig(networkID) if err != nil { return err } @@ -62,8 +62,8 @@ func (h *Node) ComposeSSHSetupNode(nodeParams *NodeParams) error { constants.SSHScriptTimeout, "templates/avalanchego.docker-compose.yml", dockerComposeInputs{ - AvalanchegoVersion: nodeParams.AvalancheGoVersion, - WithMonitoring: nodeParams.WithMonitoring, + AvalanchegoVersion: avalancheGoVersion, + WithMonitoring: withMonitoring, WithAvalanchego: true, E2E: utils.IsE2E(), E2EIP: utils.E2EConvertIP(h.IP), From e3a71b0e943081fd88ca4fe69c8a47a787f62081 Mon Sep 17 00:00:00 2001 From: Raymond Sukanto Date: Wed, 26 Jun 2024 14:02:17 -0400 Subject: [PATCH 19/30] modify nodeParams --- node/create.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/create.go b/node/create.go index a386fb4..1e7397a 100644 --- a/node/create.go +++ b/node/create.go @@ -22,7 +22,7 @@ type NodeParams struct { NetworkID string AvalancheGoVersion string AvalancheCliVersion string - WithMonitoring bool + UseStaticIP bool } // CreateNodes creates a list of nodes. @@ -215,7 +215,7 @@ func provisionAvagoHost(node Node, nodeParams *NodeParams) error { if err := node.RunSSHSetupDockerService(); err != nil { return err } - if err := node.ComposeSSHSetupNode(nodeParams.NetworkID, nodeParams.AvalancheGoVersion, nodeParams.WithMonitoring); err != nil { + if err := node.ComposeSSHSetupNode(nodeParams.NetworkID, nodeParams.AvalancheGoVersion, false); err != nil { return err } if err := node.StartDockerCompose(constants.SSHScriptTimeout); err != nil { From f06784f017c1e456744c5572e14d26365e4b3072 Mon Sep 17 00:00:00 2001 From: Artur Reznikov Date: Wed, 26 Jun 2024 13:08:03 -0700 Subject: [PATCH 20/30] monitoring role wip --- constants/constants.go | 9 ++++ examples/aws.go | 30 ++++++----- node/config/grafana.go | 13 +++-- node/config/loki.go | 3 +- node/config/prometheus.go | 5 +- node/config/promtail.go | 7 ++- node/create.go | 28 +++++----- node/dockerSsh.go | 10 ++-- node/nodeResult.go | 85 ++++++++++++++++++++++++++---- node/shell/setupNode.sh | 22 +++++--- node/ssh.go | 105 +++++++++++++++++++++++++++++++------- node/utils.go | 56 ++++++++++++++++++++ 12 files changed, 295 insertions(+), 78 deletions(-) diff --git a/constants/constants.go b/constants/constants.go index 3df53c8..ffe0dbf 100644 --- a/constants/constants.go +++ b/constants/constants.go @@ -34,6 +34,7 @@ const ( AvalanchegoLokiPort = 23101 AvalanchegoMonitoringPort = 9090 AvalanchegoMachineMetricsPort = 9100 + AvalanchegoLoadTestPort = 8082 // ssh SSHSleepBetweenChecks = 1 * time.Second @@ -52,6 +53,14 @@ const ( ServicesDir = "services" DashboardsDir = "dashboards" + // services + ServiceAvalanchego = "avalanchego" + ServicePromtail = "promtail" + ServiceGrafana = "grafana" + ServicePrometheus = "prometheus" + ServiceLoki = "loki" + ServiceAWMRelayer = "awm-relayer" + // misc DefaultPerms755 = 0o755 WriteReadReadPerms = 0o644 diff --git a/examples/aws.go b/examples/aws.go index b611179..6ea09f6 100644 --- a/examples/aws.go +++ b/examples/aws.go @@ -1,25 +1,25 @@ // Copyright (C) 2024, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. -package main +package examples import ( "context" "fmt" "time" - "github.com/ava-labs/avalanche-tooling-sdk-go/host" + "github.com/ava-labs/avalanche-tooling-sdk-go/node" ) func main() { ctx := context.Background() // Get the default cloud parameters for AWS - cp, err := host.GetDefaultCloudParams(ctx, host.AWSCloud) + cp, err := node.GetDefaultCloudParams(ctx, node.AWSCloud) // Set the cloud parameters for AWS non provided by the default // Please set your own values for the following fields - cp.AWSProfile = "default" - cp.AWSSecurityGroupID = "sg-0e198c427f8f0616b" - cp.AWSKeyPair = "artur-us-east-1-avalanche-cli" + cp.AWSConfig.AWSProfile = "default" + cp.AWSConfig.AWSSecurityGroupID = "sg-0e198c427f8f0616b" + cp.AWSConfig.AWSKeyPair = "artur-us-east-1-avalanche-cli" if err != nil { panic(err) } @@ -28,14 +28,16 @@ func main() { avalanchegoVersion = "v1.11.8" avalancheCliVersion = "v1.6.2" ) - hosts, err := host.CreateInstanceList(ctx, - *cp, - 1, - []host.SupportedRole{host.Validator}, - "fuji", - avalanchegoVersion, - avalancheCliVersion, - false) + hosts, err := node.CreateNodes(ctx, + &node.NodeParams{ + CloudParams: cp, + Count: 2, + Roles: []node.SupportedRole{node.Validator}, + NetworkID: "fuji", + AvalancheGoVersion: avalanchegoVersion, + AvalancheCliVersion: avalancheCliVersion, + UseStaticIP: false, + }) if err != nil { panic(err) } diff --git a/node/config/grafana.go b/node/config/grafana.go index ac9253b..aef4807 100644 --- a/node/config/grafana.go +++ b/node/config/grafana.go @@ -3,7 +3,10 @@ package services -import "github.com/ava-labs/avalanche-tooling-sdk-go/utils" +import ( + "github.com/ava-labs/avalanche-tooling-sdk-go/constants" + "github.com/ava-labs/avalanche-tooling-sdk-go/utils" +) func RenderGrafanaLokiDataSourceConfig() ([]byte, error) { return templates.ReadFile("templates/grafana-loki-datasource.yaml") @@ -23,9 +26,9 @@ func RenderGrafanaDashboardConfig() ([]byte, error) { func GrafanaFoldersToCreate() []string { return []string{ - utils.GetRemoteComposeServicePath("grafana", "data"), - utils.GetRemoteComposeServicePath("grafana", "dashboards"), - utils.GetRemoteComposeServicePath("grafana", "provisioning", "datasources"), - utils.GetRemoteComposeServicePath("grafana", "provisioning", "dashboards"), + utils.GetRemoteComposeServicePath(constants.ServiceGrafana, "data"), + utils.GetRemoteComposeServicePath(constants.ServiceGrafana, "dashboards"), + utils.GetRemoteComposeServicePath(constants.ServiceGrafana, "provisioning", "datasources"), + utils.GetRemoteComposeServicePath(constants.ServiceGrafana, "provisioning", "dashboards"), } } diff --git a/node/config/loki.go b/node/config/loki.go index ba21f09..5490ff8 100644 --- a/node/config/loki.go +++ b/node/config/loki.go @@ -4,9 +4,10 @@ package services import ( + "github.com/ava-labs/avalanche-tooling-sdk-go/constants" "github.com/ava-labs/avalanche-tooling-sdk-go/utils" ) func LokiFoldersToCreate() []string { - return []string{utils.GetRemoteComposeServicePath("loki", "data")} + return []string{utils.GetRemoteComposeServicePath(constants.ServiceLoki, "data")} } diff --git a/node/config/prometheus.go b/node/config/prometheus.go index 9541dde..b9a9e57 100644 --- a/node/config/prometheus.go +++ b/node/config/prometheus.go @@ -4,12 +4,13 @@ package services import ( + "github.com/ava-labs/avalanche-tooling-sdk-go/constants" "github.com/ava-labs/avalanche-tooling-sdk-go/utils" ) func PrometheusFoldersToCreate() []string { return []string{ - utils.GetRemoteComposeServicePath("prometheus"), - utils.GetRemoteComposeServicePath("prometheus", "data"), + utils.GetRemoteComposeServicePath(constants.ServicePrometheus), + utils.GetRemoteComposeServicePath(constants.ServicePrometheus, "data"), } } diff --git a/node/config/promtail.go b/node/config/promtail.go index c7dd000..1b2454d 100644 --- a/node/config/promtail.go +++ b/node/config/promtail.go @@ -3,11 +3,14 @@ package services -import "github.com/ava-labs/avalanche-tooling-sdk-go/utils" +import ( + "github.com/ava-labs/avalanche-tooling-sdk-go/constants" + "github.com/ava-labs/avalanche-tooling-sdk-go/utils" +) func PromtailFoldersToCreate() []string { return []string{ - utils.GetRemoteComposeServicePath("promtail"), + utils.GetRemoteComposeServicePath(constants.ServicePromtail), "/home/ubuntu/.avalanchego/logs", } } diff --git a/node/create.go b/node/create.go index 1e7397a..ffb3089 100644 --- a/node/create.go +++ b/node/create.go @@ -53,18 +53,7 @@ func CreateNodes( node.Roles = nodeParams.Roles } wg.Wait() - if wgResults.HasErrors() { - // if there are errors, collect and return them with nodeIds - hostErrorMap := wgResults.GetErrorHostMap() - errStr := "" - for nodeID, err := range hostErrorMap { - errStr += fmt.Sprintf("NodeID: %s, Error: %s\n", nodeID, err) - } - return nil, fmt.Errorf("failed to provision all hosts: %s", errStr) - - } - - return nodes, nil + return nodes, wgResults.Error() } // preCreateCheck checks if the cloud parameters are valid. @@ -200,10 +189,13 @@ func provisionHost(node Node, nodeParams *NodeParams) error { if err := provisionMonitoringHost(node); err != nil { return err } + case AWMRelayer: + if err := provisionAWMRelayerHost(node); err != nil { + return err + } default: return fmt.Errorf("unsupported role %s", role) } - return nil } return nil } @@ -234,7 +226,13 @@ func provisionLoadTestHost(node Node) error { // stub return nil } -func provisionMonitoringHost(node Node) error { // stub +func provisionMonitoringHost(node Node) error { + if err := node.RunSSHSetupDockerService(); err != nil { + return err + } + if err := node.RunSSHSetupMonitoringFolders(); err != nil { + return err + } if err := node.ComposeSSHSetupMonitoring(); err != nil { return err } @@ -248,5 +246,5 @@ func provisionAWMRelayerHost(node Node) error { // stub if err := node.ComposeSSHSetupAWMRelayer(); err != nil { return err } - return node.StartDockerComposeService(utils.GetRemoteComposeFile(), "awm-relayer", constants.SSHLongRunningScriptTimeout) + return node.StartDockerComposeService(utils.GetRemoteComposeFile(), constants.ServiceAWMRelayer, constants.SSHLongRunningScriptTimeout) } diff --git a/node/dockerSsh.go b/node/dockerSsh.go index c5f36da..bea6f10 100644 --- a/node/dockerSsh.go +++ b/node/dockerSsh.go @@ -83,7 +83,7 @@ func (h *Node) ComposeSSHSetupLoadTest() error { // WasNodeSetupWithMonitoring checks if an AvalancheGo node was setup with monitoring on a remote node. func (h *Node) WasNodeSetupWithMonitoring() (bool, error) { - return h.HasRemoteComposeService(utils.GetRemoteComposeFile(), "promtail", constants.SSHScriptTimeout) + return h.HasRemoteComposeService(utils.GetRemoteComposeFile(), constants.ServicePromtail, constants.SSHScriptTimeout) } // ComposeSSHSetupMonitoring sets up monitoring using docker-compose. @@ -107,19 +107,19 @@ func (h *Node) ComposeSSHSetupMonitoring() error { } }() - grafanaLokiDatasourceRemoteFileName := filepath.Join(utils.GetRemoteComposeServicePath("grafana", "provisioning", "datasources"), "loki.yml") + grafanaLokiDatasourceRemoteFileName := filepath.Join(utils.GetRemoteComposeServicePath(constants.ServiceGrafana, "provisioning", "datasources"), "loki.yml") if err := h.Upload(grafanaLokiDatasourceFile, grafanaLokiDatasourceRemoteFileName, constants.SSHFileOpsTimeout); err != nil { return err } - grafanaPromDatasourceFileName := filepath.Join(utils.GetRemoteComposeServicePath("grafana", "provisioning", "datasources"), "prometheus.yml") + grafanaPromDatasourceFileName := filepath.Join(utils.GetRemoteComposeServicePath(constants.ServiceGrafana, "provisioning", "datasources"), "prometheus.yml") if err := h.Upload(grafanaPromDatasourceFile, grafanaPromDatasourceFileName, constants.SSHFileOpsTimeout); err != nil { return err } - grafanaDashboardsRemoteFileName := filepath.Join(utils.GetRemoteComposeServicePath("grafana", "provisioning", "dashboards"), "dashboards.yml") + grafanaDashboardsRemoteFileName := filepath.Join(utils.GetRemoteComposeServicePath(constants.ServiceGrafana, "provisioning", "dashboards"), "dashboards.yml") if err := h.Upload(grafanaDashboardsFile, grafanaDashboardsRemoteFileName, constants.SSHFileOpsTimeout); err != nil { return err } - grafanaConfigRemoteFileName := filepath.Join(utils.GetRemoteComposeServicePath("grafana"), "grafana.ini") + grafanaConfigRemoteFileName := filepath.Join(utils.GetRemoteComposeServicePath(constants.ServiceGrafana), "grafana.ini") if err := h.Upload(grafanaConfigFile, grafanaConfigRemoteFileName, constants.SSHFileOpsTimeout); err != nil { return err } diff --git a/node/nodeResult.go b/node/nodeResult.go index 0f3f02e..69ad21a 100644 --- a/node/nodeResult.go +++ b/node/nodeResult.go @@ -1,6 +1,9 @@ package node -import "sync" +import ( + "fmt" + "sync" +) // NodeResult is a struct that holds the result of a async command executed on a host type NodeResult struct { @@ -20,7 +23,12 @@ type NodeResults struct { Lock sync.Mutex } -// AddResult adds a result to the NodeResults +// AddResult adds a new NodeResult to the NodeResults struct. +// +// Parameters: +// - nodeID: the ID of the host. +// - value: the result of the command executed on the host. +// - err: the error that occurred while executing the command on the host. func (nr *NodeResults) AddResult(nodeID string, value interface{}, err error) { nr.Lock.Lock() defer nr.Lock.Unlock() @@ -32,13 +40,24 @@ func (nr *NodeResults) AddResult(nodeID string, value interface{}, err error) { } // GetResults returns the results of the NodeResults +// +// No parameters. +// Returns: +// - []NodeResult: the results of the NodeResults. func (nr *NodeResults) GetResults() []NodeResult { nr.Lock.Lock() defer nr.Lock.Unlock() return nr.Results } -// GetResultMap returns a map of the results of the NodeResults with the nodeID as the key +// GetResultMap returns a map of the results of the NodeResults with the nodeID as the key. +// +// It acquires the lock on the NodeResults and iterates over the Results slice. +// For each NodeResult, it adds the NodeID as the key and the Value as the value to the result map. +// Finally, it releases the lock and returns the result map. +// +// Returns: +// - map[string]interface{}: A map with the nodeIDs as keys and the corresponding values as values. func (nr *NodeResults) GetResultMap() map[string]interface{} { nr.Lock.Lock() defer nr.Lock.Unlock() @@ -49,14 +68,23 @@ func (nr *NodeResults) GetResultMap() map[string]interface{} { return result } -// GetErrorMap returns a map of the errors of the NodeResults with the nodeID as the key +// Len returns the number of results in the NodeResults. +// +// It acquires the lock on the NodeResults and returns the length of the Results slice. +// The lock is released before the function returns. +// +// Returns: +// - int: the number of results in the NodeResults. func (nr *NodeResults) Len() int { nr.Lock.Lock() defer nr.Lock.Unlock() return len(nr.Results) } -// GetNodeList returns a list of the nodeIDs of the NodeResults +// GetNodeList returns a list of the nodeIDs of the NodeResults. +// +// No parameters. +// Returns a slice of strings. func (nr *NodeResults) GetNodeList() []string { nr.Lock.Lock() defer nr.Lock.Unlock() @@ -67,7 +95,14 @@ func (nr *NodeResults) GetNodeList() []string { return nodes } -// GetErrorMap returns a map of the errors of the NodeResults with the nodeID as the key +// GetErrorHostMap returns a map of the errors of the NodeResults with the nodeID as the key. +// +// It acquires the lock on the NodeResults and iterates over the Results slice. +// For each NodeResult, if the Err field is not nil, it adds the NodeID as the key and the error as the value to the hostErrors map. +// Finally, it releases the lock and returns the hostErrors map. +// +// Returns: +// - map[string]error: A map with the nodeIDs as keys and the corresponding errors as values. func (nr *NodeResults) GetErrorHostMap() map[string]error { nr.Lock.Lock() defer nr.Lock.Unlock() @@ -80,7 +115,13 @@ func (nr *NodeResults) GetErrorHostMap() map[string]error { return hostErrors } -// HasNodeIDWithError checks if a node with the given nodeID has an error +// HasNodeIDWithError checks if a node with the given nodeID has an error. +// +// Parameters: +// - nodeID: the ID of the node to check. +// +// Return: +// - bool: true if a node with the given nodeID has an error, false otherwise. func (nr *NodeResults) HasNodeIDWithError(nodeID string) bool { nr.Lock.Lock() defer nr.Lock.Unlock() @@ -92,12 +133,20 @@ func (nr *NodeResults) HasNodeIDWithError(nodeID string) bool { return false } -// HasErrors returns true if the NodeResults has any errors +// HasErrors returns true if the NodeResults has any errors. +// +// It checks the length of the error host map obtained from the GetErrorHostMap() +// method of the NodeResults struct. If the length is greater than 0, it means +// that there are errors present, and the function returns true. Otherwise, it +// returns false. func (nr *NodeResults) HasErrors() bool { return len(nr.GetErrorHostMap()) > 0 } -// GetErrorHosts returns a list of the nodeIDs of the NodeResults that have errors +// GetErrorHosts returns a list of the nodeIDs of the NodeResults that have errors. +// +// No parameters. +// Returns a slice of strings. func (nr *NodeResults) GetErrorHosts() []string { var nodes []string for _, node := range nr.Results { @@ -107,3 +156,21 @@ func (nr *NodeResults) GetErrorHosts() []string { } return nodes } + +// SumError collects and returns the errors with nodeIds if there are errors in the NodeResults. +// +// Returns an error type. +func (nr *NodeResults) Error() error { + if nr.HasErrors() { + // if there are errors, collect and return them with nodeIds + hostErrorMap := nr.GetErrorHostMap() + errStr := "" + for nodeID, err := range hostErrorMap { + errStr += fmt.Sprintf("NodeID: %s, Error: %s\n", nodeID, err) + } + return fmt.Errorf(errStr) + + } else { + return nil + } +} diff --git a/node/shell/setupNode.sh b/node/shell/setupNode.sh index 39f1b82..a4a177c 100644 --- a/node/shell/setupNode.sh +++ b/node/shell/setupNode.sh @@ -1,11 +1,21 @@ #!/usr/bin/env bash export DEBIAN_FRONTEND=noninteractive -sudo apt-get -y update && sudo apt-get -y install busybox-static software-properties-common -sudo add-apt-repository -y ppa:longsleep/golang-backports -sudo apt-get -y update && sudo apt-get -y dist-upgrade && sudo apt-get -y install ca-certificates curl gcc git golang-go -sudo install -m 0755 -d /etc/apt/keyrings && sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc && sudo chmod a+r /etc/apt/keyrings/docker.asc -echo deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo \"$VERSION_CODENAME\") stable | sudo tee /etc/apt/sources.list.d/docker.list >/dev/null -sudo apt-get -y update && sudo apt-get -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-compose + +if ! dpkg -s busybox-static software-properties-common >/dev/null 2>&1; then + sudo apt-get -y update && sudo apt-get -y install busybox-static software-properties-common +fi + +if ! dpkg -s golang-go >/dev/null 2>&1; then + sudo add-apt-repository -y ppa:longsleep/golang-backports + sudo apt-get -y update && sudo apt-get -y install ca-certificates curl gcc git golang-go +fi + +if ! dpkg -s docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin >/dev/null 2>&1; then + sudo install -m 0755 -d /etc/apt/keyrings && sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc && sudo chmod a+r /etc/apt/keyrings/docker.asc + echo deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo \"$VERSION_CODENAME\") stable | sudo tee /etc/apt/sources.list.d/docker.list >/dev/null + sudo apt-get -y update && sudo apt-get -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-compose +fi + sudo usermod -aG docker ubuntu sudo chgrp ubuntu /var/run/docker.sock sudo chmod +rw /var/run/docker.sock diff --git a/node/ssh.go b/node/ssh.go index 13405b7..5ccd487 100644 --- a/node/ssh.go +++ b/node/ssh.go @@ -10,12 +10,13 @@ import ( "os" "path/filepath" "strconv" + "sync" "text/template" "time" "github.com/ava-labs/avalanche-tooling-sdk-go/constants" - remoteconfig "github.com/ava-labs/avalanche-tooling-sdk-go/host/config" - "github.com/ava-labs/avalanche-tooling-sdk-go/host/monitoring" + remoteconfig "github.com/ava-labs/avalanche-tooling-sdk-go/node/config" + "github.com/ava-labs/avalanche-tooling-sdk-go/node/monitoring" "github.com/ava-labs/avalanche-tooling-sdk-go/utils" ) @@ -105,20 +106,20 @@ func (h *Node) RunSSHSetupDockerService() error { } } -// RunSSHRestartNode runs script to restart avalanchego -func (h *Node) RunSSHRestartNode() error { +// RunSSHRestartAvalanchego runs script to restart avalanchego +func (h *Node) RunSSHRestartAvalanchego() error { remoteComposeFile := utils.GetRemoteComposeFile() - return h.RestartDockerComposeService(remoteComposeFile, "avalanchego", constants.SSHLongRunningScriptTimeout) + return h.RestartDockerComposeService(remoteComposeFile, constants.ServiceAvalanchego, constants.SSHLongRunningScriptTimeout) } // RunSSHStartAWMRelayerService runs script to start an AWM Relayer Service func (h *Node) RunSSHStartAWMRelayerService() error { - return h.StartDockerComposeService(utils.GetRemoteComposeFile(), "awm-relayer", constants.SSHLongRunningScriptTimeout) + return h.StartDockerComposeService(utils.GetRemoteComposeFile(), constants.ServiceAWMRelayer, constants.SSHLongRunningScriptTimeout) } // RunSSHStopAWMRelayerService runs script to start an AWM Relayer Service func (h *Node) RunSSHStopAWMRelayerService() error { - return h.StopDockerComposeService(utils.GetRemoteComposeFile(), "awm-relayer", constants.SSHLongRunningScriptTimeout) + return h.StopDockerComposeService(utils.GetRemoteComposeFile(), constants.ServiceAWMRelayer, constants.SSHLongRunningScriptTimeout) } // RunSSHUpgradeAvalanchego runs script to upgrade avalanchego @@ -134,14 +135,14 @@ func (h *Node) RunSSHUpgradeAvalanchego(networkID string, avalancheGoVersion str return h.RestartDockerCompose(constants.SSHLongRunningScriptTimeout) } -// RunSSHStartNode runs script to start avalanchego -func (h *Node) RunSSHStartNode() error { - return h.StartDockerComposeService(utils.GetRemoteComposeFile(), "avalanchego", constants.SSHLongRunningScriptTimeout) +// RunSSHStartAvalanchego runs script to start avalanchego +func (h *Node) RunSSHStartAvalanchego() error { + return h.StartDockerComposeService(utils.GetRemoteComposeFile(), constants.ServiceAvalanchego, constants.SSHLongRunningScriptTimeout) } -// RunSSHStopNode runs script to stop avalanchego -func (h *Node) RunSSHStopNode() error { - return h.StopDockerComposeService(utils.GetRemoteComposeFile(), "avalanchego", constants.SSHLongRunningScriptTimeout) +// RunSSHStopAvalanchego runs script to stop avalanchego +func (h *Node) RunSSHStopAvalanchego() error { + return h.StopDockerComposeService(utils.GetRemoteComposeFile(), constants.ServiceAvalanchego, constants.SSHLongRunningScriptTimeout) } // RunSSHUpgradeSubnetEVM runs script to upgrade subnet evm @@ -160,8 +161,8 @@ func (h *Node) RunSSHSetupPrometheusConfig(avalancheGoPorts, machinePorts, loadT return err } } - cloudNodePrometheusConfigTemp := utils.GetRemoteComposeServicePath("prometheus", "prometheus.yml") - promConfig, err := os.CreateTemp("", "prometheus") + cloudNodePrometheusConfigTemp := utils.GetRemoteComposeServicePath(constants.ServicePrometheus, "prometheus.yml") + promConfig, err := os.CreateTemp("", constants.ServicePrometheus) if err != nil { return err } @@ -183,8 +184,8 @@ func (h *Node) RunSSHSetupLokiConfig(port int) error { return err } } - cloudNodeLokiConfigTemp := utils.GetRemoteComposeServicePath("loki", "loki.yml") - lokiConfig, err := os.CreateTemp("", "loki") + cloudNodeLokiConfigTemp := utils.GetRemoteComposeServicePath(constants.ServiceLoki, "loki.yml") + lokiConfig, err := os.CreateTemp("", constants.ServiceLoki) if err != nil { return err } @@ -205,8 +206,8 @@ func (h *Node) RunSSHSetupPromtailConfig(lokiIP string, lokiPort int, cloudID st return err } } - cloudNodePromtailConfigTemp := utils.GetRemoteComposeServicePath("promtail", "promtail.yml") - promtailConfig, err := os.CreateTemp("", "promtail") + cloudNodePromtailConfigTemp := utils.GetRemoteComposeServicePath(constants.ServicePromtail, "promtail.yml") + promtailConfig, err := os.CreateTemp("", constants.ServicePromtail) if err != nil { return err } @@ -272,3 +273,69 @@ func (h *Node) RunSSHUploadStakingFiles(keyPath string) error { constants.SSHFileOpsTimeout, ) } + +// RunSSHSetupMonitoringFolders sets up monitoring folders +func (h *Node) RunSSHSetupMonitoringFolders() error { + for _, folder := range remoteconfig.RemoteFoldersToCreateMonitoring() { + if err := h.MkdirAll(folder, constants.SSHFileOpsTimeout); err != nil { + return err + } + } + return nil +} + +// RegisterWithMonitoring registers the node with the monitoring service +func (h *Node) RegisterWithMonitoring(targets []*Node, chainID string) error { + // necessary checks + if !isMonitoringNode(h) { + return fmt.Errorf("%s is not a monitoring node", h.NodeID) + } + for _, target := range targets { + if isMonitoringNode(target) { + return fmt.Errorf("target %s can't be a monitoring node", target.NodeID) + } + } + // setup monitoring for nodes + remoteComposeFile := utils.GetRemoteComposeFile() + wg := sync.WaitGroup{} + wgResults := NodeResults{} + for _, target := range targets { + wg.Add(1) + go func(NodeResults *NodeResults, target *Node) { + defer wg.Done() + if err := target.RunSSHSetupPromtailConfig(h.IP, constants.AvalanchegoLokiPort, h.NodeID, h.NodeID, chainID); err != nil { + NodeResults.AddResult(target.NodeID, nil, err) + return + } + if err := target.RestartDockerComposeService(remoteComposeFile, constants.ServicePromtail, constants.SSHScriptTimeout); err != nil { + NodeResults.AddResult(target.NodeID, nil, err) + return + } + }(&wgResults, target) + } + wg.Wait() + if wgResults.HasErrors() { + return wgResults.Error() + } + avalancheGoPorts, machinePorts, ltPorts, err := getPrometheusTargets(targets) + h.Logger.Infof("avalancheGoPorts: %v, machinePorts: %v, ltPorts: %v", avalancheGoPorts, machinePorts, ltPorts) + if err != nil { + return err + } + // reconfigure monitoring instance + if err := h.RunSSHSetupLokiConfig(constants.AvalanchegoLokiPort); err != nil { + return err + } + if err := h.RestartDockerComposeService(remoteComposeFile, constants.ServiceLoki, constants.SSHScriptTimeout); err != nil { + return err + } + if err := h.RunSSHSetupPrometheusConfig(avalancheGoPorts, machinePorts, ltPorts); err != nil { + return err + } + if err := h.RestartDockerComposeService(remoteComposeFile, constants.ServicePrometheus, constants.SSHScriptTimeout); err != nil { + return err + } + + return nil + +} diff --git a/node/utils.go b/node/utils.go index 3f604a8..9724533 100644 --- a/node/utils.go +++ b/node/utils.go @@ -5,11 +5,15 @@ package node import ( "encoding/json" + "fmt" "io" "os" + "slices" + "strconv" "strings" "time" + "github.com/ava-labs/avalanche-tooling-sdk-go/constants" "github.com/ava-labs/avalanche-tooling-sdk-go/utils" ) @@ -55,3 +59,55 @@ func GetPublicKeyFromSSHKey(keyPath string) (string, error) { } return strings.TrimSuffix(string(key), "\n"), nil } + +// isMonitoringNode checks if the node has the Monitor role. +// +// Parameter(s): +// - node *Node: The node to check. +// Return type(s): bool +func isMonitoringNode(node *Node) bool { + return slices.Contains(node.Roles, Monitor) +} + +// isAvalancheGoNode checks if the node has the API or Validator role. +// +// - node *Node: The node to check. +// bool +func isAvalancheGoNode(node *Node) bool { + return slices.Contains(node.Roles, API) || slices.Contains(node.Roles, Validator) +} + +// isLoadTestNode checks if the node has the LoadTest role. +// +// - node *Node: The node to check. +// bool +func isLoadTestNode(node *Node) bool { + return slices.Contains(node.Roles, Loadtest) +} + +// getPrometheusTargets returns the Prometheus targets for the given nodes. +// +// Parameters: +// - nodes: a slice of Node representing the nodes to get the Prometheus targets for. +// +// Returns: +// - avalancheGoPorts: a slice of strings representing the Prometheus targets for the nodes with the AvalancheGo role. +// - machinePorts: a slice of strings representing the Prometheus targets for the nodes with the AvalancheGo role. +// - ltPorts: a slice of strings representing the Prometheus targets for the nodes with the LoadTest role. +// - error: an error if any occurred during the function execution. +func getPrometheusTargets(nodes []*Node) ([]string, []string, []string, error) { + avalancheGoPorts := []string{} + machinePorts := []string{} + ltPorts := []string{} + for _, host := range nodes { + if isAvalancheGoNode(host) { + avalancheGoPorts = append(avalancheGoPorts, fmt.Sprintf("'%s:%s'", host.IP, strconv.Itoa(constants.AvalanchegoAPIPort))) + machinePorts = append(machinePorts, fmt.Sprintf("'%s:%s'", host.IP, strconv.Itoa(constants.AvalanchegoMachineMetricsPort))) + } + if isLoadTestNode(host) { + ltPorts = append(ltPorts, fmt.Sprintf("'%s:%s'", host.IP, strconv.Itoa(constants.AvalanchegoLoadTestPort))) + } + + } + return avalancheGoPorts, machinePorts, ltPorts, nil +} From 20130596620e8dd072ac6014d24636b10de399f0 Mon Sep 17 00:00:00 2001 From: Artur Reznikov Date: Wed, 26 Jun 2024 13:22:42 -0700 Subject: [PATCH 21/30] update example --- examples/aws.go | 23 +++++++++++++++++++++++ node/create.go | 2 +- node/ssh.go | 6 +++--- node/supported.go | 4 ++-- node/utils.go | 8 ++++---- 5 files changed, 33 insertions(+), 10 deletions(-) diff --git a/examples/aws.go b/examples/aws.go index 6ea09f6..3ea3e92 100644 --- a/examples/aws.go +++ b/examples/aws.go @@ -68,4 +68,27 @@ func main() { fmt.Println(string(output)) } } + fmt.Println("About to create a monitoring node") + // Create a monitoring node + monitoringHosts, err := node.CreateNodes(ctx, + &node.NodeParams{ + CloudParams: cp, + Count: 1, + Roles: []node.SupportedRole{node.Monitor}, + NetworkID: "", + AvalancheGoVersion: "", + AvalancheCliVersion: "", + UseStaticIP: false, + }) + if err != nil { + panic(err) + } + // Wait for the monitoring host to be ready + if err := monitoringHosts[0].WaitForSSHShell(sshTimeout); err != nil { + panic(err) + } + // Register nodes with monitoring host + if err := monitoringHosts[0].RegisterWithMonitoring(hosts, ""); err != nil { + panic(err) + } } diff --git a/node/create.go b/node/create.go index ffb3089..da2f0a7 100644 --- a/node/create.go +++ b/node/create.go @@ -194,7 +194,7 @@ func provisionHost(node Node, nodeParams *NodeParams) error { return err } default: - return fmt.Errorf("unsupported role %s", role) + return fmt.Errorf("unsupported role %v", role) } } return nil diff --git a/node/ssh.go b/node/ssh.go index 5ccd487..28d0089 100644 --- a/node/ssh.go +++ b/node/ssh.go @@ -285,9 +285,9 @@ func (h *Node) RunSSHSetupMonitoringFolders() error { } // RegisterWithMonitoring registers the node with the monitoring service -func (h *Node) RegisterWithMonitoring(targets []*Node, chainID string) error { +func (h *Node) RegisterWithMonitoring(targets []Node, chainID string) error { // necessary checks - if !isMonitoringNode(h) { + if !isMonitoringNode(*h) { return fmt.Errorf("%s is not a monitoring node", h.NodeID) } for _, target := range targets { @@ -311,7 +311,7 @@ func (h *Node) RegisterWithMonitoring(targets []*Node, chainID string) error { NodeResults.AddResult(target.NodeID, nil, err) return } - }(&wgResults, target) + }(&wgResults, &target) } wg.Wait() if wgResults.HasErrors() { diff --git a/node/supported.go b/node/supported.go index 5932668..b60d8bc 100644 --- a/node/supported.go +++ b/node/supported.go @@ -96,10 +96,10 @@ func CheckRoles(roles []SupportedRole) error { return fmt.Errorf("cannot have both validator and api roles") } if slices.Contains(roles, Loadtest) && len(roles) > 1 { - return fmt.Errorf("%s role cannot be combined with other roles", Loadtest) + return fmt.Errorf("%v role cannot be combined with other roles", Loadtest) } if slices.Contains(roles, Monitor) && len(roles) > 1 { - return fmt.Errorf("%s role cannot be combined with other roles", Monitor) + return fmt.Errorf("%v role cannot be combined with other roles", Monitor) } return nil } diff --git a/node/utils.go b/node/utils.go index 9724533..e0506b7 100644 --- a/node/utils.go +++ b/node/utils.go @@ -65,7 +65,7 @@ func GetPublicKeyFromSSHKey(keyPath string) (string, error) { // Parameter(s): // - node *Node: The node to check. // Return type(s): bool -func isMonitoringNode(node *Node) bool { +func isMonitoringNode(node Node) bool { return slices.Contains(node.Roles, Monitor) } @@ -73,7 +73,7 @@ func isMonitoringNode(node *Node) bool { // // - node *Node: The node to check. // bool -func isAvalancheGoNode(node *Node) bool { +func isAvalancheGoNode(node Node) bool { return slices.Contains(node.Roles, API) || slices.Contains(node.Roles, Validator) } @@ -81,7 +81,7 @@ func isAvalancheGoNode(node *Node) bool { // // - node *Node: The node to check. // bool -func isLoadTestNode(node *Node) bool { +func isLoadTestNode(node Node) bool { return slices.Contains(node.Roles, Loadtest) } @@ -95,7 +95,7 @@ func isLoadTestNode(node *Node) bool { // - machinePorts: a slice of strings representing the Prometheus targets for the nodes with the AvalancheGo role. // - ltPorts: a slice of strings representing the Prometheus targets for the nodes with the LoadTest role. // - error: an error if any occurred during the function execution. -func getPrometheusTargets(nodes []*Node) ([]string, []string, []string, error) { +func getPrometheusTargets(nodes []Node) ([]string, []string, []string, error) { avalancheGoPorts := []string{} machinePorts := []string{} ltPorts := []string{} From ca7026de56aa9b8e63bec4b1ba7d2df418b19999 Mon Sep 17 00:00:00 2001 From: Artur Reznikov Date: Wed, 26 Jun 2024 13:49:26 -0700 Subject: [PATCH 22/30] use static IP --- node/create.go | 35 +++++++++++++++++++++++++++++------ node/ssh.go | 4 +++- 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/node/create.go b/node/create.go index da2f0a7..4141145 100644 --- a/node/create.go +++ b/node/create.go @@ -30,7 +30,7 @@ func CreateNodes( ctx context.Context, nodeParams *NodeParams, ) ([]Node, error) { - nodes, err := createCloudInstances(ctx, *nodeParams.CloudParams, nodeParams.Count) + nodes, err := createCloudInstances(ctx, *nodeParams.CloudParams, nodeParams.Count, nodeParams.UseStaticIP) if err != nil { return nil, err } @@ -68,7 +68,7 @@ func preCreateCheck(cp CloudParams, count int) error { } // createCloudInstances launches the specified number of instances on the selected cloud platform. -func createCloudInstances(ctx context.Context, cp CloudParams, count int) ([]Node, error) { +func createCloudInstances(ctx context.Context, cp CloudParams, count int, useStaticIP bool) ([]Node, error) { if err := preCreateCheck(cp, count); err != nil { return nil, err } @@ -103,9 +103,25 @@ func createCloudInstances(ctx context.Context, cp CloudParams, count int) ([]Nod if err := ec2Svc.WaitForEC2Instances(instanceIds, types.InstanceStateNameRunning); err != nil { return nil, err } - instanceEIPMap, err := ec2Svc.GetInstancePublicIPs(instanceIds) - if err != nil { - return nil, err + // elastic IP + instanceEIPMap := make(map[string]string) + if useStaticIP { + for _, instanceID := range instanceIds { + allocationID, publicIP, err := ec2Svc.CreateEIP(cp.Region) + if err != nil { + return nil, err + } + err = ec2Svc.AssociateEIP(instanceID, allocationID) + if err != nil { + return nil, err + } + instanceEIPMap[instanceID] = publicIP + } + } else { + instanceEIPMap, err = ec2Svc.GetInstancePublicIPs(instanceIds) + if err != nil { + return nil, err + } } for _, instanceID := range instanceIds { nodes = append(nodes, Node{ @@ -129,13 +145,20 @@ func createCloudInstances(ctx context.Context, cp CloudParams, count int) ([]Nod if err != nil { return nil, err } + staticIPs := []string{} + if useStaticIP { + staticIPs, err = gcpSvc.SetPublicIP(cp.GCPConfig.GCPZone, "", count) + if err != nil { + return nil, err + } + } computeInstances, err := gcpSvc.SetupInstances( cp.GCPConfig.GCPZone, cp.GCPConfig.GCPNetwork, cp.GCPConfig.GCPSSHKey, cp.ImageID, cp.InstanceType, - []string{}, + staticIPs, 1, cp.GCPConfig.GCPVolumeSize, ) diff --git a/node/ssh.go b/node/ssh.go index 28d0089..911ed3e 100644 --- a/node/ssh.go +++ b/node/ssh.go @@ -295,6 +295,9 @@ func (h *Node) RegisterWithMonitoring(targets []Node, chainID string) error { return fmt.Errorf("target %s can't be a monitoring node", target.NodeID) } } + if err := h.WaitForSSHShell(constants.SSHScriptTimeout); err != nil { + return err + } // setup monitoring for nodes remoteComposeFile := utils.GetRemoteComposeFile() wg := sync.WaitGroup{} @@ -337,5 +340,4 @@ func (h *Node) RegisterWithMonitoring(targets []Node, chainID string) error { } return nil - } From 1c98b85c7078a2f76dc130ebeda3ced5d3b58b67 Mon Sep 17 00:00:00 2001 From: Artur Reznikov Date: Wed, 26 Jun 2024 13:57:06 -0700 Subject: [PATCH 23/30] lint --- node/create.go | 10 +++++----- node/nodeResult.go | 1 - node/ssh.go | 13 +++++-------- node/staking.go | 4 ++-- node/utils.go | 6 ++---- 5 files changed, 14 insertions(+), 20 deletions(-) diff --git a/node/create.go b/node/create.go index 4141145..ca35767 100644 --- a/node/create.go +++ b/node/create.go @@ -37,20 +37,20 @@ func CreateNodes( wg := sync.WaitGroup{} wgResults := NodeResults{} // wait for all hosts to be ready and provision based on the role list - for _, node := range nodes { + for i, node := range nodes { wg.Add(1) - go func(NodeResults *NodeResults, node Node) { + go func(nodeResults *NodeResults, node Node) { defer wg.Done() if err := node.WaitForSSHShell(constants.SSHScriptTimeout); err != nil { - NodeResults.AddResult(node.NodeID, nil, err) + nodeResults.AddResult(node.NodeID, nil, err) return } if err := provisionHost(node, nodeParams); err != nil { - NodeResults.AddResult(node.NodeID, nil, err) + nodeResults.AddResult(node.NodeID, nil, err) return } }(&wgResults, node) - node.Roles = nodeParams.Roles + nodes[i].Roles = nodeParams.Roles } wg.Wait() return nodes, wgResults.Error() diff --git a/node/nodeResult.go b/node/nodeResult.go index 69ad21a..0715ef8 100644 --- a/node/nodeResult.go +++ b/node/nodeResult.go @@ -169,7 +169,6 @@ func (nr *NodeResults) Error() error { errStr += fmt.Sprintf("NodeID: %s, Error: %s\n", nodeID, err) } return fmt.Errorf(errStr) - } else { return nil } diff --git a/node/ssh.go b/node/ssh.go index 911ed3e..b6352b2 100644 --- a/node/ssh.go +++ b/node/ssh.go @@ -304,27 +304,24 @@ func (h *Node) RegisterWithMonitoring(targets []Node, chainID string) error { wgResults := NodeResults{} for _, target := range targets { wg.Add(1) - go func(NodeResults *NodeResults, target *Node) { + go func(nodeResults *NodeResults, target Node) { defer wg.Done() if err := target.RunSSHSetupPromtailConfig(h.IP, constants.AvalanchegoLokiPort, h.NodeID, h.NodeID, chainID); err != nil { - NodeResults.AddResult(target.NodeID, nil, err) + nodeResults.AddResult(target.NodeID, nil, err) return } if err := target.RestartDockerComposeService(remoteComposeFile, constants.ServicePromtail, constants.SSHScriptTimeout); err != nil { - NodeResults.AddResult(target.NodeID, nil, err) + nodeResults.AddResult(target.NodeID, nil, err) return } - }(&wgResults, &target) + }(&wgResults, target) } wg.Wait() if wgResults.HasErrors() { return wgResults.Error() } - avalancheGoPorts, machinePorts, ltPorts, err := getPrometheusTargets(targets) + avalancheGoPorts, machinePorts, ltPorts := getPrometheusTargets(targets) h.Logger.Infof("avalancheGoPorts: %v, machinePorts: %v, ltPorts: %v", avalancheGoPorts, machinePorts, ltPorts) - if err != nil { - return err - } // reconfigure monitoring instance if err := h.RunSSHSetupLokiConfig(constants.AvalanchegoLokiPort); err != nil { return err diff --git a/node/staking.go b/node/staking.go index 834ff54..2f60992 100644 --- a/node/staking.go +++ b/node/staking.go @@ -14,7 +14,7 @@ import ( ) func (h *Node) ProvideStakingCertAndKey(keyPath string) error { - if nodeID, err := h.GenerateNodeCertAndKeys(keyPath); err != nil { + if nodeID, err := GenerateNodeCertAndKeys(keyPath); err != nil { return err } else { h.Logger.Infof("Generated Staking Cert and Key for NodeID: %s in folder %s", nodeID.String(), keyPath) @@ -23,7 +23,7 @@ func (h *Node) ProvideStakingCertAndKey(keyPath string) error { } // GenerateNodeCertAndKeys generates a node certificate and keys and return nodeID -func (h *Node) GenerateNodeCertAndKeys(keyPath string) (ids.NodeID, error) { +func GenerateNodeCertAndKeys(keyPath string) (ids.NodeID, error) { if err := os.MkdirAll(keyPath, constants.DefaultPerms755); err != nil { return ids.EmptyNodeID, err } diff --git a/node/utils.go b/node/utils.go index e0506b7..43a7d11 100644 --- a/node/utils.go +++ b/node/utils.go @@ -94,8 +94,7 @@ func isLoadTestNode(node Node) bool { // - avalancheGoPorts: a slice of strings representing the Prometheus targets for the nodes with the AvalancheGo role. // - machinePorts: a slice of strings representing the Prometheus targets for the nodes with the AvalancheGo role. // - ltPorts: a slice of strings representing the Prometheus targets for the nodes with the LoadTest role. -// - error: an error if any occurred during the function execution. -func getPrometheusTargets(nodes []Node) ([]string, []string, []string, error) { +func getPrometheusTargets(nodes []Node) ([]string, []string, []string) { avalancheGoPorts := []string{} machinePorts := []string{} ltPorts := []string{} @@ -107,7 +106,6 @@ func getPrometheusTargets(nodes []Node) ([]string, []string, []string, error) { if isLoadTestNode(host) { ltPorts = append(ltPorts, fmt.Sprintf("'%s:%s'", host.IP, strconv.Itoa(constants.AvalanchegoLoadTestPort))) } - } - return avalancheGoPorts, machinePorts, ltPorts, nil + return avalancheGoPorts, machinePorts, ltPorts } From 51072c1007e5daba9f7e917dac9d9e1482ca732c Mon Sep 17 00:00:00 2001 From: Artur Reznikov Date: Wed, 26 Jun 2024 14:14:00 -0700 Subject: [PATCH 24/30] create nodes with monitoring --- node/create.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/node/create.go b/node/create.go index ca35767..c32a6e6 100644 --- a/node/create.go +++ b/node/create.go @@ -224,13 +224,14 @@ func provisionHost(node Node, nodeParams *NodeParams) error { } func provisionAvagoHost(node Node, nodeParams *NodeParams) error { + const withMonitoring = true if err := node.RunSSHSetupNode(nodeParams.AvalancheCliVersion); err != nil { return err } if err := node.RunSSHSetupDockerService(); err != nil { return err } - if err := node.ComposeSSHSetupNode(nodeParams.NetworkID, nodeParams.AvalancheGoVersion, false); err != nil { + if err := node.ComposeSSHSetupNode(nodeParams.NetworkID, nodeParams.AvalancheGoVersion, withMonitoring); err != nil { return err } if err := node.StartDockerCompose(constants.SSHScriptTimeout); err != nil { From c0d0e6666622efbe337a7b94f66b85fadaac6c18 Mon Sep 17 00:00:00 2001 From: Artur Reznikov Date: Wed, 26 Jun 2024 14:26:36 -0700 Subject: [PATCH 25/30] update example with monitoring --- node/create.go | 4 ++++ node/monitoring/monitoring.go | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/node/create.go b/node/create.go index c32a6e6..895e2d2 100644 --- a/node/create.go +++ b/node/create.go @@ -231,6 +231,10 @@ func provisionAvagoHost(node Node, nodeParams *NodeParams) error { if err := node.RunSSHSetupDockerService(); err != nil { return err } + // provide dummy config for promtail + if err := node.RunSSHSetupPromtailConfig("127.0.0.1", constants.AvalanchegoLokiPort, node.NodeID, "", ""); err != nil { + return err + } if err := node.ComposeSSHSetupNode(nodeParams.NetworkID, nodeParams.AvalancheGoVersion, withMonitoring); err != nil { return err } diff --git a/node/monitoring/monitoring.go b/node/monitoring/monitoring.go index f627b99..8ed7c4a 100644 --- a/node/monitoring/monitoring.go +++ b/node/monitoring/monitoring.go @@ -115,3 +115,8 @@ func WritePromtailConfig(filePath string, lokiIP string, lokiPort string, host s } return os.WriteFile(filePath, []byte(config), constants.WriteReadReadPerms) } + +// GetGrafanaUrl returns the URL of the Grafana dashboard. +func GetGrafanaUrl(monitoringHostIP string) string { + return fmt.Sprintf("http://%s:%d/dashboards", monitoringHostIP, constants.AvalanchegoGrafanaPort) +} From f6c3866ec608bc6ddd1b4a40c9951840db8fd58f Mon Sep 17 00:00:00 2001 From: Artur Reznikov Date: Wed, 26 Jun 2024 15:05:20 -0700 Subject: [PATCH 26/30] upload dashboards --- node/monitoring/monitoring.go | 2 +- node/ssh.go | 43 +++++++++++++++++++++++++++++++++++ utils/file.go | 12 ++++++++++ 3 files changed, 56 insertions(+), 1 deletion(-) diff --git a/node/monitoring/monitoring.go b/node/monitoring/monitoring.go index 8ed7c4a..38c155d 100644 --- a/node/monitoring/monitoring.go +++ b/node/monitoring/monitoring.go @@ -117,6 +117,6 @@ func WritePromtailConfig(filePath string, lokiIP string, lokiPort string, host s } // GetGrafanaUrl returns the URL of the Grafana dashboard. -func GetGrafanaUrl(monitoringHostIP string) string { +func GetGrafanaURL(monitoringHostIP string) string { return fmt.Sprintf("http://%s:%d/dashboards", monitoringHostIP, constants.AvalanchegoGrafanaPort) } diff --git a/node/ssh.go b/node/ssh.go index b6352b2..14c2399 100644 --- a/node/ssh.go +++ b/node/ssh.go @@ -319,6 +319,21 @@ func (h *Node) RegisterWithMonitoring(targets []Node, chainID string) error { wg.Wait() if wgResults.HasErrors() { return wgResults.Error() + } + // provide dashboards for targets + tmpdir, err := os.MkdirTemp("", constants.ServiceGrafana) + if err != nil { + return err + } + defer os.RemoveAll(tmpdir) + if err := monitoring.Setup(tmpdir); err != nil { + return err + } + if err := h.RunSSHSetupMonitoringFolders(); err != nil { + return err + } + if err := h.RunSSHCopyMonitoringDashboards(tmpdir); err != nil { + } avalancheGoPorts, machinePorts, ltPorts := getPrometheusTargets(targets) h.Logger.Infof("avalancheGoPorts: %v, machinePorts: %v, ltPorts: %v", avalancheGoPorts, machinePorts, ltPorts) @@ -338,3 +353,31 @@ func (h *Node) RegisterWithMonitoring(targets []Node, chainID string) error { return nil } + +func (h *Node) RunSSHCopyMonitoringDashboards(monitoringDashboardPath string) error { + // TODO: download dashboards from github instead + remoteDashboardsPath := utils.GetRemoteComposeServicePath("grafana", "dashboards") + if !utils.DirectoryExists(monitoringDashboardPath) { + return fmt.Errorf("%s does not exist", monitoringDashboardPath) + } + if err := h.MkdirAll(remoteDashboardsPath, constants.SSHFileOpsTimeout); err != nil { + return err + } + dashboards, err := os.ReadDir(monitoringDashboardPath) + if err != nil { + return err + } + for _, dashboard := range dashboards { + if err := h.Upload( + filepath.Join(monitoringDashboardPath, dashboard.Name()), + filepath.Join(remoteDashboardsPath, dashboard.Name()), + constants.SSHFileOpsTimeout, + ); err != nil { + return err + } + } + if composeFileExists, err := h.FileExists(utils.GetRemoteComposeFile()); err == nil && composeFileExists { + return h.RestartDockerComposeService(utils.GetRemoteComposeFile(), constants.ServiceGrafana, constants.SSHScriptTimeout) + } + return nil +} diff --git a/utils/file.go b/utils/file.go index 1b67cbe..4dec430 100644 --- a/utils/file.go +++ b/utils/file.go @@ -18,6 +18,18 @@ func FileExists(filename string) bool { return !info.IsDir() } +// DirectoryExists checks if a directory exists. +// +// dirName: the name of the directory to check. +// bool: returns true if the directory exists, false otherwise. +func DirectoryExists(dirName string) bool { + info, err := os.Stat(dirName) + if os.IsNotExist(err) { + return false + } + return info.IsDir() +} + // ExpandHome expands ~ symbol to home directory func ExpandHome(path string) string { if path == "" { From bbc515270b1a073eeda18623dff48421fe54db56 Mon Sep 17 00:00:00 2001 From: Artur Reznikov Date: Wed, 26 Jun 2024 15:07:42 -0700 Subject: [PATCH 27/30] update aws example --- examples/aws.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/examples/aws.go b/examples/aws.go index 3ea3e92..9c5dd8c 100644 --- a/examples/aws.go +++ b/examples/aws.go @@ -83,10 +83,7 @@ func main() { if err != nil { panic(err) } - // Wait for the monitoring host to be ready - if err := monitoringHosts[0].WaitForSSHShell(sshTimeout); err != nil { - panic(err) - } + fmt.Println("Monitoring host SSH shell ready to execute commands") // Register nodes with monitoring host if err := monitoringHosts[0].RegisterWithMonitoring(hosts, ""); err != nil { panic(err) From 101a289d700a3baa0b8f830188813ededf33d986 Mon Sep 17 00:00:00 2001 From: Artur Reznikov Date: Wed, 26 Jun 2024 15:46:45 -0700 Subject: [PATCH 28/30] address feedback --- examples/aws.go | 20 ++++++++------------ node/create.go | 5 +++-- node/ssh.go | 3 +-- 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/examples/aws.go b/examples/aws.go index 9c5dd8c..1f96585 100644 --- a/examples/aws.go +++ b/examples/aws.go @@ -8,6 +8,7 @@ import ( "fmt" "time" + "github.com/ava-labs/avalanche-tooling-sdk-go/avalanche" "github.com/ava-labs/avalanche-tooling-sdk-go/node" ) @@ -33,7 +34,7 @@ func main() { CloudParams: cp, Count: 2, Roles: []node.SupportedRole{node.Validator}, - NetworkID: "fuji", + Network: avalanche.FujiNetwork(), AvalancheGoVersion: avalanchegoVersion, AvalancheCliVersion: avalancheCliVersion, UseStaticIP: false, @@ -59,7 +60,7 @@ func main() { } else { fmt.Println(string(output)) } - // sleep for 10 seconds allowing avalancghego container to start + // sleep for 10 seconds allowing AvalancheGo container to start time.Sleep(10 * time.Second) // check if avalanchego is running if output, err := h.Commandf(nil, sshCommandTimeout, "docker ps"); err != nil { @@ -68,24 +69,19 @@ func main() { fmt.Println(string(output)) } } - fmt.Println("About to create a monitoring node") // Create a monitoring node monitoringHosts, err := node.CreateNodes(ctx, &node.NodeParams{ - CloudParams: cp, - Count: 1, - Roles: []node.SupportedRole{node.Monitor}, - NetworkID: "", - AvalancheGoVersion: "", - AvalancheCliVersion: "", - UseStaticIP: false, + CloudParams: cp, + Count: 1, + Roles: []node.SupportedRole{node.Monitor}, + UseStaticIP: false, }) if err != nil { panic(err) } - fmt.Println("Monitoring host SSH shell ready to execute commands") // Register nodes with monitoring host - if err := monitoringHosts[0].RegisterWithMonitoring(hosts, ""); err != nil { + if err := monitoringHosts[0].MonitorNodes(hosts, ""); err != nil { panic(err) } } diff --git a/node/create.go b/node/create.go index 895e2d2..3df2229 100644 --- a/node/create.go +++ b/node/create.go @@ -8,6 +8,7 @@ import ( "fmt" "sync" + "github.com/ava-labs/avalanche-tooling-sdk-go/avalanche" awsAPI "github.com/ava-labs/avalanche-tooling-sdk-go/cloud/aws" gcpAPI "github.com/ava-labs/avalanche-tooling-sdk-go/cloud/gcp" "github.com/ava-labs/avalanche-tooling-sdk-go/constants" @@ -19,7 +20,7 @@ type NodeParams struct { CloudParams *CloudParams Count int Roles []SupportedRole - NetworkID string + Network avalanche.Network AvalancheGoVersion string AvalancheCliVersion string UseStaticIP bool @@ -235,7 +236,7 @@ func provisionAvagoHost(node Node, nodeParams *NodeParams) error { if err := node.RunSSHSetupPromtailConfig("127.0.0.1", constants.AvalanchegoLokiPort, node.NodeID, "", ""); err != nil { return err } - if err := node.ComposeSSHSetupNode(nodeParams.NetworkID, nodeParams.AvalancheGoVersion, withMonitoring); err != nil { + if err := node.ComposeSSHSetupNode(nodeParams.Network.HRP(), nodeParams.AvalancheGoVersion, withMonitoring); err != nil { return err } if err := node.StartDockerCompose(constants.SSHScriptTimeout); err != nil { diff --git a/node/ssh.go b/node/ssh.go index 14c2399..286e214 100644 --- a/node/ssh.go +++ b/node/ssh.go @@ -285,7 +285,7 @@ func (h *Node) RunSSHSetupMonitoringFolders() error { } // RegisterWithMonitoring registers the node with the monitoring service -func (h *Node) RegisterWithMonitoring(targets []Node, chainID string) error { +func (h *Node) MonitorNodes(targets []Node, chainID string) error { // necessary checks if !isMonitoringNode(*h) { return fmt.Errorf("%s is not a monitoring node", h.NodeID) @@ -333,7 +333,6 @@ func (h *Node) RegisterWithMonitoring(targets []Node, chainID string) error { return err } if err := h.RunSSHCopyMonitoringDashboards(tmpdir); err != nil { - } avalancheGoPorts, machinePorts, ltPorts := getPrometheusTargets(targets) h.Logger.Infof("avalancheGoPorts: %v, machinePorts: %v, ltPorts: %v", avalancheGoPorts, machinePorts, ltPorts) From 12f13f8707da2f21a8751c922fa866333760661d Mon Sep 17 00:00:00 2001 From: Artur Reznikov Date: Wed, 26 Jun 2024 15:48:13 -0700 Subject: [PATCH 29/30] lint --- node/ssh.go | 1 + 1 file changed, 1 insertion(+) diff --git a/node/ssh.go b/node/ssh.go index 286e214..86bf822 100644 --- a/node/ssh.go +++ b/node/ssh.go @@ -333,6 +333,7 @@ func (h *Node) MonitorNodes(targets []Node, chainID string) error { return err } if err := h.RunSSHCopyMonitoringDashboards(tmpdir); err != nil { + return err } avalancheGoPorts, machinePorts, ltPorts := getPrometheusTargets(targets) h.Logger.Infof("avalancheGoPorts: %v, machinePorts: %v, ltPorts: %v", avalancheGoPorts, machinePorts, ltPorts) From ea669cc8ddb40209e03c44a0bd7d09edb8fda76d Mon Sep 17 00:00:00 2001 From: Artur Reznikov Date: Wed, 26 Jun 2024 15:52:22 -0700 Subject: [PATCH 30/30] update license to 2024 --- LICENSE | 2 +- LICENSE.header | 4 ++-- cloud/aws/aws.go | 2 +- cloud/gcp/gcp.go | 4 ++-- constants/constants.go | 2 +- node/monitoring/monitoring.go | 2 +- node/nodeResult.go | 2 ++ utils/common_test.go | 2 +- utils/e2e.go | 2 +- utils/file.go | 2 +- utils/file_test.go | 2 +- utils/ssh.go | 2 +- utils/ssh_test.go | 2 +- utils/staking.go | 2 +- utils/strings.go | 2 +- utils/strings_test.go | 2 +- utils/utils.go | 2 +- vm/evmSettings.go | 2 +- 18 files changed, 21 insertions(+), 19 deletions(-) diff --git a/LICENSE b/LICENSE index 2643a9c..8fbd758 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (C) 2023, Ava Labs, Inc. All rights reserved. +Copyright (C) 2024, Ava Labs, Inc. All rights reserved. Ecosystem License Version: 1.1 diff --git a/LICENSE.header b/LICENSE.header index 99525ca..704e2f9 100644 --- a/LICENSE.header +++ b/LICENSE.header @@ -1,2 +1,2 @@ -Copyright (C) 2022, Ava Labs, Inc. All rights reserved. -See the file LICENSE for licensing terms. \ No newline at end of file +Copyright (C) 2024, Ava Labs, Inc. All rights reserved. +See the file LICENSE for licensing terms. diff --git a/cloud/aws/aws.go b/cloud/aws/aws.go index 7952ca1..8fbb5f6 100644 --- a/cloud/aws/aws.go +++ b/cloud/aws/aws.go @@ -1,4 +1,4 @@ -// Copyright (C) 2022, Ava Labs, Inc. All rights reserved. +// Copyright (C) 2024, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. package aws diff --git a/cloud/gcp/gcp.go b/cloud/gcp/gcp.go index 17b3a6e..2d8bf30 100644 --- a/cloud/gcp/gcp.go +++ b/cloud/gcp/gcp.go @@ -1,4 +1,4 @@ -// Copyright (C) 2022, Ava Labs, Inc. All rights reserved. +// Copyright (C) 2024, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. package gcp @@ -319,7 +319,7 @@ func (c *GcpCloud) SetupInstances( return instances, nil } -// // Copyright (C) 2022, Ava Labs, Inc. All rights reserved. +// // Copyright (C) 2024, Ava Labs, Inc. All rights reserved. // // See the file LICENSE for licensing terms. func (c *GcpCloud) GetUbuntuimageID() (string, error) { diff --git a/constants/constants.go b/constants/constants.go index ffe0dbf..62cbf88 100644 --- a/constants/constants.go +++ b/constants/constants.go @@ -1,4 +1,4 @@ -// Copyright (C) 2022, Ava Labs, Inc. All rights reserved. +// Copyright (C) 2024, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. package constants diff --git a/node/monitoring/monitoring.go b/node/monitoring/monitoring.go index 38c155d..51e3a97 100644 --- a/node/monitoring/monitoring.go +++ b/node/monitoring/monitoring.go @@ -1,4 +1,4 @@ -// Copyright (C) 2022, Ava Labs, Inc. All rights reserved. +// Copyright (C) 2024, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. package monitoring diff --git a/node/nodeResult.go b/node/nodeResult.go index 0715ef8..ac88101 100644 --- a/node/nodeResult.go +++ b/node/nodeResult.go @@ -1,3 +1,5 @@ +// Copyright (C) 2024, Ava Labs, Inc. All rights reserved. +// See the file LICENSE for licensing terms. package node import ( diff --git a/utils/common_test.go b/utils/common_test.go index e7682af..678be16 100644 --- a/utils/common_test.go +++ b/utils/common_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023, Ava Labs, Inc. All rights reserved. +// Copyright (C) 2024, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. package utils diff --git a/utils/e2e.go b/utils/e2e.go index 9175710..b3dd73f 100644 --- a/utils/e2e.go +++ b/utils/e2e.go @@ -1,4 +1,4 @@ -// Copyright (C) 2022, Ava Labs, Inc. All rights reserved. +// Copyright (C) 2024, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. package utils diff --git a/utils/file.go b/utils/file.go index 4dec430..8bf2e4c 100644 --- a/utils/file.go +++ b/utils/file.go @@ -1,4 +1,4 @@ -// Copyright (C) 2022, Ava Labs, Inc. All rights reserved. +// Copyright (C) 2024, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. package utils diff --git a/utils/file_test.go b/utils/file_test.go index de9c42c..abebe66 100644 --- a/utils/file_test.go +++ b/utils/file_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023, Ava Labs, Inc. All rights reserved. +// Copyright (C) 2024, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. package utils diff --git a/utils/ssh.go b/utils/ssh.go index 7a63cdd..fd9ca41 100644 --- a/utils/ssh.go +++ b/utils/ssh.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023, Ava Labs, Inc. All rights reserved. +// Copyright (C) 2024, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. package utils diff --git a/utils/ssh_test.go b/utils/ssh_test.go index 018f34f..6bca7c7 100644 --- a/utils/ssh_test.go +++ b/utils/ssh_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023, Ava Labs, Inc. All rights reserved. +// Copyright (C) 2024, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. package utils diff --git a/utils/staking.go b/utils/staking.go index ecd16fe..90981b0 100644 --- a/utils/staking.go +++ b/utils/staking.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023, Ava Labs, Inc. All rights reserved. +// Copyright (C) 2024, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. package utils diff --git a/utils/strings.go b/utils/strings.go index 2ed5e97..c58d0ce 100644 --- a/utils/strings.go +++ b/utils/strings.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023, Ava Labs, Inc. All rights reserved. +// Copyright (C) 2024, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. package utils diff --git a/utils/strings_test.go b/utils/strings_test.go index e7a7f44..e492658 100644 --- a/utils/strings_test.go +++ b/utils/strings_test.go @@ -1,4 +1,4 @@ -// Copyright (C) 2023, Ava Labs, Inc. All rights reserved. +// Copyright (C) 2024, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. package utils diff --git a/utils/utils.go b/utils/utils.go index c7e452e..82c90e2 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -1,4 +1,4 @@ -// Copyright (C) 2022, Ava Labs, Inc. All rights reserved. +// Copyright (C) 2024, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. package utils diff --git a/vm/evmSettings.go b/vm/evmSettings.go index 93f7955..42a44cd 100644 --- a/vm/evmSettings.go +++ b/vm/evmSettings.go @@ -1,4 +1,4 @@ -// Copyright (C) 2022, Ava Labs, Inc. All rights reserved. +// Copyright (C) 2024, Ava Labs, Inc. All rights reserved. // See the file LICENSE for licensing terms. package vm