@@ -23,7 +23,9 @@ def to_format(self, value):
2323 'out_of_ser' : Metric ('validator_out_of_serialization' , 'Number of blocks last state serialization was ago' , 'gauge' ),
2424 'vc_up' : Metric ('validator_console_up' , 'Is `validator-console` up' , 'gauge' ),
2525 'validator_id' : Metric ('validator_index' , 'Validator index' , 'gauge' ),
26- 'validator_stake' : Metric ('validator_stake' , 'Validator stake' , 'gauge' ),
26+ 'stake' : Metric ('validator_stake' , 'Validator stake' , 'gauge' ),
27+ 'celldb_gc_block' : Metric ('validator_celldb_gc_block' , 'Celldb GC block latency' , 'gauge' ),
28+ 'celldb_gc_state' : Metric ('validator_celldb_gc_state' , 'Celldb GC queue size' , 'gauge' ),
2729}
2830
2931
@@ -43,6 +45,10 @@ def get_validator_status_metrics(self, result: list):
4345 result .append (METRICS ['shard_out_of_sync' ].to_format (status .shardchain_out_of_sync ))
4446 if status .masterchain_out_of_ser is not None :
4547 result .append (METRICS ['out_of_ser' ].to_format (status .masterchain_out_of_ser ))
48+ if status .masterchainblock is not None and status .gcmasterchainblock is not None :
49+ result .append (METRICS ['celldb_gc_block' ].to_format (status .masterchainblock - status .gcmasterchainblock ))
50+ if status .gcmasterchainblock is not None and status .last_deleted_mc_state is not None :
51+ result .append (METRICS ['celldb_gc_state' ].to_format (status .gcmasterchainblock - status .last_deleted_mc_state ))
4652 result .append (METRICS ['vc_up' ].to_format (int (status .is_working )))
4753
4854 def get_validator_validation_metrics (self , result : list ):
@@ -55,7 +61,7 @@ def get_validator_validation_metrics(self, result: list):
5561 adnl = self .ton .GetAdnlAddr ()
5662 stake = elections .get (adnl , {}).get ('stake' )
5763 if stake :
58- result .append (METRICS ['validator_stake ' ].to_format (round (stake , 2 )))
64+ result .append (METRICS ['stake ' ].to_format (round (stake , 2 )))
5965
6066 def push_metrics (self ):
6167 if not self .ton .using_prometheus ():
0 commit comments