diff --git a/bench-exchange/src/bench.rs b/bench-exchange/src/bench.rs index 4b8f6a4f5..99c7ea491 100644 --- a/bench-exchange/src/bench.rs +++ b/bench-exchange/src/bench.rs @@ -11,7 +11,7 @@ use solana_drone::drone::request_airdrop_transaction; use solana_exchange_api::exchange_instruction; use solana_exchange_api::exchange_state::*; use solana_exchange_api::id; -use solana_metrics::influxdb; +use solana_metrics::datapoint; use solana_sdk::client::Client; use solana_sdk::client::SyncClient; use solana_sdk::pubkey::Pubkey; @@ -262,15 +262,10 @@ fn do_tx_transfers( let duration = now.elapsed(); total_txs_sent_count.fetch_add(n, Ordering::Relaxed); - solana_metrics::submit( - influxdb::Point::new("bench-exchange") - .add_tag("op", influxdb::Value::String("do_tx_transfers".to_string())) - .add_field( - "duration", - influxdb::Value::Integer(duration_as_ms(&duration) as i64), - ) - .add_field("count", influxdb::Value::Integer(n as i64)) - .to_owned(), + datapoint!( + "bench-exchange-do_tx_transfers", + ("duration", duration_as_ms(&duration), i64), + ("count", n, i64) ); } if exit_signal.load(Ordering::Relaxed) { @@ -414,12 +409,7 @@ fn swapper( txs = 0; } - solana_metrics::submit( - influxdb::Point::new("bench-exchange") - .add_tag("op", influxdb::Value::String("swaps".to_string())) - .add_field("count", influxdb::Value::Integer(to_swap_txs.len() as i64)) - .to_owned(), - ); + datapoint!("bench-exchange-swaps", ("count", to_swap_txs.len(), i64)); let chunks: Vec<_> = to_swap_txs.chunks(chunk_size).collect(); { @@ -551,12 +541,7 @@ fn trader( txs = 0; } - solana_metrics::submit( - influxdb::Point::new("bench-exchange") - .add_tag("op", influxdb::Value::String("trades".to_string())) - .add_field("count", influxdb::Value::Integer(trades_txs.len() as i64)) - .to_owned(), - ); + datapoint!("bench-exchange-trades", ("count", trades_txs.len(), i64)); { let mut shared_txs_wl = shared_txs diff --git a/bench-tps/src/bench.rs b/bench-tps/src/bench.rs index 589a2815b..cf073caaf 100644 --- a/bench-tps/src/bench.rs +++ b/bench-tps/src/bench.rs @@ -5,7 +5,7 @@ use rayon::prelude::*; use solana::gen_keys::GenKeys; use solana_client::perf_utils::{sample_txs, SampleStats}; use solana_drone::drone::request_airdrop_transaction; -use solana_metrics::influxdb; +use solana_metrics::datapoint; use solana_sdk::client::Client; use solana_sdk::hash::Hash; use solana_sdk::signature::{Keypair, KeypairUtil}; @@ -209,11 +209,9 @@ where fn metrics_submit_lamport_balance(lamport_balance: u64) { println!("Token balance: {}", lamport_balance); - solana_metrics::submit( - influxdb::Point::new("bench-tps") - .add_tag("op", influxdb::Value::String("lamport_balance".to_string())) - .add_field("balance", influxdb::Value::Integer(lamport_balance as i64)) - .to_owned(), + datapoint!( + "bench-tps-lamport_balance", + ("balance", lamport_balance, i64) ); } @@ -255,14 +253,9 @@ fn generate_txs( duration_as_ms(&duration), blockhash, ); - solana_metrics::submit( - influxdb::Point::new("bench-tps") - .add_tag("op", influxdb::Value::String("generate_txs".to_string())) - .add_field( - "duration", - influxdb::Value::Integer(duration_as_ms(&duration) as i64), - ) - .to_owned(), + datapoint!( + "bench-tps-generate_txs", + ("duration", duration_as_ms(&duration), i64) ); let sz = transactions.len() / threads; @@ -315,15 +308,10 @@ fn do_tx_transfers( duration_as_ms(&transfer_start.elapsed()), tx_len as f32 / duration_as_s(&transfer_start.elapsed()), ); - solana_metrics::submit( - influxdb::Point::new("bench-tps") - .add_tag("op", influxdb::Value::String("do_tx_transfers".to_string())) - .add_field( - "duration", - influxdb::Value::Integer(duration_as_ms(&transfer_start.elapsed()) as i64), - ) - .add_field("count", influxdb::Value::Integer(tx_len as i64)) - .to_owned(), + datapoint!( + "bench-tps-do_tx_transfers", + ("duration", duration_as_ms(&transfer_start.elapsed()), i64), + ("count", tx_len, i64) ); } if exit_signal.load(Ordering::Relaxed) { diff --git a/ci/testnet-automation.sh b/ci/testnet-automation.sh index 915664f28..f37bc9832 100755 --- a/ci/testnet-automation.sh +++ b/ci/testnet-automation.sh @@ -52,14 +52,14 @@ launchTestnet() { declare q_mean_tps=' SELECT round(mean("sum_count")) AS "mean_tps" FROM ( SELECT sum("count") AS "sum_count" - FROM "testnet-automation"."autogen"."counter-banking_stage-process_transactions" + FROM "testnet-automation"."autogen"."banking_stage-process_transactions" WHERE time > now() - 300s GROUP BY time(1s) )' declare q_max_tps=' SELECT round(max("sum_count")) AS "max_tps" FROM ( SELECT sum("count") AS "sum_count" - FROM "testnet-automation"."autogen"."counter-banking_stage-process_transactions" + FROM "testnet-automation"."autogen"."banking_stage-process_transactions" WHERE time > now() - 300s GROUP BY time(1s) )' diff --git a/core/src/bank_forks.rs b/core/src/bank_forks.rs index ee643b7e7..d420c037a 100644 --- a/core/src/bank_forks.rs +++ b/core/src/bank_forks.rs @@ -1,7 +1,7 @@ //! The `bank_forks` module implments BankForks a DAG of checkpointed Banks use hashbrown::{HashMap, HashSet}; -use solana_metrics::counter::Counter; +use solana_metrics::inc_new_counter_info; use solana_runtime::bank::Bank; use solana_sdk::timing; use std::ops::Index; diff --git a/core/src/banking_stage.rs b/core/src/banking_stage.rs index a4dade4cd..6b435e58d 100644 --- a/core/src/banking_stage.rs +++ b/core/src/banking_stage.rs @@ -15,7 +15,7 @@ use crate::service::Service; use crate::sigverify_stage::VerifiedPackets; use bincode::deserialize; use itertools::Itertools; -use solana_metrics::counter::Counter; +use solana_metrics::inc_new_counter_info; use solana_runtime::accounts_db::ErrorCounters; use solana_runtime::bank::Bank; use solana_runtime::locked_accounts_results::LockedAccountsResults; diff --git a/core/src/blocktree.rs b/core/src/blocktree.rs index 16f086aee..e0f147e20 100644 --- a/core/src/blocktree.rs +++ b/core/src/blocktree.rs @@ -16,7 +16,7 @@ use hashbrown::HashMap; #[cfg(not(feature = "kvstore"))] use rocksdb; -use solana_metrics::counter::Counter; +use solana_metrics::{datapoint, inc_new_counter_info}; use solana_sdk::genesis_block::GenesisBlock; use solana_sdk::hash::Hash; @@ -1006,16 +1006,16 @@ fn should_insert_blob( // for the slot let last_index = slot.last_index; if blob_index >= last_index { - solana_metrics::submit( - solana_metrics::influxdb::Point::new("blocktree_error") - .add_field( - "error", - solana_metrics::influxdb::Value::String(format!( - "Received last blob with index {} >= slot.last_index {}", - blob_index, last_index - )), - ) - .to_owned(), + datapoint!( + "blocktree_error", + ( + "error", + format!( + "Received last blob with index {} >= slot.last_index {}", + blob_index, last_index + ), + String + ) ); return false; } @@ -1023,16 +1023,16 @@ fn should_insert_blob( // Check that we do not receive a blob with "last_index" true, but index // less than our current received if blob.is_last_in_slot() && blob_index < slot.received { - solana_metrics::submit( - solana_metrics::influxdb::Point::new("blocktree_error") - .add_field( - "error", - solana_metrics::influxdb::Value::String(format!( - "Received last blob with index {} < slot.received {}", - blob_index, slot.received - )), - ) - .to_owned(), + datapoint!( + "blocktree_error", + ( + "error", + format!( + "Received last blob with index {} < slot.received {}", + blob_index, slot.received + ), + String + ) ); return false; } diff --git a/core/src/blocktree/meta.rs b/core/src/blocktree/meta.rs index a1fa6d064..b34576d14 100644 --- a/core/src/blocktree/meta.rs +++ b/core/src/blocktree/meta.rs @@ -1,4 +1,5 @@ use crate::erasure::{NUM_CODING, NUM_DATA}; +use solana_metrics::datapoint; use std::borrow::Borrow; #[derive(Clone, Debug, Default, Deserialize, Serialize, Eq, PartialEq)] @@ -37,17 +38,17 @@ impl SlotMeta { // Should never happen if self.consumed > self.last_index + 1 { - solana_metrics::submit( - solana_metrics::influxdb::Point::new("blocktree_error") - .add_field( - "error", - solana_metrics::influxdb::Value::String(format!( - "Observed a slot meta with consumed: {} > meta.last_index + 1: {}", - self.consumed, - self.last_index + 1 - )), - ) - .to_owned(), + datapoint!( + "blocktree_error", + ( + "error", + format!( + "Observed a slot meta with consumed: {} > meta.last_index + 1: {}", + self.consumed, + self.last_index + 1 + ), + String + ) ); } diff --git a/core/src/blocktree_processor.rs b/core/src/blocktree_processor.rs index 4e37d9a1c..70d0803db 100644 --- a/core/src/blocktree_processor.rs +++ b/core/src/blocktree_processor.rs @@ -3,7 +3,7 @@ use crate::blocktree::Blocktree; use crate::entry::{Entry, EntrySlice}; use crate::leader_schedule_cache::LeaderScheduleCache; use rayon::prelude::*; -use solana_metrics::counter::Counter; +use solana_metrics::{datapoint, inc_new_counter_info}; use solana_runtime::bank::Bank; use solana_runtime::locked_accounts_results::LockedAccountsResults; use solana_sdk::genesis_block::GenesisBlock; @@ -43,14 +43,10 @@ fn par_execute_entries( } if !Bank::can_commit(&r) { warn!("Unexpected validator error: {:?}", e); - solana_metrics::submit( - solana_metrics::influxdb::Point::new("validator_process_entry_error") - .add_field( - "error", - solana_metrics::influxdb::Value::String(format!("{:?}", e)), - ) - .to_owned(), - ) + datapoint!( + "validator_process_entry_error", + ("error", format!("{:?}", e), String) + ); } } } @@ -86,16 +82,16 @@ pub fn process_entries(bank: &Bank, entries: &[Entry]) -> Result<()> { if mt_group.is_empty() { // An entry has account lock conflicts with itself, which should not happen // if generated by properly functioning leaders - solana_metrics::submit( - solana_metrics::influxdb::Point::new("validator_process_entry_error") - .add_field( - "error", - solana_metrics::influxdb::Value::String(format!( - "Lock accounts error, entry conflicts with itself, txs: {:?}", - entry.transactions - )), - ) - .to_owned(), + datapoint!( + "validator_process_entry_error", + ( + "error", + format!( + "Lock accounts error, entry conflicts with itself, txs: {:?}", + entry.transactions + ), + String + ) ); first_lock_err?; diff --git a/core/src/broadcast_stage.rs b/core/src/broadcast_stage.rs index bb3cb9c43..dfe57830f 100644 --- a/core/src/broadcast_stage.rs +++ b/core/src/broadcast_stage.rs @@ -10,8 +10,7 @@ use crate::result::{Error, Result}; use crate::service::Service; use crate::staking_utils; use rayon::prelude::*; -use solana_metrics::counter::Counter; -use solana_metrics::{influxdb, submit}; +use solana_metrics::{datapoint, inc_new_counter_info}; use solana_sdk::hash::Hash; use solana_sdk::pubkey::Pubkey; use solana_sdk::timing::duration_as_ms; @@ -141,14 +140,7 @@ impl Broadcast { num_entries, to_blobs_elapsed, broadcast_elapsed ); - submit( - influxdb::Point::new("broadcast-service") - .add_field( - "transmit-index", - influxdb::Value::Integer(blob_index as i64), - ) - .to_owned(), - ); + datapoint!("broadcast-service", ("transmit-index", blob_index, i64)); Ok(()) } diff --git a/core/src/cluster_info.rs b/core/src/cluster_info.rs index 4956d239f..0c9f91cea 100644 --- a/core/src/cluster_info.rs +++ b/core/src/cluster_info.rs @@ -29,8 +29,7 @@ use core::cmp; use hashbrown::HashMap; use rand::{thread_rng, Rng}; use rayon::prelude::*; -use solana_metrics::counter::Counter; -use solana_metrics::{influxdb, submit}; +use solana_metrics::{datapoint, inc_new_counter_info}; use solana_netutil::{ bind_in_range, bind_to, find_available_port_in_range, multi_bind_in_range, PortRange, }; @@ -818,35 +817,23 @@ impl ClusterInfo { let out = { match repair_request { RepairType::Blob(slot, blob_index) => { - submit( - influxdb::Point::new("cluster_info-repair") - .add_field("repair-slot", influxdb::Value::Integer(*slot as i64)) - .add_field("repair-ix", influxdb::Value::Integer(*blob_index as i64)) - .to_owned(), + datapoint!( + "cluster_info-repair", + ("repair-slot", *slot, i64), + ("repair-ix", *blob_index, i64) ); self.window_index_request_bytes(*slot, *blob_index)? } RepairType::HighestBlob(slot, blob_index) => { - submit( - influxdb::Point::new("cluster_info-repair_highest") - .add_field( - "repair-highest-slot", - influxdb::Value::Integer(*slot as i64), - ) - .add_field( - "repair-highest-ix", - influxdb::Value::Integer(*blob_index as i64), - ) - .to_owned(), + datapoint!( + "cluster_info-repair_highest", + ("repair-highest-slot", *slot, i64), + ("repair-highest-ix", *blob_index, i64) ); self.window_highest_index_request_bytes(*slot, *blob_index)? } RepairType::Orphan(slot) => { - submit( - influxdb::Point::new("cluster_info-repair_orphan") - .add_field("repair-orphan", influxdb::Value::Integer(*slot as i64)) - .to_owned(), - ); + datapoint!("cluster_info-repair_orphan", ("repair-orphan", *slot, i64)); self.orphan_bytes(*slot)? } } diff --git a/core/src/cluster_info_vote_listener.rs b/core/src/cluster_info_vote_listener.rs index 40527414d..e8759c149 100644 --- a/core/src/cluster_info_vote_listener.rs +++ b/core/src/cluster_info_vote_listener.rs @@ -4,7 +4,7 @@ use crate::result::Result; use crate::service::Service; use crate::sigverify_stage::VerifiedPackets; use crate::{packet, sigverify}; -use solana_metrics::counter::Counter; +use solana_metrics::inc_new_counter_info; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::mpsc::Sender; use std::sync::{Arc, Mutex, RwLock}; diff --git a/core/src/fetch_stage.rs b/core/src/fetch_stage.rs index 1d3d3bded..9593755f5 100644 --- a/core/src/fetch_stage.rs +++ b/core/src/fetch_stage.rs @@ -4,7 +4,7 @@ use crate::poh_recorder::PohRecorder; use crate::result::{Error, Result}; use crate::service::Service; use crate::streamer::{self, PacketReceiver, PacketSender}; -use solana_metrics::counter::Counter; +use solana_metrics::inc_new_counter_info; use solana_sdk::timing::DEFAULT_TICKS_PER_SLOT; use std::net::UdpSocket; use std::sync::atomic::AtomicBool; diff --git a/core/src/fullnode.rs b/core/src/fullnode.rs index b291f33d5..b0764c37c 100644 --- a/core/src/fullnode.rs +++ b/core/src/fullnode.rs @@ -20,7 +20,7 @@ use crate::service::Service; use crate::storage_stage::StorageState; use crate::tpu::Tpu; use crate::tvu::{Sockets, Tvu}; -use solana_metrics::counter::Counter; +use solana_metrics::inc_new_counter_info; use solana_sdk::genesis_block::GenesisBlock; use solana_sdk::hash::Hash; use solana_sdk::pubkey::Pubkey; diff --git a/core/src/locktower.rs b/core/src/locktower.rs index 083aa5957..eb248b4b2 100644 --- a/core/src/locktower.rs +++ b/core/src/locktower.rs @@ -1,7 +1,7 @@ use crate::bank_forks::BankForks; use crate::staking_utils; use hashbrown::{HashMap, HashSet}; -use solana_metrics::influxdb; +use solana_metrics::datapoint; use solana_runtime::bank::Bank; use solana_sdk::account::Account; use solana_sdk::pubkey::Pubkey; @@ -125,19 +125,14 @@ impl Locktower { vote_state.nth_recent_vote(0).map(|v| v.slot).unwrap_or(0) as i64 ); debug!("observed root {}", vote_state.root_slot.unwrap_or(0) as i64); - solana_metrics::submit( - influxdb::Point::new("counter-locktower-observed") - .add_field( - "slot", - influxdb::Value::Integer( - vote_state.nth_recent_vote(0).map(|v| v.slot).unwrap_or(0) as i64, - ), - ) - .add_field( - "root", - influxdb::Value::Integer(vote_state.root_slot.unwrap_or(0) as i64), - ) - .to_owned(), + datapoint!( + "locktower-observed", + ( + "slot", + vote_state.nth_recent_vote(0).map(|v| v.slot).unwrap_or(0), + i64 + ), + ("root", vote_state.root_slot.unwrap_or(0), i64) ); } let start_root = vote_state.root_slot; @@ -216,21 +211,11 @@ impl Locktower { self.epoch_stakes.epoch ); self.epoch_stakes = EpochStakes::new_from_bank(bank, &self.epoch_stakes.delegate_id); - solana_metrics::submit( - influxdb::Point::new("counter-locktower-epoch") - .add_field( - "epoch", - influxdb::Value::Integer(self.epoch_stakes.epoch as i64), - ) - .add_field( - "self_staked", - influxdb::Value::Integer(self.epoch_stakes.self_staked as i64), - ) - .add_field( - "total_staked", - influxdb::Value::Integer(self.epoch_stakes.total_staked as i64), - ) - .to_owned(), + datapoint!( + "locktower-epoch", + ("epoch", self.epoch_stakes.epoch, i64), + ("self_staked", self.epoch_stakes.self_staked, i64), + ("total_staked", self.epoch_stakes.total_staked, i64) ); } } @@ -238,14 +223,10 @@ impl Locktower { pub fn record_vote(&mut self, slot: u64) -> Option { let root_slot = self.lockouts.root_slot; self.lockouts.process_vote(&Vote { slot }); - solana_metrics::submit( - influxdb::Point::new("counter-locktower-vote") - .add_field("latest", influxdb::Value::Integer(slot as i64)) - .add_field( - "root", - influxdb::Value::Integer(self.lockouts.root_slot.unwrap_or(0) as i64), - ) - .to_owned(), + datapoint!( + "locktower-vote", + ("latest", slot, i64), + ("root", self.lockouts.root_slot.unwrap_or(0), i64) ); if root_slot != self.lockouts.root_slot { Some(self.lockouts.root_slot.unwrap()) diff --git a/core/src/packet.rs b/core/src/packet.rs index 0394552c2..d2a60e437 100644 --- a/core/src/packet.rs +++ b/core/src/packet.rs @@ -4,7 +4,7 @@ use crate::result::{Error, Result}; use bincode; use byteorder::{ByteOrder, LittleEndian}; use serde::Serialize; -use solana_metrics::counter::Counter; +use solana_metrics::inc_new_counter_info; use solana_sdk::hash::Hash; pub use solana_sdk::packet::PACKET_DATA_SIZE; use solana_sdk::pubkey::Pubkey; diff --git a/core/src/repair_service.rs b/core/src/repair_service.rs index 6c129cf19..1b0b90dd7 100644 --- a/core/src/repair_service.rs +++ b/core/src/repair_service.rs @@ -6,7 +6,7 @@ use crate::blocktree::{Blocktree, CompletedSlotsReceiver, SlotMeta}; use crate::cluster_info::ClusterInfo; use crate::result::Result; use crate::service::Service; -use solana_metrics::{influxdb, submit}; +use solana_metrics::datapoint; use solana_sdk::pubkey::Pubkey; use std::collections::HashSet; use std::net::UdpSocket; @@ -153,22 +153,14 @@ impl RepairService { for ((to, req), repair_request) in reqs { if let Ok(local_addr) = repair_socket.local_addr() { - submit( - influxdb::Point::new("repair_service") - .add_field( - "repair_request", - influxdb::Value::String(format!("{:?}", repair_request)), - ) - .to_owned() - .add_field("to", influxdb::Value::String(to.to_string())) - .to_owned() - .add_field("from", influxdb::Value::String(local_addr.to_string())) - .to_owned() - .add_field("id", influxdb::Value::String(id.to_string())) - .to_owned(), + datapoint!( + "repair_service", + ("repair_request", format!("{:?}", repair_request), String), + ("to", to.to_string(), String), + ("from", local_addr.to_string(), String), + ("id", id.to_string(), String) ); } - repair_socket.send_to(&req, to).unwrap_or_else(|e| { info!("{} repair req send_to({}) error {:?}", id, to, e); 0 diff --git a/core/src/replay_stage.rs b/core/src/replay_stage.rs index ed9c963ba..fba4ea491 100644 --- a/core/src/replay_stage.rs +++ b/core/src/replay_stage.rs @@ -14,8 +14,7 @@ use crate::result::{Error, Result}; use crate::rpc_subscriptions::RpcSubscriptions; use crate::service::Service; use hashbrown::HashMap; -use solana_metrics::counter::Counter; -use solana_metrics::influxdb; +use solana_metrics::{datapoint, inc_new_counter_info}; use solana_runtime::bank::Bank; use solana_sdk::hash::Hash; use solana_sdk::pubkey::Pubkey; @@ -245,17 +244,10 @@ impl ReplayStage { cluster_info.write().unwrap().set_leader(&next_leader); if next_leader == *my_id && reached_leader_tick { debug!("{} starting tpu for slot {}", my_id, poh_slot); - solana_metrics::submit( - influxdb::Point::new("counter-replay_stage-new_leader") - .add_field( - "count", - influxdb::Value::Integer(poh_slot as i64), - ) - .add_field( - "grace", - influxdb::Value::Integer(grace_ticks as i64), - ) - .to_owned(),); + datapoint!( + "replay_stage-new_leader", + ("count", poh_slot, i64), + ("grace", grace_ticks, i64)); let tpu_bank = Bank::new_from_parent(&parent, my_id, poh_slot); bank_forks.write().unwrap().insert(tpu_bank); if let Some(tpu_bank) = bank_forks.read().unwrap().get(poh_slot).cloned() { @@ -475,11 +467,7 @@ impl ReplayStage { .unwrap_or(true) { info!("validator fork confirmed {} {}", *slot, duration); - solana_metrics::submit( - influxdb::Point::new(&"validator-confirmation") - .add_field("duration_ms", influxdb::Value::Integer(duration as i64)) - .to_owned(), - ); + datapoint!("validator-confirmation", ("duration_ms", duration, i64)); false } else { debug!( diff --git a/core/src/retransmit_stage.rs b/core/src/retransmit_stage.rs index 769c8376a..8db788c69 100644 --- a/core/src/retransmit_stage.rs +++ b/core/src/retransmit_stage.rs @@ -10,8 +10,7 @@ use crate::service::Service; use crate::staking_utils; use crate::streamer::BlobReceiver; use crate::window_service::WindowService; -use solana_metrics::counter::Counter; -use solana_metrics::{influxdb, submit}; +use solana_metrics::{datapoint, inc_new_counter_info}; use solana_sdk::hash::Hash; use std::net::UdpSocket; use std::sync::atomic::AtomicBool; @@ -34,11 +33,8 @@ fn retransmit( blobs.append(&mut nq); } - submit( - influxdb::Point::new("retransmit-stage") - .add_field("count", influxdb::Value::Integer(blobs.len() as i64)) - .to_owned(), - ); + datapoint!("retransmit-stage", ("count", blobs.len(), i64)); + let r_bank = bank_forks.read().unwrap().working_bank(); let bank_epoch = r_bank.get_stakers_epoch(r_bank.slot()); let (neighbors, children) = compute_retransmit_peers( diff --git a/core/src/sigverify.rs b/core/src/sigverify.rs index 59a77d029..636d7e335 100644 --- a/core/src/sigverify.rs +++ b/core/src/sigverify.rs @@ -6,7 +6,7 @@ use crate::packet::{Packet, Packets}; use crate::result::Result; -use solana_metrics::counter::Counter; +use solana_metrics::inc_new_counter_info; use solana_sdk::pubkey::Pubkey; use solana_sdk::short_vec::decode_len; use solana_sdk::signature::Signature; diff --git a/core/src/sigverify_stage.rs b/core/src/sigverify_stage.rs index abe6f21fd..410a1aae5 100644 --- a/core/src/sigverify_stage.rs +++ b/core/src/sigverify_stage.rs @@ -10,8 +10,7 @@ use crate::result::{Error, Result}; use crate::service::Service; use crate::sigverify; use crate::streamer::{self, PacketReceiver}; -use solana_metrics::counter::Counter; -use solana_metrics::{influxdb, submit}; +use solana_metrics::{datapoint, inc_new_counter_info}; use solana_sdk::timing; use std::sync::mpsc::{Receiver, RecvTimeoutError, Sender}; use std::sync::{Arc, Mutex}; @@ -96,15 +95,11 @@ impl SigVerifyStage { (len as f32 / total_time_s) ); - submit( - influxdb::Point::new("sigverify_stage-total_verify_time") - .add_field("batch_len", influxdb::Value::Integer(batch_len as i64)) - .add_field("len", influxdb::Value::Integer(len as i64)) - .add_field( - "total_time_ms", - influxdb::Value::Integer(total_time_ms as i64), - ) - .to_owned(), + datapoint!( + "sigverify_stage-total_verify_time", + ("batch_len", batch_len, i64), + ("len", len, i64), + ("total_time_ms", total_time_ms, i64) ); Ok(()) diff --git a/core/src/window_service.rs b/core/src/window_service.rs index 7745cf807..007cf0620 100644 --- a/core/src/window_service.rs +++ b/core/src/window_service.rs @@ -11,7 +11,7 @@ use crate::repair_service::{RepairService, RepairStrategy}; use crate::result::{Error, Result}; use crate::service::Service; use crate::streamer::{BlobReceiver, BlobSender}; -use solana_metrics::counter::Counter; +use solana_metrics::inc_new_counter_info; use solana_runtime::bank::Bank; use solana_sdk::hash::Hash; use solana_sdk::pubkey::Pubkey; diff --git a/drone/src/drone.rs b/drone/src/drone.rs index 6c78125f8..8b3df6954 100644 --- a/drone/src/drone.rs +++ b/drone/src/drone.rs @@ -9,8 +9,7 @@ use byteorder::{ByteOrder, LittleEndian}; use bytes::{Bytes, BytesMut}; use log::*; use serde_derive::{Deserialize, Serialize}; -use solana_metrics; -use solana_metrics::influxdb; +use solana_metrics::datapoint; use solana_sdk::hash::Hash; use solana_sdk::message::Message; use solana_sdk::packet::PACKET_DATA_SIZE; @@ -114,17 +113,11 @@ impl Drone { } => { if self.check_request_limit(lamports) { self.request_current += lamports; - solana_metrics::submit( - influxdb::Point::new("drone") - .add_tag("op", influxdb::Value::String("airdrop".to_string())) - .add_field("request_amount", influxdb::Value::Integer(lamports as i64)) - .add_field( - "request_current", - influxdb::Value::Integer(self.request_current as i64), - ) - .to_owned(), + datapoint!( + "drone-airdrop", + ("request_amount", lamports, i64), + ("request_current", self.request_current, i64) ); - info!("Requesting airdrop of {} to {:?}", lamports, to); let create_instruction = system_instruction::create_user_account( diff --git a/metrics/scripts/enable.sh b/metrics/scripts/enable.sh index 1824b28bb..df4cc4826 100755 --- a/metrics/scripts/enable.sh +++ b/metrics/scripts/enable.sh @@ -1,10 +1,8 @@ #!/usr/bin/env bash -set -e - SOLANA_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"/../.. || exit 1; pwd)" -export SOLANA_METRICS_CONFIG="host=http://localhost:8086,db=local,u=admin,p=admin" +export SOLANA_METRICS_CONFIG="host=http://localhost:8086,db=testnet,u=admin,p=admin" # shellcheck source=scripts/configure-metrics.sh source "$SOLANA_ROOT"/scripts/configure-metrics.sh diff --git a/metrics/scripts/grafana-provisioning/dashboards/local.json b/metrics/scripts/grafana-provisioning/dashboards/local.json index e63cd9b60..bca343188 100644 --- a/metrics/scripts/grafana-provisioning/dashboards/local.json +++ b/metrics/scripts/grafana-provisioning/dashboards/local.json @@ -16,7 +16,7 @@ "gnetId": null, "graphTooltip": 0, "id": 510, - "iteration": 1556573792567, + "iteration": 1557258355609, "links": [ { "asDropdown": true, @@ -107,7 +107,7 @@ "hide": false, "orderByTime": "ASC", "policy": "default", - "query": "SELECT last(\"host_id\") FROM \"$local\".\"autogen\".\"counter-replay_stage-new_leader\" WHERE $timeFilter \n", + "query": "SELECT last(\"host_id\") FROM \"$testnet\".\"autogen\".\"replay_stage-new_leader\" WHERE $timeFilter \n", "rawQuery": true, "refId": "A", "resultFormat": "table", @@ -220,7 +220,7 @@ "hide": false, "orderByTime": "ASC", "policy": "default", - "query": "SELECT last(\"count\") FROM \"$local\".\"autogen\".\"counter-broadcast_service-num_peers\" WHERE $timeFilter GROUP BY time(1s) \n\n", + "query": "SELECT last(\"count\") FROM \"$testnet\".\"autogen\".\"broadcast_service-num_peers\" WHERE $timeFilter GROUP BY time(1s) \n\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -309,7 +309,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT count(\"count\") AS \"total\" FROM \"$local\".\"autogen\".\"vote-native\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)", + "query": "SELECT count(\"count\") AS \"total\" FROM \"$testnet\".\"autogen\".\"vote-native\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)", "rawQuery": true, "refId": "B", "resultFormat": "time_series", @@ -346,7 +346,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT count(\"count\") AS \" \" FROM \"$local\".\"autogen\".\"counter-validator-vote_sent\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)", + "query": "SELECT count(\"count\") AS \" \" FROM \"$testnet\".\"autogen\".\"validator-vote_sent\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -486,7 +486,7 @@ "hide": false, "orderByTime": "ASC", "policy": "default", - "query": "SELECT ROUND(MEAN(\"sum\")) FROM ( SELECT sum(\"count\") FROM \"$local\".\"autogen\".\"counter-banking_stage-process_transactions\" WHERE $timeFilter GROUP BY time(1s) )\n\n", + "query": "SELECT ROUND(MEAN(\"sum\")) FROM ( SELECT sum(\"count\") FROM \"$testnet\".\"autogen\".\"banking_stage-process_transactions\" WHERE $timeFilter GROUP BY time(1s) )\n\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -598,7 +598,7 @@ "hide": false, "orderByTime": "ASC", "policy": "default", - "query": "SELECT MAX(\"sum\") FROM ( SELECT sum(\"count\") FROM \"$local\".\"autogen\".\"counter-banking_stage-process_transactions\" WHERE $timeFilter GROUP BY time(1s) )\n\n", + "query": "SELECT MAX(\"sum\") FROM ( SELECT sum(\"count\") FROM \"$testnet\".\"autogen\".\"banking_stage-process_transactions\" WHERE $timeFilter GROUP BY time(1s) )\n\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -710,7 +710,7 @@ "hide": false, "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"transactions\" FROM \"$local\".\"autogen\".\"counter-banking_stage-process_transactions\" WHERE $timeFilter \n\n", + "query": "SELECT sum(\"count\") AS \"transactions\" FROM \"$testnet\".\"autogen\".\"banking_stage-process_transactions\" WHERE $timeFilter \n\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -822,7 +822,7 @@ "hide": false, "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") FROM \"$local\".\"autogen\".\"vote-native\" WHERE $timeFilter \n", + "query": "SELECT sum(\"count\") FROM \"$testnet\".\"autogen\".\"vote-native\" WHERE $timeFilter \n", "rawQuery": true, "refId": "A", "resultFormat": "table", @@ -933,7 +933,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT mean(\"duration_ms\") FROM \"$local\".\"autogen\".\"validator-confirmation\" WHERE $timeFilter \n\n\n", + "query": "SELECT mean(\"duration_ms\") FROM \"$testnet\".\"autogen\".\"validator-confirmation\" WHERE $timeFilter \n\n\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -1044,7 +1044,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT median(\"duration_ms\") FROM \"$local\".\"autogen\".\"validator-confirmation\" WHERE $timeFilter \n\n\n", + "query": "SELECT median(\"duration_ms\") FROM \"$testnet\".\"autogen\".\"validator-confirmation\" WHERE $timeFilter \n\n\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -1155,7 +1155,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT min(\"duration_ms\") FROM \"$local\".\"autogen\".\"validator-confirmation\" WHERE $timeFilter \n\n\n", + "query": "SELECT min(\"duration_ms\") FROM \"$testnet\".\"autogen\".\"validator-confirmation\" WHERE $timeFilter \n\n\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -1266,7 +1266,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT max(\"duration_ms\") FROM \"$local\".\"autogen\".\"validator-confirmation\" WHERE $timeFilter \n\n\n", + "query": "SELECT max(\"duration_ms\") FROM \"$testnet\".\"autogen\".\"validator-confirmation\" WHERE $timeFilter \n\n\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -1377,7 +1377,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT percentile(\"duration_ms\", 99) FROM \"$local\".\"autogen\".\"validator-confirmation\" WHERE $timeFilter \n\n\n", + "query": "SELECT percentile(\"duration_ms\", 99) FROM \"$testnet\".\"autogen\".\"validator-confirmation\" WHERE $timeFilter \n\n\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -1465,7 +1465,7 @@ "hide": false, "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") / 2 AS \"packets\" FROM \"$local\".\"autogen\".\"counter-packets-recv_count\" WHERE $timeFilter GROUP BY time(2s) FILL(0)\n", + "query": "SELECT sum(\"count\") / 2 AS \"packets\" FROM \"$testnet\".\"autogen\".\"packets-recv_count\" WHERE $timeFilter GROUP BY time(2s) FILL(0)\n", "rawQuery": true, "refId": "B", "resultFormat": "time_series", @@ -1503,7 +1503,7 @@ "hide": false, "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") / 2 AS \"errors\" FROM \"$local\".\"autogen\".\"counter-bank-process_transactions-error_count\" WHERE $timeFilter GROUP BY time(2s) FILL(0)", + "query": "SELECT sum(\"count\") / 2 AS \"errors\" FROM \"$testnet\".\"autogen\".\"bank-process_transactions-error_count\" WHERE $timeFilter GROUP BY time(2s) FILL(0)", "rawQuery": true, "refId": "C", "resultFormat": "time_series", @@ -1540,7 +1540,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") / 2 AS \"transactions\" FROM \"$local\".\"autogen\".\"counter-banking_stage-process_transactions\" WHERE $timeFilter GROUP BY time(2s) FILL(0)\n", + "query": "SELECT sum(\"count\") / 2 AS \"transactions\" FROM \"$testnet\".\"autogen\".\"banking_stage-process_transactions\" WHERE $timeFilter GROUP BY time(2s) FILL(0)\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -1654,10 +1654,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT mean(\"total_peers\") as \"total peers\" FROM \"$local\".\"autogen\".\"vote_stage-peer_count\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)", + "query": "SELECT mean(\"total_peers\") as \"total peers\" FROM \"$testnet\".\"autogen\".\"vote_stage-peer_count\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -1695,7 +1695,7 @@ "hide": false, "orderByTime": "ASC", "policy": "default", - "query": "SELECT mean(\"valid_peers\") as \"valid peers\" FROM \"$local\".\"autogen\".\"vote_stage-peer_count\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)", + "query": "SELECT mean(\"valid_peers\") as \"valid peers\" FROM \"$testnet\".\"autogen\".\"vote_stage-peer_count\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)", "rawQuery": true, "refId": "B", "resultFormat": "time_series", @@ -1733,7 +1733,7 @@ "hide": false, "orderByTime": "ASC", "policy": "default", - "query": "SELECT mean(\"count\") AS \"peers\" FROM \"$local\".\"autogen\".\"counter-broadcast_service-num_peers\" WHERE $timeFilter GROUP BY time(1s) FILL(0)", + "query": "SELECT mean(\"count\") AS \"peers\" FROM \"$testnet\".\"autogen\".\"broadcast_service-num_peers\" WHERE $timeFilter GROUP BY time(1s) FILL(0)", "rawQuery": true, "refId": "C", "resultFormat": "time_series", @@ -1857,10 +1857,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT mean(\"duration_ms\") FROM \"$local\".\"autogen\".\"validator-confirmation\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time(1s) FILL(0)\n", + "query": "SELECT mean(\"duration_ms\") FROM \"$testnet\".\"autogen\".\"validator-confirmation\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time(1s) FILL(0)\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -1973,10 +1973,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT \"request_amount\" FROM \"$local\".\"autogen\".\"drone\" WHERE $timeFilter AND \"op\"='airdrop' fill(null)\n\n\n\n", + "query": "SELECT \"request_amount\" FROM \"$testnet\".\"autogen\".\"drone-airdrop\" WHERE $timeFilter fill(null)\n\n\n\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -2090,10 +2090,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT mean(\"duration_ms\") / 1000 AS \".\" FROM \"$local\".\"autogen\".\"thinclient\" WHERE $timeFilter GROUP BY time($__interval), \"op\" \n\n\n\n\n\n", + "query": "SELECT mean(\"duration_ms\") / 1000 AS \".\" FROM \"$testnet\".\"autogen\".\"thinclient\" WHERE $timeFilter GROUP BY time($__interval), \"op\" \n\n\n\n\n\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -2254,7 +2254,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT last(\"version\") FROM \"$local\".\"autogen\".\"local-deploy\"", + "query": "SELECT last(\"version\") FROM \"$testnet\".\"autogen\".\"local-deploy\"", "rawQuery": true, "refId": "A", "resultFormat": "table", @@ -2342,10 +2342,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT sum(*) FROM \"$local\".\"autogen\".\"local-deploy\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n\n\n\n\n\n\n\n\n", + "query": "SELECT sum(*) FROM \"$testnet\".\"autogen\".\"local-deploy\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n\n\n\n\n\n\n\n\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -2383,7 +2383,7 @@ "hide": false, "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(*) FROM \"$local\".\"autogen\".\"local-manager\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)", + "query": "SELECT sum(*) FROM \"$testnet\".\"autogen\".\"local-manager\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)", "rawQuery": true, "refId": "B", "resultFormat": "time_series", @@ -2523,7 +2523,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"one\") FROM \"$local\".\"autogen\".\"panic\" WHERE $timeFilter \n", + "query": "SELECT sum(\"one\") FROM \"$testnet\".\"autogen\".\"panic\" WHERE $timeFilter \n", "rawQuery": true, "refId": "A", "resultFormat": "table", @@ -2610,10 +2610,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT sum(\"one\") as \".\" FROM \"$local\".\"autogen\".\"panic\" WHERE $timeFilter GROUP BY time($__interval), \"program\" fill(null)\n\n\n\n", + "query": "SELECT sum(\"one\") as \".\" FROM \"$testnet\".\"autogen\".\"panic\" WHERE $timeFilter GROUP BY time($__interval), \"program\" fill(null)\n\n\n\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -2752,7 +2752,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"killed\") FROM \"$local\".\"autogen\".\"oom-killer\" WHERE $timeFilter", + "query": "SELECT sum(\"killed\") FROM \"$testnet\".\"autogen\".\"oom-killer\" WHERE $timeFilter", "rawQuery": true, "refId": "A", "resultFormat": "table", @@ -2846,7 +2846,7 @@ "hide": false, "orderByTime": "ASC", "policy": "default", - "query": "SELECT time, host_id,program,thread, message FROM \"$local\".\"autogen\".\"panic\" WHERE $timeFilter ORDER BY time DESC ", + "query": "SELECT time, host_id,program,thread, message FROM \"$testnet\".\"autogen\".\"panic\" WHERE $timeFilter ORDER BY time DESC ", "rawQuery": true, "refId": "A", "resultFormat": "table", @@ -2924,10 +2924,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT sum(\"killed\") as \".\" FROM \"$local\".\"autogen\".\"oom-killer\" WHERE $timeFilter GROUP BY time($__interval), \"victim\", \"hostname\" fill(null)\n\n\n\n", + "query": "SELECT sum(\"killed\") as \".\" FROM \"$testnet\".\"autogen\".\"oom-killer\" WHERE $timeFilter GROUP BY time($__interval), \"victim\", \"hostname\" fill(null)\n\n\n\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -3049,7 +3049,7 @@ "hide": false, "orderByTime": "ASC", "policy": "default", - "query": "SELECT host_id,error FROM \"$local\".\"autogen\".\"validator_process_entry_error\" WHERE $timeFilter ORDER BY time DESC ", + "query": "SELECT host_id,error FROM \"$testnet\".\"autogen\".\"validator_process_entry_error\" WHERE $timeFilter ORDER BY time DESC ", "rawQuery": true, "refId": "A", "resultFormat": "table", @@ -3134,7 +3134,7 @@ "hide": false, "orderByTime": "ASC", "policy": "default", - "query": "SELECT host_id,error FROM \"$local\".\"autogen\".\"blocktree_error\" WHERE $timeFilter ORDER BY time DESC ", + "query": "SELECT host_id,error FROM \"$testnet\".\"autogen\".\"blocktree_error\" WHERE $timeFilter ORDER BY time DESC ", "rawQuery": true, "refId": "A", "resultFormat": "table", @@ -3212,7 +3212,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"total_errors\" FROM \"$local\".\"autogen\".\"counter-bank-process_transactions-error_count\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"total_errors\" FROM \"$testnet\".\"autogen\".\"bank-process_transactions-error_count\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n", "rawQuery": true, "refId": "B", "resultFormat": "time_series", @@ -3249,7 +3249,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"blockhash_too_old\" FROM \"$local\".\"autogen\".\"counter-bank-process_transactions-error-reserve_blockhash\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"blockhash_too_old\" FROM \"$testnet\".\"autogen\".\"bank-process_transactions-error-reserve_blockhash\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -3286,7 +3286,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"account_loaded_twice\" FROM \"$local\".\"autogen\".\"counter-bank-process_transactions-account_loaded_twice\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"account_loaded_twice\" FROM \"$testnet\".\"autogen\".\"bank-process_transactions-account_loaded_twice\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n", "rawQuery": true, "refId": "C", "resultFormat": "time_series", @@ -3323,7 +3323,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"blockhash_not_found\" FROM \"$local\".\"autogen\".\"counter-bank-process_transactions-error-blockhash_not_found\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"blockhash_not_found\" FROM \"$testnet\".\"autogen\".\"bank-process_transactions-error-blockhash_not_found\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n", "rawQuery": true, "refId": "D", "resultFormat": "time_series", @@ -3360,7 +3360,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"duplicate_signature\" FROM \"$local\".\"autogen\".\"counter-bank-process_transactions-error-duplicate_signature\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"duplicate_signature\" FROM \"$testnet\".\"autogen\".\"bank-process_transactions-error-duplicate_signature\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n", "rawQuery": true, "refId": "E", "resultFormat": "time_series", @@ -3397,7 +3397,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"insufficient_funds\" FROM \"$local\".\"autogen\".\"counter-bank-process_transactions-error-insufficient_funds\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"insufficient_funds\" FROM \"$testnet\".\"autogen\".\"bank-process_transactions-error-insufficient_funds\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n", "rawQuery": true, "refId": "F", "resultFormat": "time_series", @@ -3434,7 +3434,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"account_in_use\" FROM \"$local\".\"autogen\".\"counter-bank-process_transactions-account_in_use\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"account_in_use\" FROM \"$testnet\".\"autogen\".\"bank-process_transactions-account_in_use\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n", "rawQuery": true, "refId": "G", "resultFormat": "time_series", @@ -3471,7 +3471,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"account_not_found\" FROM \"$local\".\"autogen\".\"counter-bank-process_transactions-account_not_found\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n\n", + "query": "SELECT sum(\"count\") AS \"account_not_found\" FROM \"$testnet\".\"autogen\".\"bank-process_transactions-account_not_found\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n\n", "rawQuery": true, "refId": "H", "resultFormat": "time_series", @@ -3596,10 +3596,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT balance FROM \"$local\".\"autogen\".\"bench-tps\" WHERE $timeFilter AND \"op\" = 'lamport_balance' fill(null)\n\n\n\n", + "query": "SELECT balance FROM \"$testnet\".\"autogen\".\"bench-tps-lamport_balance\" WHERE $timeFilter fill(null)\n\n\n\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -3712,10 +3712,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT \"duration\" / 1000 as \"Generation Time\" FROM \"$local\".\"autogen\".\"bench-tps\" WHERE $timeFilter AND \"op\" = 'generate_txs' fill(null)\n\n\n\n\n", + "query": "SELECT \"duration\" / 1000 as \"Generation Time\" FROM \"$testnet\".\"autogen\".\"bench-tps-generate_txs\" WHERE $timeFilter fill(null)\n\n\n\n\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -3752,7 +3752,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT \"duration\" / 1000 as \"Transmit Time\" FROM \"$local\".\"autogen\".\"bench-tps\" WHERE $timeFilter AND \"op\" = 'do_tx_transfers' fill(null)", + "query": "SELECT \"duration\" / 1000 as \"Transmit Time\" FROM \"$testnet\".\"autogen\".\"bench-tps-do_tx_transfers\" WHERE $timeFilter fill(null)", "rawQuery": true, "refId": "B", "resultFormat": "time_series", @@ -3789,7 +3789,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT \"duration\" / 1000 as \"Barrier Transaction Confirmation Time\" FROM \"$local\".\"autogen\".\"bench-tps\" WHERE $timeFilter AND \"op\" = 'send_barrier_transaction' fill(null)", + "query": "SELECT \"duration\" / 1000 as \"Barrier Transaction Confirmation Time\" FROM \"$testnet\".\"autogen\".\"bench-tps-send_barrier_transaction\" WHERE $timeFilter fill(null)", "rawQuery": true, "refId": "C", "resultFormat": "time_series", @@ -3910,14 +3910,14 @@ }, { "params": [ - "null" + "linear" ], "type": "fill" } ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") / 3 AS \"trades\" FROM \"$local\".\"autogen\".\"counter-exchange_processor-trades\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time(3s)", + "query": "SELECT sum(\"count\") / 3 FROM \"$testnet\".\"autogen\".\"exchange_processor-trades\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time(3s)", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -3954,7 +3954,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") / 3 AS \"swaps\" FROM \"$local\".\"autogen\".\"counter-exchange_processor-swap\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time(3s)", + "query": "SELECT sum(\"count\") / 3 FROM \"$testnet\".\"autogen\".\"exchange_processor-swaps\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time(3s)", "rawQuery": true, "refId": "B", "resultFormat": "time_series", @@ -4068,7 +4068,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") / 3 AS \"total\" FROM \"$local\".\"autogen\".\"bench-exchange\" WHERE \"op\"='do_tx_transfers' AND host_id =~ /$hostid/ AND $timeFilter GROUP BY time(3s)", + "query": "SELECT sum(\"count\") / 3 AS \"trades\" FROM \"$testnet\".\"autogen\".\"bench-exchange-trades\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time(3s)", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -4105,7 +4105,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") / 3 AS \"trades\" FROM \"$local\".\"autogen\".\"bench-exchange\" WHERE \"op\"='trades' AND host_id =~ /$hostid/ AND $timeFilter GROUP BY time(3s)", + "query": "SELECT sum(\"count\") / 3 AS \"swaps\" FROM \"$testnet\".\"autogen\".\"bench-exchange-swaps\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time(3s)", "rawQuery": true, "refId": "C", "resultFormat": "time_series", @@ -4142,9 +4142,9 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") / 3 AS \"swaps\" FROM \"$local\".\"autogen\".\"bench-exchange\" WHERE \"op\"='swaps' AND host_id =~ /$hostid/ AND $timeFilter GROUP BY time(3s)", + "query": "SELECT sum(\"count\") / 3 AS \"transfers\" FROM \"$testnet\".\"autogen\".\"bench-exchange-do_tx_transfers\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time(3s)", "rawQuery": true, - "refId": "D", + "refId": "B", "resultFormat": "time_series", "select": [ [ @@ -4268,10 +4268,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT sum(\"count\") AS \"window receive\" FROM \"$local\".\"autogen\".\"counter-streamer-recv_window-recv\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"window receive\" FROM \"$testnet\".\"autogen\".\"streamer-recv_window-recv\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -4308,7 +4308,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"window receive\" FROM \"$local\".\"autogen\".\"counter-streamer-recv_window-consume\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)", + "query": "SELECT sum(\"count\") AS \"window receive\" FROM \"$testnet\".\"autogen\".\"streamer-recv_window-consume\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)", "rawQuery": true, "refId": "B", "resultFormat": "time_series", @@ -4421,10 +4421,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT sum(\"count\") AS \"retransmit\" FROM \"$local\".\"autogen\".\"counter-streamer-recv_window-retransmit\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"retransmit\" FROM \"$testnet\".\"autogen\".\"streamer-recv_window-retransmit\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -4461,7 +4461,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"window receive\" FROM \"$local\".\"autogen\".\"counter-streamer-recv_window-recv\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"window receive\" FROM \"$testnet\".\"autogen\".\"streamer-recv_window-recv\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "B", "resultFormat": "time_series", @@ -4498,7 +4498,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"broadcast sent\" FROM \"$local\".\"autogen\".\"counter-streamer-broadcast-sent\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"broadcast sent\" FROM \"$testnet\".\"autogen\".\"streamer-broadcast-sent\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "C", "resultFormat": "time_series", @@ -4617,7 +4617,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT last(\"repair-ix\") AS \"repair-ix\" FROM \"$local\".\"autogen\".\"cluster_info-repair\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", + "query": "SELECT last(\"repair-ix\") AS \"repair-ix\" FROM \"$testnet\".\"autogen\".\"cluster_info-repair\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", "rawQuery": true, "refId": "C", "resultFormat": "time_series", @@ -4654,7 +4654,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT last(\"repair-slot\") AS \"repair-slot\" FROM \"$local\".\"autogen\".\"cluster_info-repair\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", + "query": "SELECT last(\"repair-slot\") AS \"repair-slot\" FROM \"$testnet\".\"autogen\".\"cluster_info-repair\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -4773,7 +4773,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT last(\"repair-orphan\") AS \"slot\" FROM \"$local\".\"autogen\".\"cluster_info-repair_orphan\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", + "query": "SELECT last(\"repair-orphan\") AS \"slot\" FROM \"$testnet\".\"autogen\".\"cluster_info-repair_orphan\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", "rawQuery": true, "refId": "C", "resultFormat": "time_series", @@ -4887,10 +4887,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT sum(\"count\") AS \"sigverify-recv\" FROM \"$local\".\"autogen\".\"counter-sigverify_stage-packets_received\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"sigverify-recv\" FROM \"$testnet\".\"autogen\".\"sigverify_stage-packets_received\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -4927,7 +4927,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"banking\" FROM \"$local\".\"autogen\".\"counter-banking_stage-entries_received\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"banking\" FROM \"$testnet\".\"autogen\".\"banking_stage-entries_received\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "B", "resultFormat": "time_series", @@ -4964,7 +4964,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"record\" FROM \"$local\".\"autogen\".\"counter-record_stage-signals_received\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"record\" FROM \"$testnet\".\"autogen\".\"record_stage-signals_received\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "C", "resultFormat": "time_series", @@ -5002,7 +5002,7 @@ "hide": false, "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"lwrite\" FROM \"$local\".\"autogen\".\"counter-ledger_writer_stage-entries_received\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"lwrite\" FROM \"$testnet\".\"autogen\".\"ledger_writer_stage-entries_received\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "D", "resultFormat": "time_series", @@ -5039,7 +5039,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"fetchstage\" FROM \"$local\".\"autogen\".\"counter-packets-recv_count\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"fetchstage\" FROM \"$testnet\".\"autogen\".\"packets-recv_count\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "G", "resultFormat": "time_series", @@ -5076,7 +5076,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"broadcast\" FROM \"$local\".\"autogen\".\"counter-broadcast_service-entries_received\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"broadcast\" FROM \"$testnet\".\"autogen\".\"broadcast_service-entries_received\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "E", "resultFormat": "time_series", @@ -5113,7 +5113,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"banking\" FROM \"$local\".\"autogen\".\"counter-banking_stage-process_packets\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"banking\" FROM \"$testnet\".\"autogen\".\"banking_stage-process_packets\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "F", "resultFormat": "time_series", @@ -5150,7 +5150,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"sigverify-send\" FROM \"$local\".\"autogen\".\"counter-sigverify_stage-verified_packets_send\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"sigverify-send\" FROM \"$testnet\".\"autogen\".\"sigverify_stage-verified_packets_send\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "H", "resultFormat": "time_series", @@ -5264,10 +5264,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT sum(\"count\") AS \"retransmit\" FROM \"$local\".\"autogen\".\"retransmit-stage\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)", + "query": "SELECT sum(\"count\") AS \"retransmit\" FROM \"$testnet\".\"autogen\".\"retransmit-stage\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -5302,10 +5302,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT sum(\"count\") AS \"replicate\" FROM \"$local\".\"autogen\".\"replicate-stage\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)", + "query": "SELECT sum(\"count\") AS \"replicate\" FROM \"$testnet\".\"autogen\".\"replicate-stage\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)", "rawQuery": true, "refId": "B", "resultFormat": "time_series", @@ -5340,10 +5340,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT sum(\"count\") AS \"retransmit_q\" FROM \"$local\".\"autogen\".\"retransmit-queue\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)", + "query": "SELECT sum(\"count\") AS \"retransmit_q\" FROM \"$testnet\".\"autogen\".\"retransmit-queue\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)", "rawQuery": true, "refId": "C", "resultFormat": "time_series", @@ -5378,10 +5378,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT sum(\"count\") AS \"recv_window\" FROM \"$local\".\"autogen\".\"recv-window\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)", + "query": "SELECT sum(\"count\") AS \"recv_window\" FROM \"$testnet\".\"autogen\".\"recv-window\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)", "rawQuery": true, "refId": "D", "resultFormat": "time_series", @@ -5495,10 +5495,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT sum(\"count\") AS \"sigverify\" FROM \"$local\".\"autogen\".\"counter-sigverify_stage-time_ms\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"sigverify\" FROM \"$testnet\".\"autogen\".\"sigverify_stage-time_ms\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -5535,7 +5535,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"banking\" FROM \"$local\".\"autogen\".\"counter-banking_stage-time_ms\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"banking\" FROM \"$testnet\".\"autogen\".\"banking_stage-time_ms\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "B", "resultFormat": "time_series", @@ -5572,7 +5572,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"request\" FROM \"$local\".\"autogen\".\"counter-request_stage-time_ms\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"request\" FROM \"$testnet\".\"autogen\".\"request_stage-time_ms\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "C", "resultFormat": "time_series", @@ -5609,7 +5609,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"write\" FROM \"$local\".\"autogen\".\"counter-ledger_writer_stage-time_ms\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"write\" FROM \"$testnet\".\"autogen\".\"ledger_writer_stage-time_ms\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "D", "resultFormat": "time_series", @@ -5646,7 +5646,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"broadcast\" FROM \"$local\".\"autogen\".\"counter-broadcast_service-time_ms\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"broadcast\" FROM \"$testnet\".\"autogen\".\"broadcast_service-time_ms\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "E", "resultFormat": "time_series", @@ -5683,7 +5683,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"banking_stall\" FROM \"$local\".\"autogen\".\"counter-banking_stage-stall_time_ms\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)", + "query": "SELECT sum(\"count\") AS \"banking_stall\" FROM \"$testnet\".\"autogen\".\"banking_stage-stall_time_ms\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)", "rawQuery": true, "refId": "F", "resultFormat": "time_series", @@ -5720,7 +5720,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"banking_buffered\" FROM \"$local\".\"autogen\".\"counter-banking_stage-buffered_packet_time_ms\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)", + "query": "SELECT sum(\"count\") AS \"banking_buffered\" FROM \"$testnet\".\"autogen\".\"banking_stage-buffered_packet_time_ms\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)", "rawQuery": true, "refId": "G", "resultFormat": "time_series", @@ -5784,9 +5784,9 @@ { "aliasColors": { "cluster-info.repair": "#ba43a9", - "counter-locktower-observed.squash_account": "#0a437c", - "counter-locktower-observed.squash_cache": "#ea6460", - "counter-replay_stage-new_leader.last": "#00ffbb", + "locktower-observed.squash_account": "#0a437c", + "locktower-observed.squash_cache": "#ea6460", + "replay_stage-new_leader.last": "#00ffbb", "window-service.receive": "#b7dbab", "window-stage.consumed": "#5195ce" }, @@ -5841,10 +5841,10 @@ } ], "hide": false, - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT mean(\"count\") FROM \"$local\".\"autogen\".\"counter-bank-forks_set_root_ms\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", + "query": "SELECT mean(\"count\") FROM \"$testnet\".\"autogen\".\"bank-forks_set_root_ms\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -5880,10 +5880,10 @@ } ], "hide": false, - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT mean(\"squash_accounts_ms\") AS \"squash_account\" FROM \"$local\".\"autogen\".\"counter-locktower-observed\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", + "query": "SELECT mean(\"squash_accounts_ms\") AS \"squash_account\" FROM \"$testnet\".\"autogen\".\"locktower-observed\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", "rawQuery": true, "refId": "B", "resultFormat": "time_series", @@ -5919,10 +5919,10 @@ } ], "hide": false, - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT mean(\"squash_cache_ms\") AS \"squash_cache\" FROM \"$local\".\"autogen\".\"counter-locktower-observed\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", + "query": "SELECT mean(\"squash_cache_ms\") AS \"squash_cache\" FROM \"$testnet\".\"autogen\".\"locktower-observed\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", "rawQuery": true, "refId": "C", "resultFormat": "time_series", @@ -6036,10 +6036,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT last(\"consumed\") AS \"validator\" FROM \"$local\".\"autogen\".\"window-stage\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)", + "query": "SELECT last(\"consumed\") AS \"validator\" FROM \"$testnet\".\"autogen\".\"window-stage\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -6074,10 +6074,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT last(\"transmit-index\") AS \"leader\" FROM \"$local\".\"autogen\".\"broadcast-service\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)", + "query": "SELECT last(\"transmit-index\") AS \"leader\" FROM \"$testnet\".\"autogen\".\"broadcast-service\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)", "rawQuery": true, "refId": "B", "resultFormat": "time_series", @@ -6196,7 +6196,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT last(\"repair-highest-slot\") AS \"slot\" FROM \"$local\".\"autogen\".\"cluster_info-repair_highest\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", + "query": "SELECT last(\"repair-highest-slot\") AS \"slot\" FROM \"$testnet\".\"autogen\".\"cluster_info-repair_highest\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", "rawQuery": true, "refId": "C", "resultFormat": "time_series", @@ -6233,7 +6233,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT last(\"repair-highest-ix\") AS \"ix\" FROM \"$local\".\"autogen\".\"cluster_info-repair_highest\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", + "query": "SELECT last(\"repair-highest-ix\") AS \"ix\" FROM \"$testnet\".\"autogen\".\"cluster_info-repair_highest\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -6297,16 +6297,16 @@ { "aliasColors": { "cluster-info.repair": "#ba43a9", - "counter-banking_stage-buffered_packets.sum": "#3f6833", - "counter-banking_stage-consumed_buffered_packets.last": "#65c5db", - "counter-banking_stage-consumed_buffered_packets.sum": "#614d93", - "counter-banking_stage-forwarded_packets.last": "#f9ba8f", - "counter-banking_stage-forwarded_packets.sum": "#b7dbab", - "counter-banking_stage-rebuffered_packets.last": "#e5a8e2", - "counter-fetch_stage-discard_forwards.sum": "#00ffbb", - "counter-fetch_stage-honor_forwards.sum": "#bf1b00", - "counter-locktower-vote.last": "#00ffbb", - "counter-replay_stage-new_leader.last": "#00ffbb", + "banking_stage-buffered_packets.sum": "#3f6833", + "banking_stage-consumed_buffered_packets.last": "#65c5db", + "banking_stage-consumed_buffered_packets.sum": "#614d93", + "banking_stage-forwarded_packets.last": "#f9ba8f", + "banking_stage-forwarded_packets.sum": "#b7dbab", + "banking_stage-rebuffered_packets.last": "#e5a8e2", + "fetch_stage-discard_forwards.sum": "#00ffbb", + "fetch_stage-honor_forwards.sum": "#bf1b00", + "locktower-vote.last": "#00ffbb", + "replay_stage-new_leader.last": "#00ffbb", "window-service.receive": "#b7dbab", "window-stage.consumed": "#5195ce" }, @@ -6361,10 +6361,10 @@ } ], "hide": false, - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT sum(\"count\") FROM \"$local\".\"autogen\".\"counter-banking_stage-buffered_packets\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", + "query": "SELECT sum(\"count\") FROM \"$testnet\".\"autogen\".\"banking_stage-buffered_packets\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -6401,7 +6401,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") FROM \"$local\".\"autogen\".\"counter-banking_stage-forwarded_packets\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", + "query": "SELECT sum(\"count\") FROM \"$testnet\".\"autogen\".\"banking_stage-forwarded_packets\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", "rawQuery": true, "refId": "B", "resultFormat": "time_series", @@ -6438,7 +6438,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") FROM \"$local\".\"autogen\".\"counter-banking_stage-consumed_buffered_packets\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", + "query": "SELECT sum(\"count\") FROM \"$testnet\".\"autogen\".\"banking_stage-consumed_buffered_packets\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", "rawQuery": true, "refId": "C", "resultFormat": "time_series", @@ -6475,7 +6475,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") FROM \"$local\".\"autogen\".\"counter-banking_stage-rebuffered_packets\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", + "query": "SELECT sum(\"count\") FROM \"$testnet\".\"autogen\".\"banking_stage-rebuffered_packets\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", "rawQuery": true, "refId": "D", "resultFormat": "time_series", @@ -6512,7 +6512,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") FROM \"$local\".\"autogen\".\"counter-fetch_stage-honor_forwards\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", + "query": "SELECT sum(\"count\") FROM \"$testnet\".\"autogen\".\"fetch_stage-honor_forwards\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", "rawQuery": true, "refId": "E", "resultFormat": "time_series", @@ -6549,7 +6549,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") FROM \"$local\".\"autogen\".\"counter-fetch_stage-discard_forwards\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", + "query": "SELECT sum(\"count\") FROM \"$testnet\".\"autogen\".\"fetch_stage-discard_forwards\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", "rawQuery": true, "refId": "F", "resultFormat": "time_series", @@ -6626,7 +6626,7 @@ { "aliasColors": { "cluster-info.repair": "#ba43a9", - "counter-replay_stage-new_leader.last": "#00ffbb", + "replay_stage-new_leader.last": "#00ffbb", "window-service.receive": "#b7dbab", "window-stage.consumed": "#5195ce" }, @@ -6681,10 +6681,10 @@ } ], "hide": false, - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT last(\"latest\") - last(\"root\") FROM \"$local\".\"autogen\".\"counter-locktower-vote\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", + "query": "SELECT last(\"latest\") - last(\"root\") FROM \"$testnet\".\"autogen\".\"locktower-vote\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -6721,7 +6721,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT last(\"slot\") - last(\"root\") FROM \"$local\".\"autogen\".\"counter-locktower-observed\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", + "query": "SELECT last(\"slot\") - last(\"root\") FROM \"$testnet\".\"autogen\".\"locktower-observed\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", "rawQuery": true, "refId": "B", "resultFormat": "time_series", @@ -6785,8 +6785,8 @@ { "aliasColors": { "cluster-info.repair": "#ba43a9", - "counter-locktower-vote.last": "#00ffbb", - "counter-replay_stage-new_leader.last": "#00ffbb", + "locktower-vote.last": "#00ffbb", + "replay_stage-new_leader.last": "#00ffbb", "window-service.receive": "#b7dbab", "window-stage.consumed": "#5195ce" }, @@ -6841,10 +6841,10 @@ } ], "hide": false, - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT last(\"root\") FROM \"$local\".\"autogen\".\"counter-locktower-vote\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", + "query": "SELECT last(\"root\") FROM \"$testnet\".\"autogen\".\"locktower-vote\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -6881,7 +6881,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT last(\"root\") FROM \"$local\".\"autogen\".\"counter-locktower-observed\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", + "query": "SELECT last(\"root\") FROM \"$testnet\".\"autogen\".\"locktower-observed\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", "rawQuery": true, "refId": "B", "resultFormat": "time_series", @@ -6945,8 +6945,8 @@ { "aliasColors": { "cluster-info.repair": "#ba43a9", - "counter-bank-process_transactions-txs.transactions": "#e5a8e2", - "counter-replay_stage-new_leader.last": "#00ffbb", + "bank-process_transactions-txs.transactions": "#e5a8e2", + "replay_stage-new_leader.last": "#00ffbb", "window-service.receive": "#b7dbab", "window-stage.consumed": "#5195ce" }, @@ -7000,10 +7000,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT last(\"count\") FROM \"$local\".\"autogen\".\"counter-replay_stage-new_leader\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", + "query": "SELECT last(\"count\") FROM \"$testnet\".\"autogen\".\"replay_stage-new_leader\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -7132,10 +7132,10 @@ } ], "hide": false, - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT mean(\"packets_received\") as \"packets_received\" FROM \"$local\".\"autogen\".\"net-stats\" WHERE hostname =~ /$hostid/ AND $timeFilter GROUP BY time(5s) fill(null)\n\n\n\n", + "query": "SELECT mean(\"packets_received\") as \"packets_received\" FROM \"$testnet\".\"autogen\".\"net-stats\" WHERE hostname =~ /$hostid/ AND $timeFilter GROUP BY time(5s) fill(null)\n\n\n\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -7170,10 +7170,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT mean(\"receive_errors\") as \"receive_errors\" FROM \"$local\".\"autogen\".\"net-stats\" WHERE hostname =~ /$hostid/ AND $timeFilter GROUP BY time(5s) fill(null)\n\n\n\n", + "query": "SELECT mean(\"receive_errors\") as \"receive_errors\" FROM \"$testnet\".\"autogen\".\"net-stats\" WHERE hostname =~ /$hostid/ AND $timeFilter GROUP BY time(5s) fill(null)\n\n\n\n", "rawQuery": true, "refId": "B", "resultFormat": "time_series", @@ -7208,10 +7208,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT mean(\"rcvbuf_errors\") as \"rcvbuf_errors\" FROM \"$local\".\"autogen\".\"net-stats\" WHERE hostname =~ /$hostid/ AND $timeFilter GROUP BY time(5s) fill(null)\n\n\n\n", + "query": "SELECT mean(\"rcvbuf_errors\") as \"rcvbuf_errors\" FROM \"$testnet\".\"autogen\".\"net-stats\" WHERE hostname =~ /$hostid/ AND $timeFilter GROUP BY time(5s) fill(null)\n\n\n\n", "rawQuery": true, "refId": "C", "resultFormat": "time_series", @@ -7246,10 +7246,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT mean(\"packets_sent\") as \"packets_sent\" FROM \"$local\".\"autogen\".\"net-stats\" WHERE hostname =~ /$hostid/ AND $timeFilter GROUP BY time(5s) fill(null)\n\n\n\n", + "query": "SELECT mean(\"packets_sent\") as \"packets_sent\" FROM \"$testnet\".\"autogen\".\"net-stats\" WHERE hostname =~ /$hostid/ AND $timeFilter GROUP BY time(5s) fill(null)\n\n\n\n", "rawQuery": true, "refId": "D", "resultFormat": "time_series", @@ -7366,10 +7366,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT mean(\"in_octets\") as \"recv\" FROM \"$local\".\"autogen\".\"net-stats\" WHERE $timeFilter GROUP BY time(1s) fill(null)\n\n\n\n", + "query": "SELECT mean(\"in_octets\") as \"recv\" FROM \"$testnet\".\"autogen\".\"net-stats\" WHERE $timeFilter GROUP BY time(1s) fill(null)\n\n\n\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -7404,10 +7404,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT mean(\"out_octets\") as \"sent\" FROM \"$local\".\"autogen\".\"net-stats\" WHERE $timeFilter GROUP BY time(1s) fill(null)\n\n\n\n", + "query": "SELECT mean(\"out_octets\") as \"sent\" FROM \"$testnet\".\"autogen\".\"net-stats\" WHERE $timeFilter GROUP BY time(1s) fill(null)\n\n\n\n", "rawQuery": true, "refId": "B", "resultFormat": "time_series", @@ -7533,10 +7533,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT max(\"total_time_ms\") AS \"max\" FROM \"$local\".\"autogen\".\"sigverify_stage-total_verify_time\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n\n", + "query": "SELECT max(\"total_time_ms\") AS \"max\" FROM \"$testnet\".\"autogen\".\"sigverify_stage-total_verify_time\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -7621,19 +7621,19 @@ { "allValue": ".*", "current": { - "text": "local", - "value": "local" + "text": "testnet", + "value": "testnet" }, "datasource": "$datasource", "hide": 1, "includeAll": false, - "label": "local", + "label": "Testnet", "multi": false, - "name": "local", + "name": "testnet", "options": [], "query": "show databases", "refresh": 1, - "regex": "local.*", + "regex": "testnet.*", "sort": 1, "tagValuesQuery": "", "tags": [], @@ -7650,7 +7650,7 @@ "multi": false, "name": "hostid", "options": [], - "query": "SELECT DISTINCT(\"host_id\") FROM \"$local\".\"autogen\".\"counter-fullnode-new\" ", + "query": "SELECT DISTINCT(\"host_id\") FROM \"$testnet\".\"autogen\".\"fullnode-new\" ", "refresh": 2, "regex": "", "sort": 1, diff --git a/metrics/scripts/grafana-provisioning/datasources/datasource.yml b/metrics/scripts/grafana-provisioning/datasources/datasource.yml index ffb635226..b3999681a 100644 --- a/metrics/scripts/grafana-provisioning/datasources/datasource.yml +++ b/metrics/scripts/grafana-provisioning/datasources/datasource.yml @@ -6,7 +6,7 @@ datasources: type: influxdb isDefault: true access: proxy - database: local + database: testnet user: admin password: admin basicAuth: true diff --git a/metrics/scripts/start.sh b/metrics/scripts/start.sh index 891a1e641..bb22d826f 100755 --- a/metrics/scripts/start.sh +++ b/metrics/scripts/start.sh @@ -25,7 +25,7 @@ docker run \ --user "$(id -u):$(id -g)" \ --volume "$PWD"/influxdb.conf:/etc/influxdb/influxdb.conf:ro \ --volume "$PWD"/lib/influxdb:/var/lib/influxdb \ - --env INFLUXDB_DB=local \ + --env INFLUXDB_DB=testnet \ --env INFLUXDB_ADMIN_USER=admin \ --env INFLUXDB_ADMIN_PASSWORD=admin \ $INFLUXDB_IMAGE -config /etc/influxdb/influxdb.conf /init-influxdb.sh diff --git a/metrics/src/counter.rs b/metrics/src/counter.rs index ee89946b7..cbe6be800 100644 --- a/metrics/src/counter.rs +++ b/metrics/src/counter.rs @@ -22,7 +22,7 @@ pub struct Counter { #[macro_export] macro_rules! create_counter { ($name:expr, $lograte:expr, $metricsrate:expr) => { - Counter { + $crate::counter::Counter { name: $name, counts: std::sync::atomic::AtomicUsize::new(0), times: std::sync::atomic::AtomicUsize::new(0), @@ -51,7 +51,8 @@ macro_rules! inc_counter_info { #[macro_export] macro_rules! inc_new_counter { ($name:expr, $count:expr, $level:expr, $lograte:expr, $metricsrate:expr) => {{ - static mut INC_NEW_COUNTER: Counter = create_counter!($name, $lograte, $metricsrate); + static mut INC_NEW_COUNTER: $crate::counter::Counter = + create_counter!($name, $lograte, $metricsrate); static INIT_HOOK: std::sync::Once = std::sync::ONCE_INIT; unsafe { INIT_HOOK.call_once(|| { @@ -88,7 +89,7 @@ impl Counter { } pub fn init(&mut self) { self.point = Some( - influxdb::Point::new(&format!("counter-{}", self.name)) + influxdb::Point::new(&self.name) .add_field("count", influxdb::Value::Integer(0)) .to_owned(), ); @@ -98,7 +99,7 @@ impl Counter { let times = self.times.fetch_add(1, Ordering::Relaxed); let mut lograte = self.lograte.load(Ordering::Relaxed); if lograte == 0 { - lograte = Counter::default_log_rate(); + lograte = Self::default_log_rate(); self.lograte.store(lograte, Ordering::Relaxed); } let mut metricsrate = self.metricsrate.load(Ordering::Relaxed); @@ -188,9 +189,9 @@ mod tests { let _readlock = get_env_lock().read(); //make sure that macros are syntactically correct //the variable is internal to the macro scope so there is no way to introspect it - inc_new_counter_info!("counter-1", 1); - inc_new_counter_info!("counter-2", 1, 3); - inc_new_counter_info!("counter-3", 1, 2, 1); + inc_new_counter_info!("1", 1); + inc_new_counter_info!("2", 1, 3); + inc_new_counter_info!("3", 1, 2, 1); } #[test] fn test_lograte() { diff --git a/metrics/src/metrics.rs b/metrics/src/metrics.rs index a6d9c991e..d3f99ddaf 100644 --- a/metrics/src/metrics.rs +++ b/metrics/src/metrics.rs @@ -1,4 +1,4 @@ -//! The `metrics` module enables sending measurements to an InfluxDB instance +//! The `metrics` module enables sending measurements to an `InfluxDB` instance use influx_db_client as influxdb; use lazy_static::lazy_static; @@ -12,6 +12,51 @@ use std::thread; use std::time::{Duration, Instant}; use sys_info::hostname; +#[macro_export] +macro_rules! datapoint { + (@field $point:ident $name:expr, $string:expr, String) => { + $point.add_field( + $name, + $crate::influxdb::Value::String($string)); + }; + (@field $point:ident $name:expr, $value:expr, i64) => { + $point.add_field( + $name, + $crate::influxdb::Value::Integer($value as i64)); + }; + (@field $point:ident $name:expr, $value:expr, f64) => { + $point.add_field( + $name, + $crate::influxdb::Value::Float($value as f64)); + }; + (@field $point:ident $name:expr, $value:expr, bool) => { + $point.add_field( + $name, + $crate::influxdb::Value::Boolean($value as bool)); + }; + + (@fields $point:ident) => {}; + (@fields $point:ident ($name:expr, $value:expr, $type:ident) , $($rest:tt)*) => { + $crate::datapoint!(@field $point $name, $value, $type); + $crate::datapoint!(@fields $point $($rest)*); + }; + (@fields $point:ident ($name:expr, $value:expr, $type:ident)) => { + $crate::datapoint!(@field $point $name, $value, $type); + }; + + (@point $name:expr, $($fields:tt)+) => { + { + let mut point = $crate::influxdb::Point::new(&$name); + $crate::datapoint!(@fields point $($fields)+); + point + } + }; + + ($name:expr, $($fields:tt)+) => { + $crate::submit($crate::datapoint!(@point $name, $($fields)+)); + }; +} + lazy_static! { static ref HOST_INFO: String = { let v = env::var("SOLANA_METRICS_DISPLAY_HOSTNAME") @@ -48,7 +93,7 @@ struct InfluxDbMetricsWriter { impl InfluxDbMetricsWriter { fn new() -> Self { - InfluxDbMetricsWriter { + Self { client: Self::build_client().ok(), } } @@ -96,7 +141,7 @@ impl MetricsAgent { fn new(writer: Arc, write_frequency: Duration) -> Self { let (sender, receiver) = channel::(); thread::spawn(move || Self::run(&receiver, &writer, write_frequency)); - MetricsAgent { sender } + Self { sender } } fn run( @@ -379,4 +424,67 @@ mod test { agent.submit(point); } + #[test] + fn test_datapoint() { + macro_rules! matches { + ($e:expr, $p:pat) => { + match $e { + $p => true, + _ => false, + } + }; + } + + datapoint!("name", ("field name", "test".to_string(), String)); + datapoint!("name", ("field name", 12.34_f64, f64)); + datapoint!("name", ("field name", true, bool)); + datapoint!("name", ("field name", 1, i64)); + datapoint!("name", ("field name", 1, i64),); + datapoint!("name", ("field1 name", 2, i64), ("field2 name", 2, i64)); + datapoint!("name", ("field1 name", 2, i64), ("field2 name", 2, i64),); + datapoint!( + "name", + ("field1 name", 2, i64), + ("field2 name", 2, i64), + ("field3 name", 3, i64) + ); + datapoint!( + "name", + ("field1 name", 2, i64), + ("field2 name", 2, i64), + ("field3 name", 3, i64), + ); + + let point = datapoint!(@point "name", ("i64", 1, i64), ("String", "string".to_string(), String), ("f64", 12.34_f64, f64), ("bool", true, bool)); + assert_eq!(point.measurement, "name"); + assert!(matches!( + point.fields.get("i64").unwrap(), + influxdb::Value::Integer(1) + )); + assert!(match point.fields.get("String").unwrap() { + influxdb::Value::String(ref s) => { + if s == "string" { + true + } else { + false + } + } + _ => false, + }); + assert!(match point.fields.get("f64").unwrap() { + influxdb::Value::Float(f) => { + if *f == 12.34_f64 { + true + } else { + false + } + } + _ => false, + }); + assert!(matches!( + point.fields.get("bool").unwrap(), + influxdb::Value::Boolean(true) + )); + } + } diff --git a/metrics/testnet-monitor.json b/metrics/testnet-monitor.json index eaf479ab8..ade19b4fd 100644 --- a/metrics/testnet-monitor.json +++ b/metrics/testnet-monitor.json @@ -123,7 +123,7 @@ "hide": false, "orderByTime": "ASC", "policy": "default", - "query": "SELECT last(\"host_id\") FROM \"$testnet\".\"autogen\".\"counter-replay_stage-new_leader\" WHERE $timeFilter \n", + "query": "SELECT last(\"host_id\") FROM \"$testnet\".\"autogen\".\"replay_stage-new_leader\" WHERE $timeFilter \n", "rawQuery": true, "refId": "A", "resultFormat": "table", @@ -236,7 +236,7 @@ "hide": false, "orderByTime": "ASC", "policy": "default", - "query": "SELECT last(\"count\") FROM \"$testnet\".\"autogen\".\"counter-broadcast_service-num_peers\" WHERE $timeFilter GROUP BY time(1s) \n\n", + "query": "SELECT last(\"count\") FROM \"$testnet\".\"autogen\".\"broadcast_service-num_peers\" WHERE $timeFilter GROUP BY time(1s) \n\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -362,7 +362,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT count(\"count\") AS \" \" FROM \"$testnet\".\"autogen\".\"counter-validator-vote_sent\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)", + "query": "SELECT count(\"count\") AS \" \" FROM \"$testnet\".\"autogen\".\"validator-vote_sent\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -502,7 +502,7 @@ "hide": false, "orderByTime": "ASC", "policy": "default", - "query": "SELECT ROUND(MEAN(\"sum\")) FROM ( SELECT sum(\"count\") FROM \"$testnet\".\"autogen\".\"counter-banking_stage-process_transactions\" WHERE $timeFilter GROUP BY time(1s) )\n\n", + "query": "SELECT ROUND(MEAN(\"sum\")) FROM ( SELECT sum(\"count\") FROM \"$testnet\".\"autogen\".\"banking_stage-process_transactions\" WHERE $timeFilter GROUP BY time(1s) )\n\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -614,7 +614,7 @@ "hide": false, "orderByTime": "ASC", "policy": "default", - "query": "SELECT MAX(\"sum\") FROM ( SELECT sum(\"count\") FROM \"$testnet\".\"autogen\".\"counter-banking_stage-process_transactions\" WHERE $timeFilter GROUP BY time(1s) )\n\n", + "query": "SELECT MAX(\"sum\") FROM ( SELECT sum(\"count\") FROM \"$testnet\".\"autogen\".\"banking_stage-process_transactions\" WHERE $timeFilter GROUP BY time(1s) )\n\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -726,7 +726,7 @@ "hide": false, "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"transactions\" FROM \"$testnet\".\"autogen\".\"counter-banking_stage-process_transactions\" WHERE $timeFilter \n\n", + "query": "SELECT sum(\"count\") AS \"transactions\" FROM \"$testnet\".\"autogen\".\"banking_stage-process_transactions\" WHERE $timeFilter \n\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -1481,7 +1481,7 @@ "hide": false, "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") / 2 AS \"packets\" FROM \"$testnet\".\"autogen\".\"counter-packets-recv_count\" WHERE $timeFilter GROUP BY time(2s) FILL(0)\n", + "query": "SELECT sum(\"count\") / 2 AS \"packets\" FROM \"$testnet\".\"autogen\".\"packets-recv_count\" WHERE $timeFilter GROUP BY time(2s) FILL(0)\n", "rawQuery": true, "refId": "B", "resultFormat": "time_series", @@ -1519,7 +1519,7 @@ "hide": false, "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") / 2 AS \"errors\" FROM \"$testnet\".\"autogen\".\"counter-bank-process_transactions-error_count\" WHERE $timeFilter GROUP BY time(2s) FILL(0)", + "query": "SELECT sum(\"count\") / 2 AS \"errors\" FROM \"$testnet\".\"autogen\".\"bank-process_transactions-error_count\" WHERE $timeFilter GROUP BY time(2s) FILL(0)", "rawQuery": true, "refId": "C", "resultFormat": "time_series", @@ -1556,7 +1556,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") / 2 AS \"transactions\" FROM \"$testnet\".\"autogen\".\"counter-banking_stage-process_transactions\" WHERE $timeFilter GROUP BY time(2s) FILL(0)\n", + "query": "SELECT sum(\"count\") / 2 AS \"transactions\" FROM \"$testnet\".\"autogen\".\"banking_stage-process_transactions\" WHERE $timeFilter GROUP BY time(2s) FILL(0)\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -1670,7 +1670,7 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", "query": "SELECT mean(\"total_peers\") as \"total peers\" FROM \"$testnet\".\"autogen\".\"vote_stage-peer_count\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)", @@ -1749,7 +1749,7 @@ "hide": false, "orderByTime": "ASC", "policy": "default", - "query": "SELECT mean(\"count\") AS \"peers\" FROM \"$testnet\".\"autogen\".\"counter-broadcast_service-num_peers\" WHERE $timeFilter GROUP BY time(1s) FILL(0)", + "query": "SELECT mean(\"count\") AS \"peers\" FROM \"$testnet\".\"autogen\".\"broadcast_service-num_peers\" WHERE $timeFilter GROUP BY time(1s) FILL(0)", "rawQuery": true, "refId": "C", "resultFormat": "time_series", @@ -1873,7 +1873,7 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", "query": "SELECT mean(\"duration_ms\") FROM \"$testnet\".\"autogen\".\"validator-confirmation\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time(1s) FILL(0)\n", @@ -1989,10 +1989,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT \"request_amount\" FROM \"$testnet\".\"autogen\".\"drone\" WHERE $timeFilter AND \"op\"='airdrop' fill(null)\n\n\n\n", + "query": "SELECT \"request_amount\" FROM \"$testnet\".\"autogen\".\"drone-airdrop\" WHERE $timeFilter fill(null)\n\n\n\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -2106,7 +2106,7 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", "query": "SELECT mean(\"duration_ms\") / 1000 AS \".\" FROM \"$testnet\".\"autogen\".\"thinclient\" WHERE $timeFilter GROUP BY time($__interval), \"op\" \n\n\n\n\n\n", @@ -2358,7 +2358,7 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", "query": "SELECT sum(*) FROM \"$testnet\".\"autogen\".\"testnet-deploy\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n\n\n\n\n\n\n\n\n", @@ -2626,7 +2626,7 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", "query": "SELECT sum(\"one\") as \".\" FROM \"$testnet\".\"autogen\".\"panic\" WHERE $timeFilter GROUP BY time($__interval), \"program\" fill(null)\n\n\n\n", @@ -2940,7 +2940,7 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", "query": "SELECT sum(\"killed\") as \".\" FROM \"$testnet\".\"autogen\".\"oom-killer\" WHERE $timeFilter GROUP BY time($__interval), \"victim\", \"hostname\" fill(null)\n\n\n\n", @@ -3228,7 +3228,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"total_errors\" FROM \"$testnet\".\"autogen\".\"counter-bank-process_transactions-error_count\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"total_errors\" FROM \"$testnet\".\"autogen\".\"bank-process_transactions-error_count\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n", "rawQuery": true, "refId": "B", "resultFormat": "time_series", @@ -3265,7 +3265,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"blockhash_too_old\" FROM \"$testnet\".\"autogen\".\"counter-bank-process_transactions-error-reserve_blockhash\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"blockhash_too_old\" FROM \"$testnet\".\"autogen\".\"bank-process_transactions-error-reserve_blockhash\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -3302,7 +3302,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"account_loaded_twice\" FROM \"$testnet\".\"autogen\".\"counter-bank-process_transactions-account_loaded_twice\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"account_loaded_twice\" FROM \"$testnet\".\"autogen\".\"bank-process_transactions-account_loaded_twice\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n", "rawQuery": true, "refId": "C", "resultFormat": "time_series", @@ -3339,7 +3339,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"blockhash_not_found\" FROM \"$testnet\".\"autogen\".\"counter-bank-process_transactions-error-blockhash_not_found\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"blockhash_not_found\" FROM \"$testnet\".\"autogen\".\"bank-process_transactions-error-blockhash_not_found\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n", "rawQuery": true, "refId": "D", "resultFormat": "time_series", @@ -3376,7 +3376,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"duplicate_signature\" FROM \"$testnet\".\"autogen\".\"counter-bank-process_transactions-error-duplicate_signature\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"duplicate_signature\" FROM \"$testnet\".\"autogen\".\"bank-process_transactions-error-duplicate_signature\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n", "rawQuery": true, "refId": "E", "resultFormat": "time_series", @@ -3413,7 +3413,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"insufficient_funds\" FROM \"$testnet\".\"autogen\".\"counter-bank-process_transactions-error-insufficient_funds\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"insufficient_funds\" FROM \"$testnet\".\"autogen\".\"bank-process_transactions-error-insufficient_funds\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n", "rawQuery": true, "refId": "F", "resultFormat": "time_series", @@ -3450,7 +3450,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"account_in_use\" FROM \"$testnet\".\"autogen\".\"counter-bank-process_transactions-account_in_use\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"account_in_use\" FROM \"$testnet\".\"autogen\".\"bank-process_transactions-account_in_use\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n", "rawQuery": true, "refId": "G", "resultFormat": "time_series", @@ -3487,7 +3487,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"account_not_found\" FROM \"$testnet\".\"autogen\".\"counter-bank-process_transactions-account_not_found\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n\n", + "query": "SELECT sum(\"count\") AS \"account_not_found\" FROM \"$testnet\".\"autogen\".\"bank-process_transactions-account_not_found\" WHERE $timeFilter GROUP BY time(1s) FILL(0)\n\n", "rawQuery": true, "refId": "H", "resultFormat": "time_series", @@ -3612,10 +3612,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT balance FROM \"$testnet\".\"autogen\".\"bench-tps\" WHERE $timeFilter AND \"op\" = 'lamport_balance' fill(null)\n\n\n\n", + "query": "SELECT balance FROM \"$testnet\".\"autogen\".\"bench-tps-lamport_balance\" WHERE $timeFilter fill(null)\n\n\n\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -3728,10 +3728,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT \"duration\" / 1000 as \"Generation Time\" FROM \"$testnet\".\"autogen\".\"bench-tps\" WHERE $timeFilter AND \"op\" = 'generate_txs' fill(null)\n\n\n\n\n", + "query": "SELECT \"duration\" / 1000 as \"Generation Time\" FROM \"$testnet\".\"autogen\".\"bench-tps-generate_txs\" WHERE $timeFilter fill(null)\n\n\n\n\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -3768,7 +3768,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT \"duration\" / 1000 as \"Transmit Time\" FROM \"$testnet\".\"autogen\".\"bench-tps\" WHERE $timeFilter AND \"op\" = 'do_tx_transfers' fill(null)", + "query": "SELECT \"duration\" / 1000 as \"Transmit Time\" FROM \"$testnet\".\"autogen\".\"bench-tps-do_tx_transfers\" WHERE $timeFilter fill(null)", "rawQuery": true, "refId": "B", "resultFormat": "time_series", @@ -3805,7 +3805,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT \"duration\" / 1000 as \"Barrier Transaction Confirmation Time\" FROM \"$testnet\".\"autogen\".\"bench-tps\" WHERE $timeFilter AND \"op\" = 'send_barrier_transaction' fill(null)", + "query": "SELECT \"duration\" / 1000 as \"Barrier Transaction Confirmation Time\" FROM \"$testnet\".\"autogen\".\"bench-tps-send_barrier_transaction\" WHERE $timeFilter fill(null)", "rawQuery": true, "refId": "C", "resultFormat": "time_series", @@ -3926,14 +3926,14 @@ }, { "params": [ - "null" + "linear" ], "type": "fill" } ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") / 3 AS \"trades\" FROM \"$testnet\".\"autogen\".\"counter-exchange_processor-trades\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time(3s)", + "query": "SELECT sum(\"count\") / 3 FROM \"$testnet\".\"autogen\".\"exchange_processor-trades\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time(3s)", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -3970,7 +3970,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") / 3 AS \"swaps\" FROM \"$testnet\".\"autogen\".\"counter-exchange_processor-swap\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time(3s)", + "query": "SELECT sum(\"count\") / 3 FROM \"$testnet\".\"autogen\".\"exchange_processor-swaps\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time(3s)", "rawQuery": true, "refId": "B", "resultFormat": "time_series", @@ -4084,7 +4084,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") / 3 AS \"total\" FROM \"$testnet\".\"autogen\".\"bench-exchange\" WHERE \"op\"='do_tx_transfers' AND host_id =~ /$hostid/ AND $timeFilter GROUP BY time(3s)", + "query": "SELECT sum(\"count\") / 3 AS \"trades\" FROM \"$testnet\".\"autogen\".\"bench-exchange-trades\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time(3s)", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -4121,7 +4121,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") / 3 AS \"trades\" FROM \"$testnet\".\"autogen\".\"bench-exchange\" WHERE \"op\"='trades' AND host_id =~ /$hostid/ AND $timeFilter GROUP BY time(3s)", + "query": "SELECT sum(\"count\") / 3 AS \"swaps\" FROM \"$testnet\".\"autogen\".\"bench-exchange-swaps\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time(3s)", "rawQuery": true, "refId": "C", "resultFormat": "time_series", @@ -4158,9 +4158,9 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") / 3 AS \"swaps\" FROM \"$testnet\".\"autogen\".\"bench-exchange\" WHERE \"op\"='swaps' AND host_id =~ /$hostid/ AND $timeFilter GROUP BY time(3s)", + "query": "SELECT sum(\"count\") / 3 AS \"transfers\" FROM \"$testnet\".\"autogen\".\"bench-exchange-do_tx_transfers\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time(3s)", "rawQuery": true, - "refId": "D", + "refId": "B", "resultFormat": "time_series", "select": [ [ @@ -4284,10 +4284,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT sum(\"count\") AS \"window receive\" FROM \"$testnet\".\"autogen\".\"counter-streamer-recv_window-recv\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"window receive\" FROM \"$testnet\".\"autogen\".\"streamer-recv_window-recv\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -4324,7 +4324,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"window receive\" FROM \"$testnet\".\"autogen\".\"counter-streamer-recv_window-consume\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)", + "query": "SELECT sum(\"count\") AS \"window receive\" FROM \"$testnet\".\"autogen\".\"streamer-recv_window-consume\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)", "rawQuery": true, "refId": "B", "resultFormat": "time_series", @@ -4437,10 +4437,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT sum(\"count\") AS \"retransmit\" FROM \"$testnet\".\"autogen\".\"counter-streamer-recv_window-retransmit\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"retransmit\" FROM \"$testnet\".\"autogen\".\"streamer-recv_window-retransmit\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -4477,7 +4477,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"window receive\" FROM \"$testnet\".\"autogen\".\"counter-streamer-recv_window-recv\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"window receive\" FROM \"$testnet\".\"autogen\".\"streamer-recv_window-recv\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "B", "resultFormat": "time_series", @@ -4514,7 +4514,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"broadcast sent\" FROM \"$testnet\".\"autogen\".\"counter-streamer-broadcast-sent\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"broadcast sent\" FROM \"$testnet\".\"autogen\".\"streamer-broadcast-sent\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "C", "resultFormat": "time_series", @@ -4903,10 +4903,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT sum(\"count\") AS \"sigverify-recv\" FROM \"$testnet\".\"autogen\".\"counter-sigverify_stage-packets_received\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"sigverify-recv\" FROM \"$testnet\".\"autogen\".\"sigverify_stage-packets_received\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -4943,7 +4943,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"banking\" FROM \"$testnet\".\"autogen\".\"counter-banking_stage-entries_received\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"banking\" FROM \"$testnet\".\"autogen\".\"banking_stage-entries_received\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "B", "resultFormat": "time_series", @@ -4980,7 +4980,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"record\" FROM \"$testnet\".\"autogen\".\"counter-record_stage-signals_received\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"record\" FROM \"$testnet\".\"autogen\".\"record_stage-signals_received\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "C", "resultFormat": "time_series", @@ -5018,7 +5018,7 @@ "hide": false, "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"lwrite\" FROM \"$testnet\".\"autogen\".\"counter-ledger_writer_stage-entries_received\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"lwrite\" FROM \"$testnet\".\"autogen\".\"ledger_writer_stage-entries_received\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "D", "resultFormat": "time_series", @@ -5055,7 +5055,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"fetchstage\" FROM \"$testnet\".\"autogen\".\"counter-packets-recv_count\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"fetchstage\" FROM \"$testnet\".\"autogen\".\"packets-recv_count\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "G", "resultFormat": "time_series", @@ -5092,7 +5092,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"broadcast\" FROM \"$testnet\".\"autogen\".\"counter-broadcast_service-entries_received\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"broadcast\" FROM \"$testnet\".\"autogen\".\"broadcast_service-entries_received\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "E", "resultFormat": "time_series", @@ -5129,7 +5129,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"banking\" FROM \"$testnet\".\"autogen\".\"counter-banking_stage-process_packets\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"banking\" FROM \"$testnet\".\"autogen\".\"banking_stage-process_packets\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "F", "resultFormat": "time_series", @@ -5166,7 +5166,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"sigverify-send\" FROM \"$testnet\".\"autogen\".\"counter-sigverify_stage-verified_packets_send\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"sigverify-send\" FROM \"$testnet\".\"autogen\".\"sigverify_stage-verified_packets_send\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "H", "resultFormat": "time_series", @@ -5280,7 +5280,7 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", "query": "SELECT sum(\"count\") AS \"retransmit\" FROM \"$testnet\".\"autogen\".\"retransmit-stage\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)", @@ -5318,7 +5318,7 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", "query": "SELECT sum(\"count\") AS \"replicate\" FROM \"$testnet\".\"autogen\".\"replicate-stage\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)", @@ -5356,7 +5356,7 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", "query": "SELECT sum(\"count\") AS \"retransmit_q\" FROM \"$testnet\".\"autogen\".\"retransmit-queue\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)", @@ -5394,7 +5394,7 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", "query": "SELECT sum(\"count\") AS \"recv_window\" FROM \"$testnet\".\"autogen\".\"recv-window\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)", @@ -5511,10 +5511,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT sum(\"count\") AS \"sigverify\" FROM \"$testnet\".\"autogen\".\"counter-sigverify_stage-time_ms\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"sigverify\" FROM \"$testnet\".\"autogen\".\"sigverify_stage-time_ms\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -5551,7 +5551,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"banking\" FROM \"$testnet\".\"autogen\".\"counter-banking_stage-time_ms\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"banking\" FROM \"$testnet\".\"autogen\".\"banking_stage-time_ms\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "B", "resultFormat": "time_series", @@ -5588,7 +5588,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"request\" FROM \"$testnet\".\"autogen\".\"counter-request_stage-time_ms\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"request\" FROM \"$testnet\".\"autogen\".\"request_stage-time_ms\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "C", "resultFormat": "time_series", @@ -5625,7 +5625,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"write\" FROM \"$testnet\".\"autogen\".\"counter-ledger_writer_stage-time_ms\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"write\" FROM \"$testnet\".\"autogen\".\"ledger_writer_stage-time_ms\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "D", "resultFormat": "time_series", @@ -5662,7 +5662,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"broadcast\" FROM \"$testnet\".\"autogen\".\"counter-broadcast_service-time_ms\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)\n", + "query": "SELECT sum(\"count\") AS \"broadcast\" FROM \"$testnet\".\"autogen\".\"broadcast_service-time_ms\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)\n", "rawQuery": true, "refId": "E", "resultFormat": "time_series", @@ -5699,7 +5699,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"banking_stall\" FROM \"$testnet\".\"autogen\".\"counter-banking_stage-stall_time_ms\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)", + "query": "SELECT sum(\"count\") AS \"banking_stall\" FROM \"$testnet\".\"autogen\".\"banking_stage-stall_time_ms\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)", "rawQuery": true, "refId": "F", "resultFormat": "time_series", @@ -5736,7 +5736,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") AS \"banking_buffered\" FROM \"$testnet\".\"autogen\".\"counter-banking_stage-buffered_packet_time_ms\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)", + "query": "SELECT sum(\"count\") AS \"banking_buffered\" FROM \"$testnet\".\"autogen\".\"banking_stage-buffered_packet_time_ms\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)", "rawQuery": true, "refId": "G", "resultFormat": "time_series", @@ -5800,9 +5800,9 @@ { "aliasColors": { "cluster-info.repair": "#ba43a9", - "counter-locktower-observed.squash_account": "#0a437c", - "counter-locktower-observed.squash_cache": "#ea6460", - "counter-replay_stage-new_leader.last": "#00ffbb", + "locktower-observed.squash_account": "#0a437c", + "locktower-observed.squash_cache": "#ea6460", + "replay_stage-new_leader.last": "#00ffbb", "window-service.receive": "#b7dbab", "window-stage.consumed": "#5195ce" }, @@ -5857,10 +5857,10 @@ } ], "hide": false, - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT mean(\"count\") FROM \"$testnet\".\"autogen\".\"counter-bank-forks_set_root_ms\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", + "query": "SELECT mean(\"count\") FROM \"$testnet\".\"autogen\".\"bank-forks_set_root_ms\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -5896,10 +5896,10 @@ } ], "hide": false, - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT mean(\"squash_accounts_ms\") AS \"squash_account\" FROM \"$testnet\".\"autogen\".\"counter-locktower-observed\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", + "query": "SELECT mean(\"squash_accounts_ms\") AS \"squash_account\" FROM \"$testnet\".\"autogen\".\"locktower-observed\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", "rawQuery": true, "refId": "B", "resultFormat": "time_series", @@ -5935,10 +5935,10 @@ } ], "hide": false, - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT mean(\"squash_cache_ms\") AS \"squash_cache\" FROM \"$testnet\".\"autogen\".\"counter-locktower-observed\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", + "query": "SELECT mean(\"squash_cache_ms\") AS \"squash_cache\" FROM \"$testnet\".\"autogen\".\"locktower-observed\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", "rawQuery": true, "refId": "C", "resultFormat": "time_series", @@ -6052,7 +6052,7 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", "query": "SELECT last(\"consumed\") AS \"validator\" FROM \"$testnet\".\"autogen\".\"window-stage\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval) FILL(0)", @@ -6090,7 +6090,7 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", "query": "SELECT last(\"transmit-index\") AS \"leader\" FROM \"$testnet\".\"autogen\".\"broadcast-service\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)", @@ -6313,16 +6313,16 @@ { "aliasColors": { "cluster-info.repair": "#ba43a9", - "counter-banking_stage-buffered_packets.sum": "#3f6833", - "counter-banking_stage-consumed_buffered_packets.last": "#65c5db", - "counter-banking_stage-consumed_buffered_packets.sum": "#614d93", - "counter-banking_stage-forwarded_packets.last": "#f9ba8f", - "counter-banking_stage-forwarded_packets.sum": "#b7dbab", - "counter-banking_stage-rebuffered_packets.last": "#e5a8e2", - "counter-fetch_stage-discard_forwards.sum": "#00ffbb", - "counter-fetch_stage-honor_forwards.sum": "#bf1b00", - "counter-locktower-vote.last": "#00ffbb", - "counter-replay_stage-new_leader.last": "#00ffbb", + "banking_stage-buffered_packets.sum": "#3f6833", + "banking_stage-consumed_buffered_packets.last": "#65c5db", + "banking_stage-consumed_buffered_packets.sum": "#614d93", + "banking_stage-forwarded_packets.last": "#f9ba8f", + "banking_stage-forwarded_packets.sum": "#b7dbab", + "banking_stage-rebuffered_packets.last": "#e5a8e2", + "fetch_stage-discard_forwards.sum": "#00ffbb", + "fetch_stage-honor_forwards.sum": "#bf1b00", + "locktower-vote.last": "#00ffbb", + "replay_stage-new_leader.last": "#00ffbb", "window-service.receive": "#b7dbab", "window-stage.consumed": "#5195ce" }, @@ -6377,10 +6377,10 @@ } ], "hide": false, - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT sum(\"count\") FROM \"$testnet\".\"autogen\".\"counter-banking_stage-buffered_packets\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", + "query": "SELECT sum(\"count\") FROM \"$testnet\".\"autogen\".\"banking_stage-buffered_packets\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -6417,7 +6417,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") FROM \"$testnet\".\"autogen\".\"counter-banking_stage-forwarded_packets\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", + "query": "SELECT sum(\"count\") FROM \"$testnet\".\"autogen\".\"banking_stage-forwarded_packets\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", "rawQuery": true, "refId": "B", "resultFormat": "time_series", @@ -6454,7 +6454,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") FROM \"$testnet\".\"autogen\".\"counter-banking_stage-consumed_buffered_packets\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", + "query": "SELECT sum(\"count\") FROM \"$testnet\".\"autogen\".\"banking_stage-consumed_buffered_packets\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", "rawQuery": true, "refId": "C", "resultFormat": "time_series", @@ -6491,7 +6491,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") FROM \"$testnet\".\"autogen\".\"counter-banking_stage-rebuffered_packets\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", + "query": "SELECT sum(\"count\") FROM \"$testnet\".\"autogen\".\"banking_stage-rebuffered_packets\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", "rawQuery": true, "refId": "D", "resultFormat": "time_series", @@ -6528,7 +6528,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") FROM \"$testnet\".\"autogen\".\"counter-fetch_stage-honor_forwards\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", + "query": "SELECT sum(\"count\") FROM \"$testnet\".\"autogen\".\"fetch_stage-honor_forwards\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", "rawQuery": true, "refId": "E", "resultFormat": "time_series", @@ -6565,7 +6565,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT sum(\"count\") FROM \"$testnet\".\"autogen\".\"counter-fetch_stage-discard_forwards\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", + "query": "SELECT sum(\"count\") FROM \"$testnet\".\"autogen\".\"fetch_stage-discard_forwards\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", "rawQuery": true, "refId": "F", "resultFormat": "time_series", @@ -6642,7 +6642,7 @@ { "aliasColors": { "cluster-info.repair": "#ba43a9", - "counter-replay_stage-new_leader.last": "#00ffbb", + "replay_stage-new_leader.last": "#00ffbb", "window-service.receive": "#b7dbab", "window-stage.consumed": "#5195ce" }, @@ -6697,10 +6697,10 @@ } ], "hide": false, - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT last(\"latest\") - last(\"root\") FROM \"$testnet\".\"autogen\".\"counter-locktower-vote\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", + "query": "SELECT last(\"latest\") - last(\"root\") FROM \"$testnet\".\"autogen\".\"locktower-vote\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -6737,7 +6737,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT last(\"slot\") - last(\"root\") FROM \"$testnet\".\"autogen\".\"counter-locktower-observed\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", + "query": "SELECT last(\"slot\") - last(\"root\") FROM \"$testnet\".\"autogen\".\"locktower-observed\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", "rawQuery": true, "refId": "B", "resultFormat": "time_series", @@ -6801,8 +6801,8 @@ { "aliasColors": { "cluster-info.repair": "#ba43a9", - "counter-locktower-vote.last": "#00ffbb", - "counter-replay_stage-new_leader.last": "#00ffbb", + "locktower-vote.last": "#00ffbb", + "replay_stage-new_leader.last": "#00ffbb", "window-service.receive": "#b7dbab", "window-stage.consumed": "#5195ce" }, @@ -6857,10 +6857,10 @@ } ], "hide": false, - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT last(\"root\") FROM \"$testnet\".\"autogen\".\"counter-locktower-vote\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", + "query": "SELECT last(\"root\") FROM \"$testnet\".\"autogen\".\"locktower-vote\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -6897,7 +6897,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "SELECT last(\"root\") FROM \"$testnet\".\"autogen\".\"counter-locktower-observed\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", + "query": "SELECT last(\"root\") FROM \"$testnet\".\"autogen\".\"locktower-observed\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", "rawQuery": true, "refId": "B", "resultFormat": "time_series", @@ -6961,8 +6961,8 @@ { "aliasColors": { "cluster-info.repair": "#ba43a9", - "counter-bank-process_transactions-txs.transactions": "#e5a8e2", - "counter-replay_stage-new_leader.last": "#00ffbb", + "bank-process_transactions-txs.transactions": "#e5a8e2", + "replay_stage-new_leader.last": "#00ffbb", "window-service.receive": "#b7dbab", "window-stage.consumed": "#5195ce" }, @@ -7016,10 +7016,10 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", - "query": "SELECT last(\"count\") FROM \"$testnet\".\"autogen\".\"counter-replay_stage-new_leader\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", + "query": "SELECT last(\"count\") FROM \"$testnet\".\"autogen\".\"replay_stage-new_leader\" WHERE host_id =~ /$hostid/ AND $timeFilter GROUP BY time($__interval)", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -7148,7 +7148,7 @@ } ], "hide": false, - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", "query": "SELECT mean(\"packets_received\") as \"packets_received\" FROM \"$testnet\".\"autogen\".\"net-stats\" WHERE hostname =~ /$hostid/ AND $timeFilter GROUP BY time(5s) fill(null)\n\n\n\n", @@ -7186,7 +7186,7 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", "query": "SELECT mean(\"receive_errors\") as \"receive_errors\" FROM \"$testnet\".\"autogen\".\"net-stats\" WHERE hostname =~ /$hostid/ AND $timeFilter GROUP BY time(5s) fill(null)\n\n\n\n", @@ -7224,7 +7224,7 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", "query": "SELECT mean(\"rcvbuf_errors\") as \"rcvbuf_errors\" FROM \"$testnet\".\"autogen\".\"net-stats\" WHERE hostname =~ /$hostid/ AND $timeFilter GROUP BY time(5s) fill(null)\n\n\n\n", @@ -7262,7 +7262,7 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", "query": "SELECT mean(\"packets_sent\") as \"packets_sent\" FROM \"$testnet\".\"autogen\".\"net-stats\" WHERE hostname =~ /$hostid/ AND $timeFilter GROUP BY time(5s) fill(null)\n\n\n\n", @@ -7382,7 +7382,7 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", "query": "SELECT mean(\"in_octets\") as \"recv\" FROM \"$testnet\".\"autogen\".\"net-stats\" WHERE $timeFilter GROUP BY time(1s) fill(null)\n\n\n\n", @@ -7420,7 +7420,7 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", "query": "SELECT mean(\"out_octets\") as \"sent\" FROM \"$testnet\".\"autogen\".\"net-stats\" WHERE $timeFilter GROUP BY time(1s) fill(null)\n\n\n\n", @@ -7549,7 +7549,7 @@ "type": "fill" } ], - "measurement": "counter-cluster_info-vote-count", + "measurement": "cluster_info-vote-count", "orderByTime": "ASC", "policy": "autogen", "query": "SELECT max(\"total_time_ms\") AS \"max\" FROM \"$testnet\".\"autogen\".\"sigverify_stage-total_verify_time\" WHERE $timeFilter GROUP BY time($__interval) FILL(0)\n\n", @@ -7666,7 +7666,7 @@ "multi": false, "name": "hostid", "options": [], - "query": "SELECT DISTINCT(\"host_id\") FROM \"$testnet\".\"autogen\".\"counter-fullnode-new\" ", + "query": "SELECT DISTINCT(\"host_id\") FROM \"$testnet\".\"autogen\".\"fullnode-new\" ", "refresh": 2, "regex": "", "sort": 1, diff --git a/programs/exchange_api/src/exchange_processor.rs b/programs/exchange_api/src/exchange_processor.rs index 8517bbe59..c19fd2229 100644 --- a/programs/exchange_api/src/exchange_processor.rs +++ b/programs/exchange_api/src/exchange_processor.rs @@ -4,7 +4,7 @@ use crate::exchange_instruction::*; use crate::exchange_state::*; use crate::id; use log::*; -use solana_metrics::counter::Counter; +use solana_metrics::inc_new_counter_info; use solana_sdk::account::KeyedAccount; use solana_sdk::instruction::InstructionError; use solana_sdk::pubkey::Pubkey; @@ -390,7 +390,7 @@ impl ExchangeProcessor { Err(e)? } - inc_new_counter_info!("exchange_processor-swap", 1, 1000, 1000); + inc_new_counter_info!("exchange_processor-swaps", 1, 1000, 1000); if to_trade.tokens == 0 { // Turn into token account diff --git a/programs/vote_api/src/vote_instruction.rs b/programs/vote_api/src/vote_instruction.rs index 3c5e43058..480c4c09a 100644 --- a/programs/vote_api/src/vote_instruction.rs +++ b/programs/vote_api/src/vote_instruction.rs @@ -6,6 +6,7 @@ use crate::vote_state::{self, Vote, VoteState}; use bincode::deserialize; use log::*; use serde_derive::{Deserialize, Serialize}; +use solana_metrics::datapoint; use solana_sdk::account::KeyedAccount; use solana_sdk::instruction::{AccountMeta, Instruction, InstructionError}; use solana_sdk::pubkey::Pubkey; @@ -87,11 +88,7 @@ pub fn process_instruction( vote_state::authorize_voter(vote_account, other_signers, &voter_id) } VoteInstruction::Vote(votes) => { - solana_metrics::submit( - solana_metrics::influxdb::Point::new("vote-native") - .add_field("count", solana_metrics::influxdb::Value::Integer(1)) - .to_owned(), - ); + datapoint!("vote-native", ("count", 1, i64)); let (vote_account, other_signers) = keyed_accounts.split_at_mut(1); let vote_account = &mut vote_account[0]; diff --git a/runtime/src/accounts.rs b/runtime/src/accounts.rs index ad8043505..26bba5c81 100644 --- a/runtime/src/accounts.rs +++ b/runtime/src/accounts.rs @@ -8,7 +8,7 @@ use crate::message_processor::has_duplicates; use bincode::serialize; use hashbrown::{HashMap, HashSet}; use log::*; -use solana_metrics::counter::Counter; +use solana_metrics::inc_new_counter_info; use solana_sdk::account::Account; use solana_sdk::fee_calculator::FeeCalculator; use solana_sdk::hash::{Hash, Hasher}; diff --git a/runtime/src/bank.rs b/runtime/src/bank.rs index 144778450..575e409ae 100644 --- a/runtime/src/bank.rs +++ b/runtime/src/bank.rs @@ -13,8 +13,7 @@ use crate::status_cache::StatusCache; use bincode::serialize; use hashbrown::HashMap; use log::*; -use solana_metrics::counter::Counter; -use solana_metrics::influxdb; +use solana_metrics::{datapoint, inc_new_counter_info}; use solana_sdk::account::Account; use solana_sdk::fee_calculator::FeeCalculator; use solana_sdk::genesis_block::GenesisBlock; @@ -245,14 +244,11 @@ impl Bank { bank.slot = slot; bank.max_tick_height = (bank.slot + 1) * bank.ticks_per_slot - 1; - solana_metrics::submit( - influxdb::Point::new("bank-new_from_parent-heights") - .add_field("slot_height", influxdb::Value::Integer(slot as i64)) - .add_field( - "bank_height", - influxdb::Value::Integer(bank.bank_height as i64), - ) - .to_owned(), + + datapoint!( + "bank-new_from_parent-heights", + ("slot_height", slot, i64), + ("bank_height", bank.bank_height, i64) ); bank.parent = RwLock::new(Some(parent.clone())); @@ -330,17 +326,10 @@ impl Bank { .for_each(|p| self.status_cache.write().unwrap().add_root(p.slot())); let squash_cache_ms = duration_as_ms(&squash_cache_start.elapsed()); - solana_metrics::submit( - influxdb::Point::new("counter-locktower-observed") - .add_field( - "squash_accounts_ms", - influxdb::Value::Integer(squash_accounts_ms as i64), - ) - .add_field( - "squash_cache_ms", - influxdb::Value::Integer(squash_cache_ms as i64), - ) - .to_owned(), + datapoint!( + "locktower-observed", + ("squash_accounts_ms", squash_accounts_ms, i64), + ("squash_cache_ms", squash_cache_ms, i64) ); }