File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ def get_metrics(metrics_type, lbid):
158
158
159
159
160
160
for services in load_balancer ['services' ]:
161
- if services ['protocol' ] == 'http' :
161
+ if services ['protocol' ] in [ 'http' , 'https' ] :
162
162
LOAD_BALANCER_TYPE = 'http'
163
163
else :
164
164
LOAD_BALANCER_TYPE = 'tcp'
@@ -195,7 +195,7 @@ def get_metrics(metrics_type, lbid):
195
195
hetzner_connections_per_second .labels (hetzner_load_balancer_id = load_balancer_id ,
196
196
hetzner_load_balancer_name = lb_name ).set (get_metrics ('connections_per_second' ,load_balancer_id )["metrics" ]["time_series" ]["connections_per_second" ]["values" ][0 ][1 ])
197
197
if load_balancer_type == 'http' :
198
- hetzner_connections_per_second .labels (hetzner_load_balancer_id = load_balancer_id ,
198
+ hetzner_requests_per_second .labels (hetzner_load_balancer_id = load_balancer_id ,
199
199
hetzner_load_balancer_name = lb_name ).set (get_metrics ('requests_per_second' ,load_balancer_id )["metrics" ]["time_series" ]["requests_per_second" ]["values" ][0 ][1 ])
200
200
hetzner_bandwidth_in .labels (hetzner_load_balancer_id = load_balancer_id ,
201
201
hetzner_load_balancer_name = lb_name ).set (get_metrics ('bandwidth' ,load_balancer_id )["metrics" ]["time_series" ]["bandwidth.in" ]["values" ][0 ][1 ])
You can’t perform that action at this time.
0 commit comments