Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP...

47
Monitoring 2.0 – Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

Transcript of Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP...

Page 1: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

Monitoring 2.0 – Alles im Lot?

Nico Orschel, MVP @ AIT, DE

Marc Müller, MVP @ 4tecture, CH

Page 2: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

Plan Build Release

Page 3: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

Measure

Learn

Build

4

Page 4: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

… ist ein Überbegriff für alle Arten der unmittelbaren systematischen Erfassung

(Protokollierung), Messung, Beobachtung oder

Überwachung eines Vorgangs oder Prozesses mittels technischer Hilfsmittel (zum Beispiel Langzeit-EKG) oder anderer Beobachtungssysteme. Dabei ist die wiederholte regelmäßige

Durchführung ein zentrales Element der jeweiligen Untersuchungsprogramme, um anhand von

Ergebnisvergleichen Schlussfolgerungen ziehen zu können (siehe auch Längsschnittstudie).

5

Page 5: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

6

Page 6: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

7

Page 7: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

Ziel: Primäre technische Kennzahlen vom Server

Beispiele:- CPU / Memory Utilization

- Response Time

- Transferred Data

- Data Transfer Rate (e.g MBits/sec)

- Connections

- …

8

Page 8: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

Ziel: Primäre technische Kennzahlen aus der Applikation

9

Beispiele:

- Exceptions Client

- Exceptions Server

- Stacktraces

- Non responsive external

Services (Salesforce, SAP,

CRM, Internal Services, …)

Page 9: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

Ziel: Überwachung der (Business-)Prozesse

Beispiele:- Welche Features meiner Anwendung werden

„tatsächlich“ genutzt?

- Wie intensiv werden Features genutzt?

- In welche Features müssen wir investieren?

- Wird die Anwendung aus Kundenperspektive

langsamer?10

Page 10: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

11

Page 11: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

Unser Fokus heute: Microsoft Azure ApplicationInsights

Framework zur Überwachung von Anwendungs-Telemetriedaten

Alternativen:

PreEmptive Analytics, New Relic SoftwareAnalytics

12

Page 12: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

Where do we invest next?

Show

Notifications & Insights Usage

Page 13: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

14

Page 14: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

FallstudieWebApp

15

Page 15: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

Problemstellung

Page 16: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

Enterprise

Portal

SAP

Salesforce

Navision

Ku

nd

en

WebServices

Page 17: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

Problem:

a) Zyklische Überwachung eines extern. erreichbaren Webportals

b) Seite enthält viel JavaScript Logik sowie ext. Services

Lösung: Monitoring der Verfügbarkeit über WebTests

- Aufzeichnung via VS Ultimate, Fiddler

- Direkte Ausführung via Azure Portal

Page 18: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

Testen von komplexer JavaScript Logik

JavaScript Code teilweise voneinander abhängig

Externe Services überwachen (ohne die Möglichkeit AI zu integrieren)

20

Page 19: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

Problem: a) Services ggf. schlecht via webtest überwachbarb) Daten sollen im globalen Monitoring überwacht werden

Lösung: Verwendung von anderen Testing Frameworks / CMD- CodedWebTests- Unit Tests (MSTest, Xunit,…)Reporting und Fehleranalyse durch eigene Zusatzdaten via Azure AI SDK Ausführung zyklisch via Task Scheduler/CMD

21

Page 20: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

Problem: a) Prüfen ob Kernszenarien (End2End) noch funktionieren

b) WebApp setzt intensiv auf JavaScript

Lösung: Funktionale Tests via UI oder Unit Tests (Selenium, CodedUI, ...)

Ausführung: Zyklisch via CMD / Task Scheduler

Reporting und Fehleranalyse durch eigene Zusatzdaten via Azure AI SDK

23

Page 21: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

Application Insights

24

Page 22: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

AI Telemetry for Services

WebTests Browser Server

URL

PingWebTests

Insert

Javascript

snipet

Custom

Events

MMA (default): APM

Perf, Exception,

Memory

Java: APM, Perf,

Exception

Custom

Events

Default

Server

Side

Events

Collect

Logs

Nlog

Log4Net

Trace

MMA

(custom):

Windows

Perf

Counters

Build

Events

Easy to configure: No coding, simple, fast, few clicks.

Legend:

Requires more time: could require coding, more clicks.

Page 23: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

AI Telemetry for Services

Web

TestsBrowser Server

URL

Ping

WebTest

s

Insert

Javascript

snipet

Custom

Events

MMA (default): APM

Perf, Exception,

Memory

Java: APM, Perf,

Exception

Custo

m

Events

Default

Server

Side

Events

Collect

Logs

Nlog

Log4Net

Trace

MMA

(custom):

Windows

Perf

Counters

Build

Events

Easy to configure: No coding, simple, fast, few clicks.

Legend:

Requires more time: could require coding, more clicks.

HockeyApp

Mobile, UWP,

WPF, WinForms,

Custo

m

Event

s

Collect Logs,

Exceptions,

Feedback

Page 24: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

What is Application Insights?

Telemetry is collected at each

tier: server applications and

browser1

Telemetry arrives in the

Application Insights service in the

cloud where it is processed &

stored

Get a 360° view of the application

including availability, performance

and usage patterns3

2

Page 25: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

1Outside-in monitoringURL pings and web tests from 16global points of presence

Observed user behaviorHow is the application being used?2

Developer traces and eventsWhatever the developer would like tosend to Application Insights

3

Observed application behaviorNo coding required – service dependencies,queries, response time, exceptions, logs, etc.

4

Infrastructure performanceSystem performance counters5

Page 26: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

Availability

Page 27: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

Ist meine Applikation / meine Services noch verfügbar?

Http basierte Webtests

Alert

Page 28: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

Ping auf URL WebTests

Page 29: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

Tracking

Page 30: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

JavaScript bei Page Load

Async, Queued<script type="text/javascript">

var appInsights = window.appInsights || function (config) {function r(config) { t[config] = function () { var i = arguments; t.queue.push(function () { t[config].apply(t, i) }) } } var t = { config: config }, u = document, e =

window, o = "script", s = u.createElement(o), i, f; for (s.src = config.url || "//az416426.vo.msecnd.net/scripts/a/ai.0.js", u.getElementsByTagName(o)[0].parentNode.appendChild(s), t.cookie = u.cookie, t.queue = [], i = ["Event", "Exception", "Metric", "PageView", "Trace"]; i.length;) r("track" + i.pop()); return r("setAuthenticatedUserContext"), r("clearAuthenticatedUserContext"), config.disableExceptionTracking || (i = "onerror", r("_" + i), f = e[i], e[i] = function(config, r, u, e, o) { var s = f && f(config, r, u, e, o); return s !== !0 && t["_" + i](config, r, u, e, o), s }), t

}({

instrumentationKey: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"});

window.appInsights = appInsights;appInsights.trackPageView();

</script>

Page 31: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

34

Page 32: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

Quelle: https://azure.microsoft.com/en-

us/documentation/articles/app-insights-api-custom-

events-metrics/

Beispiele: TrackPageView, TrackEvent, TrackMetric,

TrackException, TrackRequest, TrackTrace,

TrackDependency

Beispiel:

var telemetryClient = new TelemetryClient();telemetryClient.TrackEvent($"Generating {numberOfBooks} books");

Page 33: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

Performance

Page 34: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

Überwachung des Ausführungsprozesses

Überwachung der Performance Indikatoren

Installation auf Zielsystem notwendig

Page 35: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

Ergebnis – 360 Grad Monitoring

38

Page 36: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH
Page 37: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH
Page 38: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH
Page 39: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

Analyse von allen AI Daten über eigene Abfragen im Browser

Codename: Kusto

Page 40: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

43

Page 41: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

44

Page 42: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

45

Page 43: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

Power BI

46

Page 44: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

[email protected]

+49 151 55052624

AIT GmbH & Co. KGLeitzstr. 45, 70469 Stuttgart

www.aitgmbh.de

BERATUNGAgile ALM und TFS

.NET und Architektur

ENTWICKLUNGDienstleister für individuelle

Lösungen mit .NET und Azure

© AIT GmbH & Co. KG – Alle genannten und gezeigten Marken oder Warenzeichen sind eingetragene Marken oder eingetragene Warenzeichen ihrer jeweiligen Eigentümer und ggf. nicht gesondert gekennzeichnet. Aus dem Fehlen der

Kennzeichnung kann nicht geschlossen werden, daß es sich bei einem Begriff oder einem Bild nicht um eine eingetragene Marke oder ein eingetragenes Warenzeichen handelt.

Page 45: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

Marc Müller

Principal Consultant

für DevOps, ALM, TFS /VS, .NET

E-Mail: [email protected]

Webseite: http://www.4tecture.ch

Schulungen: http://4tecture.ch/trainings

Blog: http://4tecture.ch/blog

Twitter: @muellermarc

Page 46: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH
Page 47: Monitoring 2.0 Alles im Lot? · 2016. 6. 29. · Monitoring 2.0 –Alles im Lot? Nico Orschel, MVP @ AIT, DE Marc Müller, MVP @ 4tecture, CH

- https://azure.microsoft.com/en-us/documentation/articles/app-insights-analytics/

- https://azure.microsoft.com/en-us/documentation/articles/app-insights-web-monitor-performance/

- https://azure.microsoft.com/en-us/documentation/articles/app-insights-proactive-detection/