More Related Content Similar to Journée DevOps : Un outil de monitoring applicatif (20) More from Publicis Sapient Engineering (20) Journée DevOps : Un outil de monitoring applicatif1. Un outil de monitoring
applicatif
Guillaume Arnaud
@guillarnaud
2. • EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC
Ce que fait Graphite
2
Stockage Affichage
3. • EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC
Pourquoi on aime graphite
3
•injection facile!
•rendu riche!
•compatible avec beaucoup d'outils!
•administration light
4. • EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC
Ce que ne fait pas Graphite
4
Alerting Baseline
5. • EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC
Architecture
5
cache relayaggregatorcache
web
collecteur:!
!
JMXTrans!
Diamond!
Metrics!
…
:80
:2003!
:2004
SQLLite
whisper
user
user!
info
métriques
optionnel
6. • EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC
Round Robin Database
Stockage RRD
6
Taille fixe
Primary Data Point
Consolidated Data
Point
Step
event A [instant t]!
event B [instant t + 1s]!
…
1 point toutes les minutes
moyenne, min or max de!
event A, event B…
les 10 derniers jours
7. • EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC
rétention
Whisper
7
[apache_busyWorkers]
pattern = servers.www.*.workers.busyWorkers$
retentions = 15s:7d,1m:21d,15m:5y
8. • EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC
command line
Whisper
8
$ whisper-dump metric.wsp
$ whisper-create 60s:10d metric.wsp
$ whisper-fetch metric.wsp
$ whisper-info metric1.wsp metric2.wsp
$ whisper-set-aggregation-method.py metric.wsp <average|sum|last|
max|min>
$ whisper-resize metric.wsp 60s:10d
référence: https://github.com/graphite-project/whisper
9. • EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC
Alimenter Graphite
9
echo "myproject.metric 4 `date +%s`" | nc graphite 2003
Rien de plus simple
envoi par batch (pickle) sur port 2004
10. • EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC
Alimenter Graphite
10
{"servers" : [ {
"port" : "8004", "host" : "mysys.mydomain",
"queries" : [ {
"outputWriters" : [ {
"@class" : "com.g.j.m.output.GraphiteWriter",
"settings" : {"port" : 2003,"host" : "myhost",
"typeNames" : [ "name" ]}
} ],
"obj" : "Catalina:type=…,class=j.s.DataSource,name=*",
"resultAlias": "datasources",
"attr" : [ "numActive", "numIdle" ]
} ],
"numQueryThreads" : 2
} ]
}
JMXTrans
11. • EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC
Alimenter Graphite
11
Diamond
https://github.com/BrightcoveOS/Diamond
12. • EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC
Alimenter Graphite
12
Metrics
public class QueueManager {
private final Queue queue;
!
public QueueManager(MetricRegistry metrics, String name) {
this.queue = new Queue();
metrics.register(MetricRegistry.name(QueueManager.class, name, "size"),
new Gauge<Integer>() {
@Override
public Integer getValue() {
return queue.size();
}
});
}
}
http://metrics.codahale.com/
13. • EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC
Affichage
13
wildcard
target=server*.cpu
timeshift
target=server1.cpu&from=-30min&until=-10min
target=server1.cpu&target=timeShift(server1.cpu, "7d")
operations
target=sumSeries(server*.cpu, "7d")
target=derivative(gatling.hitcount)
format de sortie
target=server1.cpu&format=json
graphique
target=server*.cpu&bgcolor=blue&aeraMode=stacked
14. • EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC
Events
14
curl -X POST http://localhost -d '{"what":"deploiement 3.0",
"tags": "deploy"}'
15. • EBIA ALLIANCE = XEBIA + XEBIALABS + THIGA + UX REPUBLIC
Events
15
/render?target=drawAsInfinite(events(deploy))