Machine learning for machine data David Andrzejewski - - - PowerPoint PPT Presentation

machine learning for machine data
SMART_READER_LITE
LIVE PREVIEW

Machine learning for machine data David Andrzejewski - - - PowerPoint PPT Presentation

Machine learning for machine data David Andrzejewski - @davidandrzej Data Sciences, Sumo Logic Strata Conference Machine Data Track February 13, 2014 1


slide-1
SLIDE 1

Machine learning for machine data ¡

1 ¡

David ¡Andrzejewski ¡-­‑ ¡@davidandrzej ¡ Data ¡Sciences, ¡Sumo ¡Logic ¡ Strata ¡Conference ¡– ¡Machine ¡Data ¡Track ¡ February ¡13, ¡2014 ¡ ¡ ¡

slide-2
SLIDE 2

This ¡talk: ¡Machine ¡Learning ¡+ ¡Machine ¡Data ¡= ¡Awesome! ¡

2 ¡

YES ¡

– overview ¡of ¡log ¡data ¡ – solving ¡log ¡data ¡problems ¡with ¡machine ¡learning ¡ – specific ¡examples ¡

  • (mostly) ¡Sumo ¡Logic-­‑related ¡
  • customer ¡use ¡cases ¡

– general ¡lessons ¡learned ¡ ¡

slide-3
SLIDE 3

This ¡talk: ¡Machine ¡Learning ¡+ ¡Machine ¡Data ¡= ¡Awesome! ¡

3 ¡

NO ¡(or, ¡not ¡much) ¡

– Sumo ¡Logic ¡deep ¡dive ¡ ¡ – Tech ¡stack ¡talk ¡ ¡

  • In-­‑memory ¡Hadoop ¡for ¡real-­‑Ume ¡Cassandra ¡SQL ¡in ¡hybrid ¡clouds ¡

– Big ¡data ¡“shock ¡and ¡awe” ¡ ¡

  • 800 ¡yo[abytes ¡/ ¡second ¡ZOMG!!11!! ¡

– Algorithm ¡shootout ¡ ¡

  • Deep ¡learning ¡vs ¡random ¡forests ¡vs ¡SVMs ¡vs ¡coin ¡flips ¡vs ¡... ¡

– Extreme ¡math ¡ ¡

≥ i) The estimate E is asymptotically almost unbiased in the sense that 1 nEn(E) =

n→∞ 1 + δ1(n) + o(1), where |δ1(n)| < 5 · 10−5 as soon as m ≥ 16.

p

slide-4
SLIDE 4

Data ¡sciences ¡@ ¡Sumo ¡Logic ¡ Co-­‑organizer ¡@ ¡SF ¡ML ¡Meetup ¡ Previous ¡

– Post-­‑doc ¡in ¡knowledge ¡discovery ¡

Even ¡more ¡previous ¡machine ¡ ¡

data ¡research ¡projects ¡ ¡

– University ¡of ¡Wisconsin-­‑-­‑Madison ¡ – Microsog ¡Research ¡

Context: ¡me ¡

4 ¡

−1 1 −0.6 −0.4 −0.2 0.2 0.4 0.6 0.8 −1 −0.5 0.5 PCA3 PCA2 PCA1 254 bug1 runs 106 bug3 runs 147 bug4 runs 329 bug5 runs 206 bug8 runs 186 other runs

slide-5
SLIDE 5

Context: ¡Sumo ¡Logic ¡

5 ¡

“Turning Machine Data Into IT and Business Insights” ¡ Learn, ¡classify, ¡predict ¡ Search, ¡monitor, ¡visualize ¡

slide-6
SLIDE 6

Context: ¡Sumo ¡Logic ¡

6 ¡

“Turning Machine Data Into IT and Business Insights” ¡ Learn, ¡classify, ¡predict ¡ Search, ¡monitor, ¡visualize ¡

slide-7
SLIDE 7

Anatomy ¡of ¡a ¡log ¡message: ¡Five ¡W’s ¡

7 ¡

slide-8
SLIDE 8

Anatomy ¡of ¡a ¡log ¡message: ¡Five ¡W’s ¡

8 ¡

When? ¡Timestamp ¡with ¡Ume ¡zone ¡

slide-9
SLIDE 9

Anatomy ¡of ¡a ¡log ¡message: ¡Five ¡W’s ¡

9 ¡

When? ¡Timestamp ¡with ¡Ume ¡zone ¡ Where? ¡Host, ¡module, ¡code ¡locaUon ¡

slide-10
SLIDE 10

Anatomy ¡of ¡a ¡log ¡message: ¡Five ¡W’s ¡

10 ¡

When? ¡Timestamp ¡with ¡Ume ¡zone ¡ Where? ¡Host, ¡module, ¡code ¡locaUon ¡ Who? ¡AuthenUcaUon ¡context ¡

slide-11
SLIDE 11

Anatomy ¡of ¡a ¡log ¡message: ¡Five ¡W’s ¡

11 ¡

When? ¡Timestamp ¡with ¡Ume ¡zone ¡ Where? ¡Host, ¡module, ¡code ¡locaUon ¡ Who? ¡AuthenUcaUon ¡context ¡ What? ¡Log ¡level ¡and ¡key-­‑value ¡pairs ¡

slide-12
SLIDE 12

What’s ¡missing ¡

12 ¡

slide-13
SLIDE 13

Traversing ¡the ¡stack ¡

Sumo ¡Logic ¡ConfidenUal ¡ 13 ¡

Custom ¡App ¡Code ¡ Server ¡/ ¡OS ¡ VirtualizaUon ¡ Databases ¡ Network ¡ Open ¡Source ¡Sogware ¡ Middleware ¡

12/20/2011 17:23:44 PST [user=234fsf] failed transaction, sessionid:2F0A232324, [host=pay002.sjc] amount=1725.00 12/20/11 17:23:34 AMQ7163: WebSphere MQ job number 18429 started FOR client_session=2F0A232324. 12202011 17:23:27 /usr/local/build/mysql/libexec/mysqld: Abnormal shutdown [18429] 20-12-2011 17:23:19 database-host login[3866]: DEAD_PROCESS: 18429 ttys000 Dec 20, 2011 17:22:14,,, message=Created virtual machine user-3 on esxi01.office.thedomain.com <134>Dec 20 2011 17:22:12: %PIX-6-106100: access-list inside_access_out denied tcp inside/68.162.72.163(4326) ->

  • utside/45.200.244.124(3127) hit-cnt 1(first hit)

66.249.67.24 - - [20/Dec/2011:17:23:40 -0700] ”POST /APP/ Order.php HTTP/1.1" 304 146 "-" SESSION=2F0A232324

Customer ¡ID ¡ Session ¡ID ¡ Job ¡number ¡ Process ¡ID ¡

Root ¡cause! ¡

slide-14
SLIDE 14

Enhanced ¡visibility ¡into ¡machine ¡behaviors ¡

Compliance ¡

– OperaUonal ¡(SLA) ¡ – Regulatory ¡(audits) ¡ ¡ – Security ¡ ¡

Availability ¡/ ¡performance ¡

– Faster ¡MTTR ¡

Business ¡insights ¡($$$) ¡

Log ¡use ¡cases ¡– ¡“organizaUonal ¡percepUon” ¡

14 ¡

slide-15
SLIDE 15

(wildly) ¡varying ¡formats ¡ ¡

– prinq, ¡JSON, ¡XML, ¡Windows, ¡X-­‑delimited, ¡... ¡

Specialized ¡knowledge ¡ Noise ¡ Cascading ¡failures ¡

¡

Log ¡challenges ¡ ¡

15 ¡

[2008-05-07 09:50:08.450 'App' 3560 verbose] [VpxdHeartbeat] Invalid heartbeat from 10.17.218.46

slide-16
SLIDE 16

“A ¡distributed ¡system ¡is ¡one ¡in ¡which ¡the ¡failure ¡of ¡a ¡ computer ¡you ¡didn't ¡even ¡know ¡existed ¡can ¡render ¡ your ¡own ¡computer ¡unusable.” ¡-­‑ ¡Leslie ¡Lamport ¡ ¡

Complexity ¡

16 ¡

Rive

1 3 1 1

Pimlico Imperial Goodge Street Barbican Square et

  • n

Green Park Victoria Blackfriars Mansion House Temple Cannon Street Oxford Circus Bond Street Westminster Piccadilly Circus Charing Cross Holborn Monument Moorgate Leicester Square London Bridge

  • St. Paul’s

Hyde Park Corner Knightsbridge Queensway Marble Arch South sington Sloane Square Covent Garden Bank Chancery Lane Lancaster Gate

Fenchu

Gloucester

  • St. James’s

Park Southwark Embankment Waterloo Tottenham Court Road

slide-17
SLIDE 17

Logs: ¡like ¡“computer ¡tweets” ¡ Twi[er ¡2013* ¡ ¡

– Peak ¡@ ¡~144k ¡TPS ¡ ¡ – Avg ¡~6k ¡tweets ¡/ ¡second ¡

Log ¡data ¡

– Example: ¡1 ¡TB ¡/ ¡day ¡ ¡ – Avg ¡~25k ¡logs ¡/ ¡second ¡

“OMG ¡java.lang.NullPointerExcepUon ¡#fail” ¡ ¡

17 ¡ * https://blog.twitter.com/2013/new-tweets-per-second-record-and-how ¡

slide-18
SLIDE 18

Systems ¡that ¡learn ¡from ¡experience ¡

18 ¡

slide-19
SLIDE 19

19 ¡

Unsupervised ¡clustering ¡

Given: ¡set ¡of ¡items ¡ Do: ¡group ¡similar ¡items

¡

slide-20
SLIDE 20

20 ¡

Unsupervised ¡clustering ¡

Given: ¡set ¡of ¡items ¡ Do: ¡group ¡similar ¡items

¡

slide-21
SLIDE 21

Too ¡many ¡logs! ¡“data ¡disorientaUon” ¡

¡ ¡

~60k ¡results: ¡30 ¡minutes, ¡one ¡component ¡

slide-22
SLIDE 22

DisUll ¡logs ¡down ¡to ¡underlying ¡structure ¡

slide-23
SLIDE 23

LogReduce: ¡results ¡"compressed” ¡~1000x ¡ ¡

¡ ¡

slide-24
SLIDE 24

printf("Health status check: %s is %s”, hostid, hoststatus) Health status check: zim-5 is OK Health status check: gir-3 is OK Health status check: gir-2 is TIMED OUT Health status check: dib-1 is OK

In ¡the ¡beginning, ¡there ¡was ¡the ¡prinq() ¡

¡ ¡

Log ¡generaUon ¡

slide-25
SLIDE 25

printf("Health status check: %s is %s”, hostid, hoststatus) Health status check: zim-5 is OK Health status check: gir-3 is OK Health status check: gir-2 is TIMED OUT Health status check: dib-1 is OK Health status check: *** is ***

Reverse ¡engineering ¡prinq() ¡

¡ ¡ ¡ ¡

Log ¡generaUon ¡

“magic” ¡

slide-26
SLIDE 26

26 ¡

  • 1. Define ¡string ¡distance ¡funcKon ¡(e.g., ¡Левенште́йн) ¡

¡ ¡ ¡ ¡ ¡ ¡

  • 2. Do ¡distance-­‑based ¡clustering ¡ ¡

¡

  • Unsupervised ¡clustering ¡

Given: ¡log ¡messages ¡ Do: ¡group ¡by ¡“signature” ¡

slide-27
SLIDE 27

Drill-­‑down ¡into ¡the ¡original ¡raw ¡logs ¡

¡ ¡

slide-28
SLIDE 28

28 ¡

ParKally ¡supervised ¡clustering ¡

Given: ¡set ¡of ¡items ¡+ ¡side ¡info ¡ Do: ¡group ¡similar ¡items ¡

slide-29
SLIDE 29

29 ¡

ParKally ¡supervised ¡clustering ¡

Given: ¡set ¡of ¡items ¡+ ¡side ¡info ¡ Do: ¡group ¡similar ¡items ¡

slide-30
SLIDE 30

Too ¡many ¡wildcards! ¡

30 ¡

slide-31
SLIDE 31

“Hint” ¡from ¡human ¡user ¡

31 ¡

slide-32
SLIDE 32

Not ¡enough ¡wildcards! ¡

32 ¡

slide-33
SLIDE 33

“Hint” ¡from ¡human ¡user ¡

33 ¡

slide-34
SLIDE 34

34 ¡

Learning ¡to ¡rank ¡

Given: ¡set ¡of ¡items, ¡historical ¡data ¡ Do: ¡rank ¡by ¡“relevance” ¡

slide-35
SLIDE 35

Two ¡pages ¡is ¡sUll ¡too ¡many! ¡

35 ¡

slide-36
SLIDE 36

36 ¡

Learning ¡to ¡rank ¡

Given: ¡

signatures, ¡ user ¡acUvity ¡

Do: ¡rank ¡by ¡

“relevance” ¡

slide-37
SLIDE 37

Site ¡“acUng ¡weird” ¡ InvesUgaUon ¡with ¡LogReduce ¡

– error ¡logs ¡è ¡issue ¡with ¡content ¡push/publish ¡workflow ¡

  • root ¡cause ¡

– 50 ¡minutes ¡later: ¡“object ¡missing” ¡errors ¡serving ¡content ¡

  • user-­‑visible ¡outage ¡

Benefits ¡

– rapidly ¡“skim” ¡the ¡logs ¡ – create ¡an ¡alert ¡

True ¡story: ¡troubleshooUng ¡@ ¡digital ¡media ¡co. ¡ ¡

37 ¡

slide-38
SLIDE 38

¡

Domains ¡

– financial ¡services ¡ – SaaS ¡vendors ¡

Use ¡cases ¡

– Availability ¡/ ¡performance ¡

  • Mean ¡Ume ¡to ¡invesUgaUon ¡(MTTI) ¡= ¡“hours ¡to ¡minutes” ¡

– Security ¡

  • Quickly ¡bubble ¡up ¡unusual ¡logs ¡

More ¡true ¡stories ¡

38 ¡

slide-39
SLIDE 39

General ¡lessons ¡

39 ¡

slide-40
SLIDE 40

¡

Combat ¡“data ¡disorientaUon” ¡

¡

General ¡lessons ¡

40 ¡

slide-41
SLIDE 41

¡

Combat ¡“data ¡disorientaUon” ¡ Surface ¡latent ¡structure ¡ ¡

¡

¡

General ¡lessons ¡

41 ¡

slide-42
SLIDE 42

¡

Combat ¡“data ¡disorientaUon” ¡ Surface ¡latent ¡structure ¡ ¡ Link ¡to ¡underlying ¡raw ¡data ¡

¡

General ¡lessons ¡

42 ¡

slide-43
SLIDE 43

¡

Combat ¡“data ¡disorientaUon” ¡ Surface ¡latent ¡structure ¡ ¡ Link ¡to ¡underlying ¡raw ¡data ¡ Empower ¡user ¡to ¡improve ¡results ¡

¡

¡

General ¡lessons ¡

43 ¡

slide-44
SLIDE 44

unknown ¡unknowns ¡

44 ¡

slide-45
SLIDE 45

45 ¡

Outlier ¡detecKon ¡

Given: ¡data ¡points ¡ Do: ¡idenUfy ¡outliers ¡

slide-46
SLIDE 46

46 ¡

Outlier ¡detecKon ¡

Given: ¡data ¡points ¡ Do: ¡idenUfy ¡outliers ¡

slide-47
SLIDE 47

47 ¡

Health check OK Request processed Txn timeout, retry ¡

Anomaly ¡detecKon ¡

Given: ¡log ¡data ¡ ¡ Do: ¡flag ¡anomalies ¡

slide-48
SLIDE 48

48 ¡

Health check OK Request processed Txn timeout, retry ¡

Anomaly ¡detecKon ¡

Given: ¡log ¡data ¡ ¡ Do: ¡flag ¡anomalies ¡

slide-49
SLIDE 49

InvesUgate ¡and ¡annotate ¡events ¡

49 ¡

logs ¡ signatures ¡ RAW ¡DATA ¡ HUMAN ¡

slide-50
SLIDE 50

InvesUgate ¡and ¡annotate ¡events ¡

50 ¡

logs ¡ signatures ¡ RAW ¡DATA ¡ HUMAN ¡

slide-51
SLIDE 51

InvesUgate ¡and ¡annotate ¡events ¡

51 ¡

logs ¡ signatures ¡ event ¡ RAW ¡DATA ¡ HUMAN ¡

slide-52
SLIDE 52

InvesUgate ¡and ¡annotate ¡events ¡

52 ¡

logs ¡ signatures ¡ event ¡ RAW ¡DATA ¡ HUMAN ¡ Umeline ¡ / ¡alerts ¡

slide-53
SLIDE 53

53 ¡

Supervised ¡classificaKon ¡

Given: ¡labeled ¡data ¡points ¡ Do: ¡predict ¡future ¡labels ¡

slide-54
SLIDE 54

54 ¡

Supervised ¡classificaKon ¡

Given: ¡labeled ¡data ¡points ¡ Do: ¡predict ¡future ¡labels ¡

slide-55
SLIDE 55

55 ¡

Supervised ¡classificaKon ¡

Given: ¡log ¡data, ¡ ¡

annotated ¡events ¡

Do: ¡classify ¡new ¡ ¡

  • ccurrences ¡

event ¡ Umeline ¡ / ¡alerts ¡

slide-56
SLIDE 56

True ¡stories ¡

56 ¡

SSH ¡problems ¡

– configuraUon ¡errors ¡ – script ¡user ¡auth ¡failures ¡

PotenUal ¡security ¡events ¡

– surge ¡of ¡failed ¡logins ¡

Unhappy ¡infrastructure ¡

– Oracle ¡ ¡ – VMware ¡

slide-57
SLIDE 57

¡ ¡

Explain ¡algorithm ¡“decisions” ¡

– why ¡was ¡this ¡flagged ¡as ¡anomaly? ¡

¡

More ¡general ¡lessons ¡

57 ¡

slide-58
SLIDE 58

¡ ¡

Explain ¡algorithm ¡“decisions” ¡

– why ¡was ¡this ¡flagged ¡as ¡anomaly? ¡

Link ¡to ¡underlying ¡raw ¡data ¡

– (AGAIN) ¡

¡

More ¡general ¡lessons ¡

58 ¡

slide-59
SLIDE 59

¡ ¡

Explain ¡algorithm ¡“decisions” ¡

– why ¡was ¡this ¡flagged ¡as ¡anomaly? ¡

Link ¡to ¡underlying ¡raw ¡data ¡

– (AGAIN) ¡

Empower ¡user ¡to ¡improve ¡results ¡

– (AGAIN) ¡

¡

More ¡general ¡lessons ¡

59 ¡

slide-60
SLIDE 60

Numerical ¡Ume-­‑series ¡data ¡ ¡

60 ¡

slide-61
SLIDE 61

61 ¡

Signal ¡decomposiKon ¡

Given: ¡Ume-­‑series ¡ Do: ¡extract ¡model ¡

components ¡

slide-62
SLIDE 62

62 ¡

Outlier ¡detecKon ¡

Given: ¡data ¡points ¡ Do: ¡idenUfy ¡outliers ¡

slide-63
SLIDE 63

63 ¡

Outlier ¡detecKon ¡

Given: ¡data ¡points ¡ Do: ¡idenUfy ¡outliers ¡

slide-64
SLIDE 64

Raw ¡ Smoothed ¡

Windowed ¡model ¡

slide-65
SLIDE 65

65 ¡

Raw ¡ Smoothed ¡ Smoothed ¡vs ¡+3σ ¡ ¡

Windowed ¡model ¡

slide-66
SLIDE 66

True ¡stories ¡

66 ¡

Financial ¡services: ¡bad ¡data ¡points ¡ Security: ¡misbehavior ¡ OperaUons: ¡alerUng ¡

¡

slide-67
SLIDE 67

¡

Yet ¡more ¡general ¡lessons ¡

67 ¡

Time-­‑series ¡data ¡ ¡

analysis ¡well-­‑studied ¡

Read ¡the ¡literature(s)! ¡

¡

slide-68
SLIDE 68

< ¡OBLIGATORY ¡PLUGS ¡> ¡

68 ¡

freesumo.com ¡

slide-69
SLIDE 69

BONUS: ¡scale-­‑out, ¡streaming ¡architecture ¡

69 ¡

logs ¡ logs ¡ logs ¡

slide-70
SLIDE 70

BONUS: ¡approximaUng ¡with ¡Count-­‑Min ¡Sketch ¡

70 ¡

slide-71
SLIDE 71

BONUS: ¡approximaUng ¡with ¡Count-­‑Min ¡Sketch ¡

71 ¡

slide-72
SLIDE 72

Approximate ¡counUng ¡with ¡Count-­‑Min ¡Sketch ¡

72 ¡