mirror of
https://github.com/threefoldtech/mycelium.git
synced 2026-03-29 07:39:51 +00:00
Add metric for unfeasbile update to unknown subnet
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
This commit is contained in:
@@ -29,6 +29,7 @@ pub struct PrometheusExporter {
|
||||
router_propage_selected_peers_time_spent: IntCounter,
|
||||
router_update_skipped_route_selection: IntCounter,
|
||||
router_update_denied_by_filter: IntCounter,
|
||||
router_update_not_interested: IntCounter,
|
||||
peer_manager_peer_added: IntCounterVec,
|
||||
peer_manager_known_peers: IntGauge,
|
||||
peer_manager_connection_attemps: IntCounterVec,
|
||||
@@ -137,6 +138,11 @@ impl PrometheusExporter {
|
||||
"Updates which were received and immediately denied by a configured filter",
|
||||
)
|
||||
.expect("Can register an int counter in default registry"),
|
||||
router_update_not_interested: register_int_counter!(
|
||||
"mycelium_router_update_not_interested",
|
||||
"Updates which were allowed by the configured filters, but not of interest as they were either not feasible, or retractions, for an unknown subnet",
|
||||
)
|
||||
.expect("Can register an int counter in default registry"),
|
||||
peer_manager_peer_added: register_int_counter_vec!(
|
||||
opts!(
|
||||
"mycelium_peer_manager_peers_added",
|
||||
@@ -385,6 +391,11 @@ impl Metrics for PrometheusExporter {
|
||||
self.router_update_denied_by_filter.inc()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn router_update_not_interested(&self) {
|
||||
self.router_update_not_interested.inc()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn peer_manager_peer_added(&self, pt: mycelium::peer_manager::PeerType) {
|
||||
let label = match pt {
|
||||
|
||||
Reference in New Issue
Block a user