mardi 17 octobre 2023

prometheus, grafana, alertmanager: number of alerts

 prometheus alerts counts


from : https://jaanhio.me/blog/visualizing-alerts-metrics-grafana/ + https://community.grafana.com/t/how-to-get-the-time-range-selected-on-the-dashboard-into-a-variable/2868/3

(sum by (alertname) (changes(ALERTS_FOR_STATE[$__range]) AND ignoring(alertstate) max_over_time(ALERTS{alertstate="firing"}[$__range])) + (count by (alertname) (changes(ALERTS_FOR_STATE[$__range]) AND ignoring(alertstate) max_over_time(ALERTS{alertstate="firing"}[$__range])) * 1))


Then use a grafana panel as "Gauge" with the following options :

* Value options: show calculate, Last *

* Orientation = horizontal, and 



Number of alerts by alert name of the last 2 months

PromQL = sum by(alertname) (changes(ALERTS_FOR_STATE[65d]))



Number of alerts by instance over the last 2 months

PromQL = sum by(instance_name) (changes(ALERTS_FOR_STATE[65d]))

vendredi 22 septembre 2023

Google post-mortem culture (SRE)

 https://sre.google/sre-book/postmortem-culture/

and links to :

https://sre.google/sre-book/bibliography/





More generally included in :

https://sre.google/sre-book/foreword/


platforms/products to manage an API

 platforms/products  to manage an API

Kong

mercredi 6 septembre 2023

Request Bin / http endpoint for testing

from : https://grafana.com/tutorials/grafana-fundamentals/#create-a-contact-point-for-grafana-managed-alerts

 

 In this step, we’ll set up a new contact point. This contact point will use the webhooks channel. In order to make this work, we also need an endpoint for our webhook channel to receive the alert. We will use requestbin.com to quickly set up that test endpoint. This way we can make sure that our alert is actually sending a notification somewhere.

  1. Browse to requestbin.com.
  2. Under the Create Request Bin button, click the public bin link.

Your request bin is now waiting for the first request.

  1. Copy the endpoint URL.


=> tool to test what is received !

 

vendredi 14 juillet 2023

Burnout metrics

 

Maslach Burnout Inventory™ (MBI)

https://www.mindgarden.com/117-maslach-burnout-inventory-mbi


Job Diagnostic Survey (JDS)

https://scales.arabpsychology.com/s/job-diagnostic-survey-jds/


How to measure work engagement / The UWES Questionnaire

https://www.cbs.dk/files/cbs.dk/executive_summary_6.pdf

(Summary of Schaufeli B. W. & Bakker, B. A. (2003): Occupational Health Psychology Unit. Utrecht

University) 

Hc-analytics@cbs.dk

www.cbs.dk/hc-analytics

LinkedIn: Human Capital Analytics Group




from : https://www.betterup.com/blog/signs-of-burnout-at-work

mardi 11 juillet 2023

with great software comes great devopsability"



"with great software comes great devopsability"


cm, july 2023 :-D 

mercredi 21 juin 2023

Kubernetes Ingress Controllers (table by learn k8s research)

 https://docs.google.com/spreadsheets/d/191WWNpjJ2za6-nbG4ZoUMXMpUK8KlCIosvQB0f-oq3k/edit#gid=907731238


The Not Rocket Science Rule Of Software Engineering: automatically maintain a repository of code that always passes all the tests

technicalities: "not rocket science" (the story of monotone and bors)

https://graydon2.dreamwidth.org/1597.html : 

The Not Rocket Science Rule Of Software Engineering:

automatically maintain a repository of code that always passes all the tests


parse json in terraform

 https://www.reddit.com/r/Terraform/comments/c07dgc/using_external_jsons_as_data_source/

    data "http" "example" {
  url = "..."
}

locals {
  example_response = jsondecode(data.http.example.body)
}
From there you can manipulate that data structure as you need. If you want to produce a map of lists then probably your next step would be to use two nested for expressions. I’m just guessing what you want the values in those lists to look like, but here’s a starting point:
    locals {
  example_rules = {
    for k, m in local.example_response : k => [
      for k, v in m : {
        key   = k
        value = v
      }
    ]
  }
}

Quantum computing art (& fractals)

 

Visualizing Quantum Computing using fractals

https://github.com/wmazin/Visualizing-Quantum-Computing-using-fractals


Flexible Representation of Quantum Images (FRQI) and Novel Enhanced Quantum Representation (NEQR)

https://qiskit.org/

https://learn.qiskit.org/course/ch-applications/flexible-representation-of-quantum-images-frqi


Exhibition-ready quantum image processing

https://medium.com/qiskit/exhibition-ready-quantum-image-processing-4bb9fa8b52b5


Creating fractal art with qiskit

https://medium.com/qiskit/creating-fractal-art-with-qiskit-df69427026a0