probe-lab / website

https://probelab.io
2 stars 3 forks source link

Use caracol collections based on nginx_http_response_codes_total for gateway plots #83

Closed iand closed 7 months ago

iand commented 7 months ago

The nginx_http_requests_total metric is no longer available in the bifrost prometheus instance. We were using this metric for the "Gateway total requests by day and Gateway total requests by region plots using some underlying caracol sequences (ids 4, 5,6,7 and 8). However we also has some equivalent sequences in caracol that were based on the nginx_http_response_codes_total metric. I switched the regional plots to use the existing caracol collections and created a new one for the total number of requests using:

caracol query add --dburl $PG_CARACOL_WRITE 
                  --name "bifrost-prometheus; nginx_http_response_codes_total; gateways; all families; all regions" 
                  --source-id 2 
                  --query-type="prometheus" 
                  --interval daily 
                  --start 2023-06-01T00:00:00Z 
                  --query 'ceil(sum(increase(nginx_http_response_codes_total{job="gateways_mtail", family=~"api|ipfs|ipns|refs"}[1d])))' 

I also stopped the failing caracol queries (which were alering) from being populated by setting their finish time to 2023-10-24T00:00:00Z which preserves the data already collected up to that date:

caracol query finish --dburl $PG_CARACOL_WRITE  --id 4 --finish 2023-10-24T00:00:00Z
caracol query finish --dburl $PG_CARACOL_WRITE  --id 5 --finish 2023-10-24T00:00:00Z
caracol query finish --dburl $PG_CARACOL_WRITE  --id 6 --finish 2023-10-24T00:00:00Z
caracol query finish --dburl $PG_CARACOL_WRITE  --id 7 --finish 2023-10-24T00:00:00Z
caracol query finish --dburl $PG_CARACOL_WRITE  --id 8 --finish 2023-10-24T00:00:00Z
netlify[bot] commented 7 months ago

Deploy Preview for idyllic-dieffenbachia-466fef ready!

Name Link
Latest commit 257d9c4344de5ab857c229cd5439ae293d35a023
Latest deploy log https://app.netlify.com/sites/idyllic-dieffenbachia-466fef/deploys/655cc8c3eb84cd00079d1e08
Deploy Preview https://deploy-preview-83--idyllic-dieffenbachia-466fef.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.