Rename metric
This commit is contained in:
parent
cd221c10fa
commit
ca269fb691
@ -24,7 +24,7 @@ prom_counter_t *turn_total_traffic_peer_rcvb;
|
||||
prom_counter_t *turn_total_traffic_peer_sentp;
|
||||
prom_counter_t *turn_total_traffic_peer_sentb;
|
||||
|
||||
prom_gauge_t *turn_total_allocations_number;
|
||||
prom_gauge_t *turn_total_allocations;
|
||||
|
||||
|
||||
int start_prometheus_server(void){
|
||||
@ -66,7 +66,7 @@ int start_prometheus_server(void){
|
||||
turn_total_traffic_peer_sentb = prom_collector_registry_must_register_metric(prom_counter_new("turn_total_traffic_peer_sentb", "Represents total finished sessions peer sent bytes", 0, NULL));
|
||||
|
||||
// Create total allocations number gauge metric
|
||||
turn_total_allocations_number = prom_collector_registry_must_register_metric(prom_gauge_new("turn_total_allocations_number", "Represents current allocations number", 0, NULL));
|
||||
turn_total_allocations = prom_collector_registry_must_register_metric(prom_gauge_new("turn_total_allocations", "Represents current allocations number", 0, NULL));
|
||||
|
||||
promhttp_set_active_collector_registry(NULL);
|
||||
|
||||
@ -112,13 +112,13 @@ void prom_set_finished_traffic(const char* realm, const char* user, unsigned lon
|
||||
|
||||
void prom_inc_allocation(void) {
|
||||
if (turn_params.prometheus == 1){
|
||||
prom_gauge_inc(turn_total_allocations_number, NULL);
|
||||
prom_gauge_inc(turn_total_allocations, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void prom_dec_allocation(void) {
|
||||
if (turn_params.prometheus == 1){
|
||||
prom_gauge_dec(turn_total_allocations_number, NULL);
|
||||
prom_gauge_dec(turn_total_allocations, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user