@@ -111,7 +111,7 @@ func (d *DataAccessService) GetHealthz(ctx context.Context, showAll bool) types.
111111 response .Reports = make (map [string ][]types.HealthzResult )
112112 response .ReportingUUID = utils .GetUUID ()
113113 response .DeploymentType = utils .Config .DeploymentType
114- err := db .ClickHouseReader .SelectContext (ctx , & results , query , ch .Named ("deployment_type" , utils .Config .DeploymentType ), ch .Named ("clean_shutdown_event_id" , constants .CleanShutdownEvent ))
114+ err := db .ClickHouseReader .SelectContext (ctx , & results , query , ch .Named ("deployment_type" , utils .Config .DeploymentType ), ch .Named ("clean_shutdown_event_id" , string ( constants .Event_MonitoringCleanShutdown ) ))
115115 if err != nil {
116116 response .Reports ["response_error" ] = []types.HealthzResult {
117117 {
@@ -125,25 +125,16 @@ func (d *DataAccessService) GetHealthz(ctx context.Context, showAll bool) types.
125125 return response
126126 }
127127
128- mustExist := []string {
129- "ch_rolling_1h" ,
130- "ch_rolling_24h" ,
131- "ch_rolling_7d" ,
132- "ch_rolling_30d" ,
133- "ch_rolling_90d" ,
134- "ch_rolling_total" ,
135- "ch_dashboard_epoch" ,
136- "api_service_avg_efficiency" ,
137- "api_service_validator_mapping" ,
138- "api_service_slot_viz" ,
139- "monitoring_timeouts" ,
140- }
141128 for _ , result := range results {
142129 response .Reports [result .EventId ] = append (response .Reports [result .EventId ], result )
143130 }
144- for _ , id := range mustExist {
145- if _ , ok := response .Reports [id ]; ! ok {
146- response .Reports [id ] = []types.HealthzResult {
131+ requiredEvents := constants .RequiredEvents
132+ if utils .Config .DeploymentType == "production" {
133+ requiredEvents = append (requiredEvents , constants .ProductionRequiredEvents ... )
134+ }
135+ for _ , id := range requiredEvents {
136+ if _ , ok := response .Reports [string (id )]; ! ok {
137+ response .Reports [string (id )] = []types.HealthzResult {
147138 {
148139 Status : constants .Failure ,
149140 Result : []map [string ]string {
0 commit comments