SlideShare a Scribd company logo
truls jørgensen
johnny horvi og
monitoring
continuous
truls jørgensen
johnny horvi
javazone 2016
og
monitoring
continuous
monitoring
s
“å observere, ta opp eller oppdage
en hendelse eller tilstand
med et instrument
uten å påvirke den.”
monitoring
“å observere, ta opp eller oppdage
en hendelse eller tilstand
med et instrument
uten å påvirke den.”
40
80
120
160
200
0 10 20 30 40 50 60
6
5
4
3
2
Continuous monitoring
Continuous monitoring
114
truls
johnny
Prod
Dev
Test
Staging
Prod
!
dev
"
#
app
ny
monitoreringsløsning !
nitoreringsløsning !
nitoreringsløsning ?
automatisk
må kunne settes opp
tilgjengelig
må være
for alle
i alle miljøer
automatisk
automatisk
tilgjengelig
veie lite
må
og påvirke
applikasjonene
minimalt
automatisk
tilgjengelig
lettvekt
on site
må kunne kjøres
automatisk
tilgjengelig
lettvekt
on site
egne
metrikker
må være enkelt for
applikasjoner å lage
automatisk
tilgjengelig
lettvekt
on site
egne
metrikker
komponere
må være enkelt å
og bytte med
andre verktøy
automatisk
tilgjengelig
lettvekt
on site
egne
metrikker
komponerbar
open source
foretrekker
automatisk
tilgjengelig
lettvekt
on site
egne
metrikker
komponerbar
open
source
ulike
plattformer
må kunne brukes på
automatisk
tilgjengelig
lettvekt
on site
egne
metrikker
komponerbar
open
source
ulike
plattformer
hvor
vanskelig
kan det være?
hvor
vanskelig
kan det være?
samle
lagre
vise
samle
lagre
vise
samle
lagre
vise
samle
lagre
vise
samle
lagre
vise
kø
sammenstille
$
samle
lagre
vise
kø
sammenstille
sensu
server client
rabbitMQ redis
api
%
$
samle
lagre
vise
kø
sammenstille
$
influxDB
samle
lagre
vise
kø
sammenstille
$
grafana
samle
lagre
vise
kø
sammenstille
$
$ $ $ $ $
…
…
4000
6
$
$
CPU
Disk
Nettverk
Minne
JVM
IO
#
$
sensu client applikasjon
&
push me
#
$
sensu client applikasjon
#
$
SensuClient.sendEvent(
"nySykmelding.event",
ImmutableMap.of("value", 1)
);
sensu client applikasjon
$
#
&
pull me
sensu client applikasjon
#
 ~ 
{
"checks":{
"cpu_metrics": {

"command": "/etc/sensu/plugins/metrics/cpu-metrics.rb",
"interval": 20,

"handlers": [ "influxdb" ]

}
}
}
cat /etc/sensu/conf.d/cpu_metrics.json
$
#
 ~  /etc/sensu/plugins/metrics/cpu-metrics.rb
$
cpu.user 0.40 1472720920
cpu.nice 0.00 1472720920
cpu.system 0.20 1472720920
cpu.idle 99.20 1472720920
cpu.iowait 0.20 1472720920
cpu.irq 0.00 1472720920
cpu.softirq 0.00 1472720920
cpu.steal 0.00 1472720920
cpu.guest 0.00 1472720920
#
cpu.user 0.40 1472720920
cpu.nice 0.00 1472720920
cpu.system 0.20 1472720920
cpu.idle 99.20 1472720920
cpu.iowait 0.20 1472720920
cpu.irq 0.00 1472720920
cpu.softirq 0.00 1472720920
cpu.steal 0.00 1472720920
cpu.guest 0.00 1472720920
 ~  /etc/sensu/plugins/metrics/cpu-metrics.rb
$
'
cpu.user 0.40 1472720920
cpu.nice 0.00 1472720920
cpu.system 0.20 1472720920
cpu.idle 99.20 1472720920
cpu.iowait 0.20 1472720920
cpu.irq 0.00 1472720920
cpu.softirq 0.00 1472720920
cpu.steal 0.00 1472720920
#
$
"tags": {

"environment": "p",

"application": "syfoservice",

"hostname": "a00069.adeo.no"

}
'
cpu.user 0.40 1472720920
cpu.nice 0.00 1472720920
cpu.system 0.20 1472720920
cpu.idle 99.20 1472720920
cpu.iowait 0.20 1472720920
cpu.irq 0.00 1472720920
cpu.softirq 0.00 1472720920
cpu.steal 0.00 1472720920
"tags": {

"environment": "p",

"application": "syfoservice",

"hostname": "a00069.adeo.no"

'
#
$
$ $ $ $
…
…
'
'
'
'
$
cpu.user 0.40 1472720920
cpu.nice 0.00 1472720920
cpu.system 0.20 1472720920
cpu.idle 99.20 1472720920
cpu.iowait 0.20 1472720920
cpu.irq 0.00 1472720920
cpu.softirq 0.00 1472720920
cpu.steal 0.00 1472720920
cpu.guest 0.00 1472720920
"tags": {

"environment": "p",

"application":
"syfoservice",

"hostname": "a00069.adeo.no"

'
$
…
$
cpu.user 0.40 1472720920
cpu.nice 0.00 1472720920
cpu.system 0.20 1472720920
cpu.idle 99.20 1472720920
cpu.iowait 0.20 1472720920
cpu.irq 0.00 1472720920
cpu.softirq 0.00 1472720920
cpu.steal 0.00 1472720920
cpu.guest 0.00 1472720920
"tags": {

"environment": "p",

"application": "syfoservice",

"hostname": "a00069.adeo.no"

}
'
$
cpu.user 0.40 1472720920
cpu.nice 0.00 1472720920
cpu.system 0.20 1472720920
cpu.idle 99.20 1472720920
cpu.iowait 0.20 1472720920
cpu.irq 0.00 1472720920
cpu.softirq 0.00 1472720920
cpu.steal 0.00 1472720920
cpu.guest 0.00 1472720920
(
github.com/jhrv/sensu-influxdb-extension
"tags": {

"environment": "p",

"application": "syfoservice",

"hostname": "a00069.adeo.no"

}
$
cpu.user 0.40 1472720920
cpu.nice 0.00 1472720920
cpu.system 0.20 1472720920
cpu.idle 99.20 1472720920
cpu.iowait 0.20 1472720920
cpu.irq 0.00 1472720920
cpu.user 0.40 1472720920 "tags": {

"environment": "p",

"application": "syfoservice",

"hostname": "a00069.adeo.no"

}
(
influxdb lineprotocol
fields
key tags timestamp
$
cpu.user 0.40 1472720920
cpu.nice 0.00 1472720920
cpu.system 0.20 1472720920
cpu.idle 99.20 1472720920
cpu.iowait 0.20 1472720920
cpu.irq 0.00 1472720920
cpu.user 0.40 1472720920 "tags": {

"environment": "p",

"application": "syfoservice",

"hostname": "a00069.adeo.no"

}
environment
application
hostname
p
a00069.adeo.no
(
konvertering til lineprotocol
syfoservice
,
fields
key tags timestamp
,
$
cpu.user 0.40 1472720920
cpu.nice 0.00 1472720920
cpu.system 0.20 1472720920
cpu.idle 99.20 1472720920
cpu.iowait 0.20 1472720920
cpu.irq 0.00 1472720920
(
konvertering til lineprotocol
fields timestamp
key tags
cpu.user 0.40 1472720920
, value=
"tags": {

"environment": "p",

"application": "syfoservice",

"hostname": "a00069.adeo.no"

}
environment
application
hostname
p
syfoservice
a00069.adeo.no
,
$
cpu.user 0.40 1472720920
cpu.nice 0.00 1472720920
cpu.system 0.20 1472720920
cpu.idle 99.20 1472720920
cpu.iowait 0.20 1472720920
cpu.irq 0.00 1472720920
(
konvertering til lineprotocol
fields timestamp
key tags
cpu.user 0.40 1472720920
environment application hostname
p syfoservice a00069.adeo.no
, = , = , = value=
"tags": {

"environment": "p",

"application": "syfoservice",

"hostname": "a00069.adeo.no"

}
$ (
sammenstilling
cpu.user 0.40 1472720920
environment application hostname
p syfoservice a00069.adeo.no
, = , = , = value=
….…
2000
nySykmelding.event,environment=p,application=syfoservice,hostname=a06969.adeo.no value=1 147272099
cpu.nice,environment=p,application=syfoservice,hostname=a06969.adeo.no value=0.00 1472720920
cpu.idle,environment=p,application=syfoservice,hostname=a06969.adeo.no value=0.00 1472720920
cpu.system,environment=p,application=syfoservice,hostname=a06969.adeo.no value=0.00 1472720920
$
'
http
cpu.user 0.40 1472720920
environment application hostname
p syfoservice a00069.adeo.no
, = , = , = value=
….…2000
nySykmelding.event,environment=p,application=syfoservice,hostname=a06969.adeo.no value=1 147272099
cpu.nice,environment=p,application=syfoservice,hostname=a06969.adeo.no value=0.00 1472720920
cpu.idle,environment=p,application=syfoservice,hostname=a06969.adeo.no value=0.00 1472720920
cpu.system,environment=p,application=syfoservice,hostname=a06969.adeo.no value=0.00 1472720920
….…
2000
nySykmelding.event,environment=p,application=syfoservice,hostname=a06969.adeo.no value=1 147272099
cpu.nice,environment=p,application=syfoservice,hostname=a06969.adeo.no value=0.00 1472720920
cpu.idle,environment=p,application=syfoservice,hostname=a06969.adeo.no value=0.00 1472720920
cpu.system,environment=p,application=syfoservice,hostname=a06969.adeo.no value=0.00 1472720920
cpu.user
0.40 1472720920
environment application hostname
p syfoservice a00069.adeo.no =
value=
$
'
http
$
'
'
'
~700 000 000 datapunkter/dag
$ $ $ $
…
…
~150GB /år
$
/query?q=select mean(‘value’)
from nySykmelding.event …
…
/write?db=metrics…
$
$
114
Continuous monitoring
114
114
114
deploy deploy deploy
Continuous monitoring
Continuous monitoring
Continuous monitoring
Continuous monitoring
automatisk
tilgjengelig
lettvekt
on site
egne
metrikker
komponerbar
open
source
ulike
plattformer
det som var
viktig
for oss
det som var
viktig
for oss
$ $ $ $
…
…
Continuous monitoring
Continuous monitoring
Continuous monitoring
#
@j_hrv
Johnny Horvi
@trulsjor
Truls Jørgensen

More Related Content

PDF
DomCode 2015 - Abusing phones to make the internet of things
PDF
DAHO.AM 2015 - Abusing phones to make the internet of things
PDF
The Monitoring Playground
PDF
Tick Stack - Listen your infrastructure and please sleep
PDF
Fine grained monitoring
PPTX
Development and Applications of Distributed IoT Sensors for Intermittent Conn...
PDF
IoT ( M2M) - Big Data - Analytics: Emulation and Demonstration
PDF
Optimising for Fast Flow in Norway's Largest Bureaucracy04042022.pdf
DomCode 2015 - Abusing phones to make the internet of things
DAHO.AM 2015 - Abusing phones to make the internet of things
The Monitoring Playground
Tick Stack - Listen your infrastructure and please sleep
Fine grained monitoring
Development and Applications of Distributed IoT Sensors for Intermittent Conn...
IoT ( M2M) - Big Data - Analytics: Emulation and Demonstration
Optimising for Fast Flow in Norway's Largest Bureaucracy04042022.pdf

More from Truls Jørgensen (11)

PDF
Smidig i coronakrise
PDF
Open source all the offentlig things
PDF
Software er politikk
PDF
From 4 releases a year to once every other minute
PDF
Alignment in the age of autonomy
PDF
The systems behind the best welfare state in the world
PDF
Systemene bak verdens beste velferdsstat
PDF
Git datamodell
PDF
Testdrevet javautvikling på objektorienterte skinner
PPTX
Android101 : Introduksjon til Android
PPT
Produktive Utviklere Smidig2009
Smidig i coronakrise
Open source all the offentlig things
Software er politikk
From 4 releases a year to once every other minute
Alignment in the age of autonomy
The systems behind the best welfare state in the world
Systemene bak verdens beste velferdsstat
Git datamodell
Testdrevet javautvikling på objektorienterte skinner
Android101 : Introduksjon til Android
Produktive Utviklere Smidig2009
Ad

Recently uploaded (20)

PPTX
Machine Learning_overview_presentation.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
A Presentation on Artificial Intelligence
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPT
Teaching material agriculture food technology
PDF
Machine learning based COVID-19 study performance prediction
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Machine Learning_overview_presentation.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
A Presentation on Artificial Intelligence
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Encapsulation_ Review paper, used for researhc scholars
Reach Out and Touch Someone: Haptics and Empathic Computing
The Rise and Fall of 3GPP – Time for a Sabbatical?
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Teaching material agriculture food technology
Machine learning based COVID-19 study performance prediction
Diabetes mellitus diagnosis method based random forest with bat algorithm
MIND Revenue Release Quarter 2 2025 Press Release
Programs and apps: productivity, graphics, security and other tools
Digital-Transformation-Roadmap-for-Companies.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
NewMind AI Weekly Chronicles - August'25-Week II
Big Data Technologies - Introduction.pptx
Group 1 Presentation -Planning and Decision Making .pptx
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Ad

Continuous monitoring