File tree Expand file tree Collapse file tree 3 files changed +22
-0
lines changed
analytic_services/prometheus_reports Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -621,6 +621,10 @@ config.HA_METRICS_SERVER_PORT = 7003;
621621config . EP_METRICS_SERVER_PORT = 7004 ;
622622config . EP_METRICS_SERVER_SSL_PORT = 9443 ;
623623
624+ // Bucket capacity thresholds (percentage)
625+ config . BUCKET_LOW_CAPACITY_THRESHOLD = parseInt ( process . env . BUCKET_LOW_CAPACITY_THRESHOLD , 10 ) || 80 ;
626+ config . BUCKET_NO_CAPACITY_THRESHOLD = parseInt ( process . env . BUCKET_NO_CAPACITY_THRESHOLD , 10 ) || 95 ;
627+
624628//////////////////////////////
625629// OAUTH RELATES //
626630//////////////////////////////
@@ -1118,6 +1122,7 @@ config.GPFS_DOWN_DELAY = 1000;
11181122
11191123//Quota
11201124config . QUOTA_LOW_THRESHOLD = 80 ;
1125+
11211126config . QUOTA_MAX_OBJECTS = Number . MAX_SAFE_INTEGER ;
11221127
11231128//////////////////////////
Original file line number Diff line number Diff line change @@ -431,6 +431,20 @@ const NOOBAA_CORE_METRICS = js_utils.deep_freeze([{
431431 help : 'Object Bucket Used Bytes' ,
432432 labelNames : [ 'bucket_name' ]
433433 }
434+ } , {
435+ type : 'Gauge' ,
436+ name : 'bucket_low_capacity_threshold' ,
437+ generate_default_set : true ,
438+ configuration : {
439+ help : 'Bucket Low Capacity Threshold Percentage'
440+ }
441+ } , {
442+ type : 'Gauge' ,
443+ name : 'bucket_no_capacity_threshold' ,
444+ generate_default_set : true ,
445+ configuration : {
446+ help : 'Bucket No Capacity Threshold Percentage'
447+ }
434448 }
435449] ) ;
436450
Original file line number Diff line number Diff line change @@ -1065,6 +1065,9 @@ function partial_cycle_parse_prometheus_metrics(payload) {
10651065 // TODO: Currently mock data, update with the relevant values.
10661066 core_report . set_rebuild_progress ( 100 ) ;
10671067 core_report . set_rebuild_time ( 0 ) ;
1068+ // set bucket capacity thresholds from config (env vars with defaults)
1069+ core_report . set_bucket_low_capacity_threshold ( config . BUCKET_LOW_CAPACITY_THRESHOLD ) ;
1070+ core_report . set_bucket_no_capacity_threshold ( config . BUCKET_NO_CAPACITY_THRESHOLD ) ;
10681071}
10691072
10701073/*
You can’t perform that action at this time.
0 commit comments