<!--
This style apply by default to all slides, unless .slide is used.
Note the use of the reveal class selector: this mean that only the presentation is affected by this style, and the makrdown preview or the book mode of hackmd.io is style intact.
If you want/need a resizable background image, add the background-size: cover; property and change background-position: 0px 0px;
-->
<style>
.reveal {
background-color: #e6e6e6;
background-image: url('https://epfl-si.github.io/elements/svg/epfl-logo.svg');
background-repeat: no-repeat;
background-position: 5px 5px;
}
.reveal {
color: #707070;
}
.reveal h1, .reveal h2, .reveal h3,
.reveal h4, .reveal h5, .reveal h6 {
color: #212121;
}
.reveal h1, .reveal h2 {
text-shadow: 2px 2px white;
}
.reveal a {
color: #f009;
}
.reveal a:hover {
color: #f00;
}
.reveal code {
padding-top: 0.2em;
padding-bottom: 0.2em;
margin: 0;
font-size: 85%;
background-color: rgba(255, 255, 255, 0.46);
border-radius: 3px;
}
.reveal blockquote {
width: 110%;
border-left: 10px solid #f00;
background: white;
}
.more-visibility {
color: #212121;
text-shadow: 1px 1px white;
}
@media print {
.reveal {
background-color: #e6e6e6;
background-image: url('https://epfl-si.github.io/elements/svg/epfl-logo.svg');
background-repeat: no-repeat;
background-position: 5px 5px;
}
.reveal {
color: #707070;
}
.reveal h1, .reveal h2, .reveal h3,
.reveal h4, .reveal h5, .reveal h6 {
color: #212121;
}
.reveal h1, .reveal h2 {
text-shadow: 2px 2px white;
}
/* chrome hack: https://stackoverflow.com/a/33581813 */
h1, h2 {
-webkit-filter: drop-shadow(4px 4px 1px #fff);
text-shadow: 4px 4px 1px #fff;
}
.reveal a {
color: #f009;
}
.reveal a:hover {
color: #f00;
}
.reveal code {
padding-top: 0.2em;
padding-bottom: 0.2em;
margin: 0;
font-size: 85%;
background-color: rgba(255, 255, 255, 0.46);
border-radius: 3px;
}
.reveal blockquote {
width: 90%;
border-left: 10px solid #f00;
background: white;
}
.more-visibility {
color: #212121;
text-shadow: 1px 1px white;
}
/**
.reveal {
color: #000;
}**/
.reveal .slide-background-content {
background-color: #fff;
color: #131313;
}
}
</style>
# wp-ops
## Monitoring & Alerting
<!-- .slide: data-background="https://i.imgur.com/JNMeUo1.jpg" -->
<!-- https://go.epfl.ch/wp-ops-prez-monitoring-alerting -->
<small class="more-visibility">EPFL IDEV-FSD (Grégory Charmier et Nicolas Borboën), octobre 2020<br/><https://go.epfl.ch/wp-ops-prez-monitoring-alerting></small>
---
## Overview
<!-- .slide: data-background="https://i.imgur.com/PYz8qhF.jpg" -->
----
### Agenda
* À propos
* Présentation du résultat
* Fonctionnement
* Alerting
* Démo
----
### But de la présentation
> Présentation du travail sur le monitoring et l'alerting de la plateforme Wordpress de l'EPFL.
----
### But du monitoring
> En tant que **service manager**, j'aimerais avoir une **vue d'ensemble** de l'état des 700 sites Wordpress.
----
### But de l'alerting
> En tant que **webmaster** d'un site j'aimerais recevoir un **mail** lorsque mon site est «**down**» pendant plus de 5 minutes.
> En tant que **service manager**, j'aimerais être **avertis** lorsqu'un site n'a **pas été sauvegardé** depuis plus d'un jour.
---
## Présentation du résultat
<!-- .slide: data-background="https://i.imgur.com/kSLlzqm.jpg" -->
----
### Grafana / état des sites

----
### Grafana / répartition des langues

----
### Grafana / état des pages

----
### Grafana / détail des sites

<https://grafana-tst.idev-fsd.ml/d/WPDetails/wordpress-detail?var-wp_site=https://www.epfl.ch/labs/dcsl/>
----
### Démo Grafana
→ grafana.idev-fsd.ml (login avec github)
----
### Question
> Quelles seraient pour vous les visualisations les plus utiles dans vos activités de tous les jours ?
---
## Fonctionnement
<!-- .slide: data-background="https://i.imgur.com/gzCjwSa.jpg" -->
----
### OpenShift
> [OpenShift](https://fr.wikipedia.org/wiki/OpenShift) est une plate-forme as a service de la société Red Hat qui permet de déployer des projets dans des containers. Pour ce faire, OpenShift utilise les technologies Docker et Kubernetes.
----
### NOC
> Un [centre d'opérations du réseau](https://fr.wikipedia.org/wiki/Centre_d%27op%C3%A9rations_du_r%C3%A9seau) (en anglais, **N**etwork **O**perations **C**enter, abrégé NOC) est un site à partir duquel s'exerce la surveillance et le contrôle d'un réseau d'ordinateurs, d'un réseau de télécommunications ou d'un réseau de satellites.
----
### Vue globale des différents composants

----
### Conteneurs dans les pods prometheus et pushgateways d'OpenShift

----
### Détails des containers du NOC

---
## Alerting
<!-- .slide: data-background="https://i.imgur.com/yDufOyn.jpg" -->
----
### Grafana

----
### Alerting

----
### Concepts de base
* alerts
* silences
* fragmentation / escalation
* fatigue
----
### Alert manager
> The [Alertmanager](https://prometheus.io/docs/alerting/latest/alertmanager/) handles alerts sent by client applications such as the Prometheus server. It takes care of deduplicating, grouping, and routing them to the correct receiver integration such as email, PagerDuty, or OpsGenie. It also takes care of silencing and inhibition of alerts.
----
### Alert TG Bot

----
### Alert TG Bot
> Cette application [node.js](https://nodejs.org) fait le lien entre l'**Alertmanager** et **Telegram**. Elle fait office de `receiver` et permet de sélectionner le groupe Telegram destinataire d'une alerte.
---
## Démo
<!-- .slide: data-background="https://i.imgur.com/TLz4CKV.jpg" -->
----
### Dive-in
> "Dive-in" dans les "boîtes", de **grafana** au prober, en passant par le **pushgateway** et les **blackbox** exporters.
----
### Plan de démo
<small>
<ul>
<li>Étant donné le site <a href="https://www.epfl.ch/campus/service/canari">canari</a></li>
<li>Montrer sa "vue" dans les dashboards général et détails de Grafana</li>
<li>Éventuellement relancer un backup → vue détails mise à jour</li>
<li>Modifier le index.php</li>
<li>Attendre 2 minutes → alerte sur Telegram</li>
</ul>
</small>
---
## Discussion et fin
<!-- .slide: data-background="https://i.imgur.com/jUbsbSE.jpg" -->
{"metaMigratedAt":"2023-06-16T18:55:11.300Z","metaMigratedFrom":"YAML","title":"WP-OPS : Monitoring et Alerting","breaks":true,"description":"Présentation \"wp-ops\" sur le montoring et l\\'alerting","slideOptions":"{\"theme\":\"black\",\"spotlight\":{\"enabled\":true},\"progress\":true,\"transition\":\"slide\",\"transitionSpeed\":\"fast\"}","contributors":"[{\"id\":\"98cf1d10-5049-49ca-9160-3f2e67fc1067\",\"add\":7223,\"del\":5}]"}