Splunk Conf 2014 - Getting the message

Damien Dallimore
Damien Dallimorehttp://www.baboonbones.com
Copyright © 2014 Splunk Inc. 
Getting the Message 
Damien Dallimore 
Dev Evangelist , CSO Office @ Splunk 
Nimish Doshi 
Principal Systems Engineer @ Splunk
Disclaimer 
During the course of this presentation, we may make forward looking statements regarding future events or the 
expected performance of the company. We caution you that such statements reflect our current expectations and 
estimates based on factors currently known to us and that actual events or results could differ materially. For important 
factors that may cause actual results to differ from those contained in our forward-looking statements, please review 
our filings with the SEC. The forward-looking statements made in the this presentation are being made as of the time 
and date of its live presentation. If reviewed after its live presentation, this presentation may not contain current or 
accurate information. We do not assume any obligation to update any forward looking statements we may make. In 
addition, any information about our roadmap outlines our general product direction and is subject to change at any 
time without notice. It is for informational purposes only and shall not, be incorporated into any contract or other 
commitment. Splunk undertakes no obligation either to develop the features or functionality described or to include 
any such feature or functionality in a future release. 
2
Agenda 
3 
Damien’s Section 
What is messaging 
JMS + Demo 
AMQP + Demo 
Kafka + Demo 
Custom message handling 
Architecting for scale 
Nimish’s Section 
Using ZeroMQ 
Using JMS for underutilized computers 
Question time
Damien’s Section
5 
From Middle Earth 
Make Splunk Apps & Add-ons 
Messaging background
6
apps.splunk.com 
github.com/damiendallimore 
7
What is messaging ? 
Messaging infrastructures facilitate the sending/receiving of messages between distributed systems 
Message can be encoded in one of many available protocols 
A common paradigm involves producers and consumers exchanging via topics or queues 
8 
Topics (publish subscribe) 
Queues (point to point) 
TOPIC 
QUEUE
Why are messaging architectures used ? 
Integrating Legacy Systems 
Integrating Heterogeneous Systems 
Distributed Applications 
Cluster Communication 
High Performance Streaming 
9
There’s a lot of information in the pipes 
10
The data opportunity 
Easily tap into a massive source of valuable inflight data flowing around the veins 
Don’t need to access the application directly ,pull data off the messaging bus 
I can not think of a single industry vertical that does not use messaging 
11
Getting this data into Splunk 
Many different messaging platforms and protocols 
JMS (Java Message Service) 
AMQP (Advanced Message Queueing Protocol) 
Kafka 
Nimish will cover some more uses cases also 
12
JMS 
Not a messaging protocol , but a programming interface to many different 
underlying message providers 
WebsphereMQ , Tibco EMS , ActiveMQ , HornetQ , SonicMQ etc… 
Very prevalent in the enterprise software landscape 
DEMO 
13
AMQP 
RabbitMQ 
Supports AMQP 0.9.1, 0.9, 0.8 
Common in financial services and environments that need high performance 
and low latency 
DEMO 
14
Kafka 
Cluster centric design = strong durability and fault tolerance 
Scales elastically 
Producers and Consumers communicate via topics in a Kafka node cluster 
Very popular with open source big data / streaming analytics solutions 
DEMO 
15
Custom message handling 
These Modular Inputs can be used in a multitude of scenarios 
Message bodies can be anything : JSON, XML, CSV, Unstructured text, Binary 
Need to give the end user the ability to customize message processing 
So you can plugin your own custom handlers 
Need to write code , but it is really easy , and there are examples on GitHub 
I’m a big data pre processing fan 
16
Cut the code 
17
Compile, bundle into jar file, copy to Splunk 
18
Declaratively apply it 
Let’s see if it works 
19
Achieving desired scale 
AMQP Mod Input 
AMQP Queue 
20 
Single Splunk Instance 
With 1 Modular Input instance , only so much performance / throughput can be achieved 
You’ll hit limits with JVM heap , CPU , OS STDIN/STDOUT Buffer , Splunk indexing pipeline
So go Horizontal 
AMQP Queue 
21 
Splunk Indexer Cluster 
Universal Forwarders 
AMQP Broker 
AMQP Mod Input AMQP Mod Input
Nimish’s Section
About Me 
• Principal Systems Engineer at Splunk in the NorthEast 
• Session Speaker at all past Splunk .conf user conferences 
• Catch me on the Splunk Blogs 
23
Problem with Getting Business Data from JMS 
The goal is to index the business message contents into Splunk 
Message Uncertainty Principal: 
If you de-queue the message to look at it, you have affected the TXN 
If you use various browse APIs for content, you may miss it 
– Message may have already been consumed by TXN 
Suggestion: Use a parallel queue to log the message 
– Suggestion: Try ZeroMQ 
24
Why use ZeroMQ 
Light Weight 
Multiple Client language support (Python, C++, Java, etc) 
Multiple design patterns (Pub/Sub, Pipeline, Request/Reply, etc) 
Open Source with community support 
25
Application Queue and ZeroMQ Example 
26 
Auto Load Balance 
1 
2
Example Python Sender 
context = zmq.Context() 
socket = context.socket(zmq.PUSH) 
socket.connect('tcp://127.0.0.1:5000') 
sleeptime=0.5 
27 
while True: 
num=random.randint(50,100) 
now = str(datetime.datetime.now()) 
sleep(sleeptime) 
payload = now + " Temperature=" + str(num) 
socket.send(payload)
Python Receiver (Scripted Input) 
context = zmq.Context() 
socket = context.socket(zmq.PULL) 
# Change address and port to match your environment 
socket.bind("tcp://127.0.0.1:5000") 
28 
while True: 
msg = socket.recv() 
print "%s" % msg 
except: 
print "exception"
Python Subscriber (Scripted Input) 
context = zmq.Context() 
socket = context.socket(zmq.SUB) 
socket.connect ("tcp://localhost:5556") 
# Subscribe to direction 
filter = "east" 
socket.setsockopt(zmq.SUBSCRIBE, filter) 
29 
while True: 
string = socket.recv() 
print string
Parallel Pipeline Example 
30
Getting Events out of Splunk 
31 
Splunk SDK 
Use Cases: 
– In Depth processing of Splunk events in a queued manner 
– Use as pivot point to drop off events into a Complex Event Processor 
– Batch Processing of Splunk events outside of Splunk 
 Divide and Conquer Approach as seen in last slide
Java Example using SDK to load ZeroMQ 
String query=search; 
Job job = service.getJobs().create(query, queryArgs); 
while (!job.isDone()) { 
32 
Thread.sleep(100); 
job.refresh(); 
} 
// Get Query Results and store in String str… (Code Omitted) 
// Assuming single line events 
StringTokenizer st = new StringTokenizer(str, "n"); 
while(st.hasMoreTokens()) { 
String temp= st.nextToken(); 
sock.send(temp.getBytes(), 0); 
byte response[] = sock.recv(0); 
}
Idle Computers at a Corporation 
33 
…
Idea: Use Ideas from SETI @ Home 
34
Idle Computers Put to Work Using JMS 
35 
…
Applications for Distributing Work 
Application Server would free up computing resources 
Work could be pushed to underutilized computers 
Examples: 
– Massive Mortgage Calculation Scenarios 
– Linear Optimization Problems 
– Matrix Multiplication 
– Compute all possible paths for combinatorics 
36
Architecture 
Optional 
37
Algorithm 
Application servers push requests to queues, which may include data 
in the request object called a Unit of Work 
JMS client implements doWork() interface to work with data 
Message Driven Bean receives finished work and implements 
doStore() interface 
What does this have to do with Splunk? 
– Time Series results can be stored in Splunk for further or historical analytics 
38
Matrix Example High Level Architecture 
39
Search Language Against Matrix Result 
List Column Values of Each Stored Multiplied Matrix using Multikv 
40 
Screenshot here
Search Language Against Matrix Result 
Visualize the Average for Columns 2 to 5 
41 
Screenshot here
Search Language Against Matrix Result 
Perform arbitrary math on aggregate columns 
42 
Screenshot here
Reference 
ZeroMQ 
– http://apps.splunk.com/app/1000/ 
– Blog: http://blogs.splunk.com/2012/06/08/zeromq-as-a-splunk-input/ 
Using JMS for Underutilized Computers 
– Github Reference: https://github.com/nimishdoshi/JMSClientApp/ 
– Blog: http://blogs.splunk.com/2014/04/11/splunk-as-a-recipient-on-the-jms-grid/ 
– Article:http://www.oracle.com/technetwork/articles/entarch/jms-distributed-work- 
082249.html 
43
Questions ?
THANK YOU 
ddallimore@splunk.com 
ndoshi@splunk.com
1 of 45

Recommended

Splunking the JVM by
Splunking the JVMSplunking the JVM
Splunking the JVMDamien Dallimore
3.7K views19 slides
Splunk Conf 2014 - Splunking the Java Virtual Machine by
Splunk Conf 2014 - Splunking the Java Virtual MachineSplunk Conf 2014 - Splunking the Java Virtual Machine
Splunk Conf 2014 - Splunking the Java Virtual MachineDamien Dallimore
4.3K views58 slides
Splunk for JMX by
Splunk for JMXSplunk for JMX
Splunk for JMXDamien Dallimore
3K views16 slides
Flink 0.10 - Upcoming Features by
Flink 0.10 - Upcoming FeaturesFlink 0.10 - Upcoming Features
Flink 0.10 - Upcoming FeaturesAljoscha Krettek
832 views26 slides
Strata London 2018: Multi-everything with Apache Pulsar by
Strata London 2018:  Multi-everything with Apache PulsarStrata London 2018:  Multi-everything with Apache Pulsar
Strata London 2018: Multi-everything with Apache PulsarStreamlio
782 views26 slides
Pulsar Architectural Patterns for CI/CD Automation and Self-Service_Devin Bost by
Pulsar Architectural Patterns for CI/CD Automation and Self-Service_Devin BostPulsar Architectural Patterns for CI/CD Automation and Self-Service_Devin Bost
Pulsar Architectural Patterns for CI/CD Automation and Self-Service_Devin BostStreamNative
773 views63 slides

More Related Content

What's hot

How to build a Neutron Plugin (stadium edition) by
How to build a Neutron Plugin (stadium edition)How to build a Neutron Plugin (stadium edition)
How to build a Neutron Plugin (stadium edition)Salvatore Orlando
744 views19 slides
KubeFlow + GPU + Keras/TensorFlow 2.0 + TF Extended (TFX) + Kubernetes + PyTo... by
KubeFlow + GPU + Keras/TensorFlow 2.0 + TF Extended (TFX) + Kubernetes + PyTo...KubeFlow + GPU + Keras/TensorFlow 2.0 + TF Extended (TFX) + Kubernetes + PyTo...
KubeFlow + GPU + Keras/TensorFlow 2.0 + TF Extended (TFX) + Kubernetes + PyTo...Chris Fregly
3.9K views105 slides
Elk ruminating on logs by
Elk ruminating on logsElk ruminating on logs
Elk ruminating on logsMathew Beane
3.7K views45 slides
OSMC 2021 | Robotmk: You don’t run IT – you deliver services! by
OSMC 2021 | Robotmk: You don’t run IT – you deliver services!OSMC 2021 | Robotmk: You don’t run IT – you deliver services!
OSMC 2021 | Robotmk: You don’t run IT – you deliver services!NETWAYS
109 views56 slides
Kubernetes Summit 2019 - Harden Your Kubernetes Cluster by
Kubernetes Summit 2019 - Harden Your Kubernetes ClusterKubernetes Summit 2019 - Harden Your Kubernetes Cluster
Kubernetes Summit 2019 - Harden Your Kubernetes Clustersmalltown
1.6K views53 slides
Performance Testing using Real Browsers with JMeter & Webdriver by
Performance Testing using Real Browsers with JMeter & WebdriverPerformance Testing using Real Browsers with JMeter & Webdriver
Performance Testing using Real Browsers with JMeter & WebdriverBlazeMeter
8.5K views15 slides

What's hot(20)

How to build a Neutron Plugin (stadium edition) by Salvatore Orlando
How to build a Neutron Plugin (stadium edition)How to build a Neutron Plugin (stadium edition)
How to build a Neutron Plugin (stadium edition)
Salvatore Orlando744 views
KubeFlow + GPU + Keras/TensorFlow 2.0 + TF Extended (TFX) + Kubernetes + PyTo... by Chris Fregly
KubeFlow + GPU + Keras/TensorFlow 2.0 + TF Extended (TFX) + Kubernetes + PyTo...KubeFlow + GPU + Keras/TensorFlow 2.0 + TF Extended (TFX) + Kubernetes + PyTo...
KubeFlow + GPU + Keras/TensorFlow 2.0 + TF Extended (TFX) + Kubernetes + PyTo...
Chris Fregly3.9K views
Elk ruminating on logs by Mathew Beane
Elk ruminating on logsElk ruminating on logs
Elk ruminating on logs
Mathew Beane3.7K views
OSMC 2021 | Robotmk: You don’t run IT – you deliver services! by NETWAYS
OSMC 2021 | Robotmk: You don’t run IT – you deliver services!OSMC 2021 | Robotmk: You don’t run IT – you deliver services!
OSMC 2021 | Robotmk: You don’t run IT – you deliver services!
NETWAYS109 views
Kubernetes Summit 2019 - Harden Your Kubernetes Cluster by smalltown
Kubernetes Summit 2019 - Harden Your Kubernetes ClusterKubernetes Summit 2019 - Harden Your Kubernetes Cluster
Kubernetes Summit 2019 - Harden Your Kubernetes Cluster
smalltown 1.6K views
Performance Testing using Real Browsers with JMeter & Webdriver by BlazeMeter
Performance Testing using Real Browsers with JMeter & WebdriverPerformance Testing using Real Browsers with JMeter & Webdriver
Performance Testing using Real Browsers with JMeter & Webdriver
BlazeMeter8.5K views
OpenStack Summit Vancouver: Lessons learned on upgrades by Frédéric Lepied
OpenStack Summit Vancouver:  Lessons learned on upgradesOpenStack Summit Vancouver:  Lessons learned on upgrades
OpenStack Summit Vancouver: Lessons learned on upgrades
Frédéric Lepied1.1K views
Cloud: From Unmanned Data Center to Algorithmic Economy using Openstack by Andrew Yongjoon Kong
Cloud: From Unmanned Data Center to Algorithmic Economy using OpenstackCloud: From Unmanned Data Center to Algorithmic Economy using Openstack
Cloud: From Unmanned Data Center to Algorithmic Economy using Openstack
OpenStack Tempest and REST API testing by openstackindia
OpenStack Tempest and REST API testingOpenStack Tempest and REST API testing
OpenStack Tempest and REST API testing
openstackindia3.2K views
Securing your Pulsar Cluster with Vault_Chris Kellogg by StreamNative
Securing your Pulsar Cluster with Vault_Chris KelloggSecuring your Pulsar Cluster with Vault_Chris Kellogg
Securing your Pulsar Cluster with Vault_Chris Kellogg
StreamNative1K views
So we're running Apache ZooKeeper. Now What? By Camille Fournier by Hakka Labs
So we're running Apache ZooKeeper. Now What? By Camille Fournier So we're running Apache ZooKeeper. Now What? By Camille Fournier
So we're running Apache ZooKeeper. Now What? By Camille Fournier
Hakka Labs16.5K views
Software Defined Networking: The OpenDaylight Project by Great Wide Open
Software Defined Networking: The OpenDaylight ProjectSoftware Defined Networking: The OpenDaylight Project
Software Defined Networking: The OpenDaylight Project
Great Wide Open1.6K views
Openwhisk - Colorado Meetups by Upkar Lidder
Openwhisk - Colorado MeetupsOpenwhisk - Colorado Meetups
Openwhisk - Colorado Meetups
Upkar Lidder52 views
Kafka Reliability - When it absolutely, positively has to be there by Gwen (Chen) Shapira
Kafka Reliability - When it absolutely, positively has to be thereKafka Reliability - When it absolutely, positively has to be there
Kafka Reliability - When it absolutely, positively has to be there
Gwen (Chen) Shapira24.8K views
Kafka 0.8.0 Presentation to Atlanta Java User's Group March 2013 by Christopher Curtin
Kafka 0.8.0 Presentation to Atlanta Java User's Group March 2013Kafka 0.8.0 Presentation to Atlanta Java User's Group March 2013
Kafka 0.8.0 Presentation to Atlanta Java User's Group March 2013
Christopher Curtin8.7K views
Topology Service Injection using Dragonflow & Kuryr by Eshed Gal-Or
Topology Service Injection using Dragonflow & KuryrTopology Service Injection using Dragonflow & Kuryr
Topology Service Injection using Dragonflow & Kuryr
Eshed Gal-Or361 views
Understanding and Extending Prometheus AlertManager by Lee Calcote
Understanding and Extending Prometheus AlertManagerUnderstanding and Extending Prometheus AlertManager
Understanding and Extending Prometheus AlertManager
Lee Calcote11.8K views
Spark on Kubernetes - Advanced Spark and Tensorflow Meetup - Jan 19 2017 - An... by Chris Fregly
Spark on Kubernetes - Advanced Spark and Tensorflow Meetup - Jan 19 2017 - An...Spark on Kubernetes - Advanced Spark and Tensorflow Meetup - Jan 19 2017 - An...
Spark on Kubernetes - Advanced Spark and Tensorflow Meetup - Jan 19 2017 - An...
Chris Fregly4.7K views

Similar to Splunk Conf 2014 - Getting the message

Building and deploying LLM applications with Apache Airflow by
Building and deploying LLM applications with Apache AirflowBuilding and deploying LLM applications with Apache Airflow
Building and deploying LLM applications with Apache AirflowKaxil Naik
101 views29 slides
Apache Beam: A unified model for batch and stream processing data by
Apache Beam: A unified model for batch and stream processing dataApache Beam: A unified model for batch and stream processing data
Apache Beam: A unified model for batch and stream processing dataDataWorks Summit/Hadoop Summit
22.5K views73 slides
VWBPE 2020 - Overcoming LSL Limitations in Second Life by
VWBPE 2020 - Overcoming LSL Limitations in Second LifeVWBPE 2020 - Overcoming LSL Limitations in Second Life
VWBPE 2020 - Overcoming LSL Limitations in Second Lifejbhancroft
113 views20 slides
Implementing Messaging Patterns in JavaScript using the OpenAjax Hub by
Implementing Messaging Patterns in JavaScript using the OpenAjax HubImplementing Messaging Patterns in JavaScript using the OpenAjax Hub
Implementing Messaging Patterns in JavaScript using the OpenAjax HubKevin Hakanson
3K views51 slides
Open Source XMPP for Cloud Services by
Open Source XMPP for Cloud ServicesOpen Source XMPP for Cloud Services
Open Source XMPP for Cloud Servicesmattjive
8.6K views20 slides
DDS Advanced Tutorial - OMG June 2013 Berlin Meeting by
DDS Advanced Tutorial - OMG June 2013 Berlin MeetingDDS Advanced Tutorial - OMG June 2013 Berlin Meeting
DDS Advanced Tutorial - OMG June 2013 Berlin MeetingJaime Martin Losa
8.7K views77 slides

Similar to Splunk Conf 2014 - Getting the message(20)

Building and deploying LLM applications with Apache Airflow by Kaxil Naik
Building and deploying LLM applications with Apache AirflowBuilding and deploying LLM applications with Apache Airflow
Building and deploying LLM applications with Apache Airflow
Kaxil Naik101 views
VWBPE 2020 - Overcoming LSL Limitations in Second Life by jbhancroft
VWBPE 2020 - Overcoming LSL Limitations in Second LifeVWBPE 2020 - Overcoming LSL Limitations in Second Life
VWBPE 2020 - Overcoming LSL Limitations in Second Life
jbhancroft113 views
Implementing Messaging Patterns in JavaScript using the OpenAjax Hub by Kevin Hakanson
Implementing Messaging Patterns in JavaScript using the OpenAjax HubImplementing Messaging Patterns in JavaScript using the OpenAjax Hub
Implementing Messaging Patterns in JavaScript using the OpenAjax Hub
Kevin Hakanson3K views
Open Source XMPP for Cloud Services by mattjive
Open Source XMPP for Cloud ServicesOpen Source XMPP for Cloud Services
Open Source XMPP for Cloud Services
mattjive8.6K views
DDS Advanced Tutorial - OMG June 2013 Berlin Meeting by Jaime Martin Losa
DDS Advanced Tutorial - OMG June 2013 Berlin MeetingDDS Advanced Tutorial - OMG June 2013 Berlin Meeting
DDS Advanced Tutorial - OMG June 2013 Berlin Meeting
Jaime Martin Losa8.7K views
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions by John Staveley
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure FunctionsMessaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
John Staveley7.3K views
WSO2 Complex Event Processor - Product Overview by WSO2
WSO2 Complex Event Processor - Product OverviewWSO2 Complex Event Processor - Product Overview
WSO2 Complex Event Processor - Product Overview
WSO2571 views
Let’s Monitor Conditions at the Conference With Timothy Spann & David Kjerrum... by HostedbyConfluent
Let’s Monitor Conditions at the Conference With Timothy Spann & David Kjerrum...Let’s Monitor Conditions at the Conference With Timothy Spann & David Kjerrum...
Let’s Monitor Conditions at the Conference With Timothy Spann & David Kjerrum...
HostedbyConfluent336 views
(Current22) Let's Monitor The Conditions at the Conference by Timothy Spann
(Current22) Let's Monitor The Conditions at the Conference(Current22) Let's Monitor The Conditions at the Conference
(Current22) Let's Monitor The Conditions at the Conference
Timothy Spann150 views
Scaling Streaming - Concepts, Research, Goals by kamaelian
Scaling Streaming - Concepts, Research, GoalsScaling Streaming - Concepts, Research, Goals
Scaling Streaming - Concepts, Research, Goals
kamaelian765 views
pythonOCC PDE2009 presentation by Thomas Paviot
pythonOCC PDE2009 presentationpythonOCC PDE2009 presentation
pythonOCC PDE2009 presentation
Thomas Paviot2.3K views
Distributed Systems: How to connect your real-time applications by Jaime Martin Losa
Distributed Systems: How to connect your real-time applicationsDistributed Systems: How to connect your real-time applications
Distributed Systems: How to connect your real-time applications
Jaime Martin Losa1.3K views
Running Accurate, Scalable, and Reproducible Simulations of Distributed Syste... by Rafael Ferreira da Silva
Running Accurate, Scalable, and Reproducible Simulations of Distributed Syste...Running Accurate, Scalable, and Reproducible Simulations of Distributed Syste...
Running Accurate, Scalable, and Reproducible Simulations of Distributed Syste...
Planning For An Effective Storage Solution by Tiffany Rose
Planning For An Effective Storage SolutionPlanning For An Effective Storage Solution
Planning For An Effective Storage Solution
Tiffany Rose3 views
Questions On Dns And Dhcp by Leanne Uhl
Questions On Dns And DhcpQuestions On Dns And Dhcp
Questions On Dns And Dhcp
Leanne Uhl4 views
Splunk Discovery: Warsaw 2018 - Getting Data In by Splunk
Splunk Discovery: Warsaw 2018 - Getting Data InSplunk Discovery: Warsaw 2018 - Getting Data In
Splunk Discovery: Warsaw 2018 - Getting Data In
Splunk624 views
Being HAPI! Reverse Proxying on Purpose by Aman Kohli
Being HAPI! Reverse Proxying on PurposeBeing HAPI! Reverse Proxying on Purpose
Being HAPI! Reverse Proxying on Purpose
Aman Kohli3.2K views

More from Damien Dallimore

QCon London 2015 - Wrangling Data at the IOT Rodeo by
QCon London 2015 - Wrangling Data at the IOT RodeoQCon London 2015 - Wrangling Data at the IOT Rodeo
QCon London 2015 - Wrangling Data at the IOT RodeoDamien Dallimore
1.9K views30 slides
SpringOne2GX 2014 Splunk Presentation by
SpringOne2GX 2014 Splunk PresentationSpringOne2GX 2014 Splunk Presentation
SpringOne2GX 2014 Splunk PresentationDamien Dallimore
1.1K views64 slides
SplunkLive London 2014 Developer Presentation by
SplunkLive London 2014  Developer PresentationSplunkLive London 2014  Developer Presentation
SplunkLive London 2014 Developer PresentationDamien Dallimore
2.3K views67 slides
A Brief History Of Data by
A Brief History Of DataA Brief History Of Data
A Brief History Of DataDamien Dallimore
2.5K views43 slides
Integrating Splunk into your Spring Applications by
Integrating Splunk into your Spring ApplicationsIntegrating Splunk into your Spring Applications
Integrating Splunk into your Spring ApplicationsDamien Dallimore
11.2K views68 slides
Spring Integration Splunk by
Spring Integration SplunkSpring Integration Splunk
Spring Integration SplunkDamien Dallimore
2.1K views9 slides

More from Damien Dallimore(12)

QCon London 2015 - Wrangling Data at the IOT Rodeo by Damien Dallimore
QCon London 2015 - Wrangling Data at the IOT RodeoQCon London 2015 - Wrangling Data at the IOT Rodeo
QCon London 2015 - Wrangling Data at the IOT Rodeo
Damien Dallimore1.9K views
SpringOne2GX 2014 Splunk Presentation by Damien Dallimore
SpringOne2GX 2014 Splunk PresentationSpringOne2GX 2014 Splunk Presentation
SpringOne2GX 2014 Splunk Presentation
Damien Dallimore1.1K views
SplunkLive London 2014 Developer Presentation by Damien Dallimore
SplunkLive London 2014  Developer PresentationSplunkLive London 2014  Developer Presentation
SplunkLive London 2014 Developer Presentation
Damien Dallimore2.3K views
Integrating Splunk into your Spring Applications by Damien Dallimore
Integrating Splunk into your Spring ApplicationsIntegrating Splunk into your Spring Applications
Integrating Splunk into your Spring Applications
Damien Dallimore11.2K views
Splunk Modular Inputs / JMS Messaging Module Input by Damien Dallimore
Splunk Modular Inputs / JMS Messaging Module InputSplunk Modular Inputs / JMS Messaging Module Input
Splunk Modular Inputs / JMS Messaging Module Input
Damien Dallimore3.7K views
Splunk as a_big_data_platform_for_developers_spring_one2gx by Damien Dallimore
Splunk as a_big_data_platform_for_developers_spring_one2gxSplunk as a_big_data_platform_for_developers_spring_one2gx
Splunk as a_big_data_platform_for_developers_spring_one2gx
Damien Dallimore5.3K views
Splunking the JVM (Java Virtual Machine) by Damien Dallimore
Splunking the JVM (Java Virtual Machine)Splunking the JVM (Java Virtual Machine)
Splunking the JVM (Java Virtual Machine)
Damien Dallimore10.5K views

Recently uploaded

What is API by
What is APIWhat is API
What is APIartembondar5
12 views15 slides
Flask-Python.pptx by
Flask-Python.pptxFlask-Python.pptx
Flask-Python.pptxTriloki Gupta
9 views12 slides
predicting-m3-devopsconMunich-2023.pptx by
predicting-m3-devopsconMunich-2023.pptxpredicting-m3-devopsconMunich-2023.pptx
predicting-m3-devopsconMunich-2023.pptxTier1 app
8 views24 slides
Keep by
KeepKeep
KeepGeniusee
78 views10 slides
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated... by
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...TomHalpin9
6 views29 slides
JioEngage_Presentation.pptx by
JioEngage_Presentation.pptxJioEngage_Presentation.pptx
JioEngage_Presentation.pptxadmin125455
8 views4 slides

Recently uploaded(20)

predicting-m3-devopsconMunich-2023.pptx by Tier1 app
predicting-m3-devopsconMunich-2023.pptxpredicting-m3-devopsconMunich-2023.pptx
predicting-m3-devopsconMunich-2023.pptx
Tier1 app8 views
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated... by TomHalpin9
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...
TomHalpin96 views
JioEngage_Presentation.pptx by admin125455
JioEngage_Presentation.pptxJioEngage_Presentation.pptx
JioEngage_Presentation.pptx
admin1254558 views
predicting-m3-devopsconMunich-2023-v2.pptx by Tier1 app
predicting-m3-devopsconMunich-2023-v2.pptxpredicting-m3-devopsconMunich-2023-v2.pptx
predicting-m3-devopsconMunich-2023-v2.pptx
Tier1 app11 views
Understanding HTML terminology by artembondar5
Understanding HTML terminologyUnderstanding HTML terminology
Understanding HTML terminology
artembondar57 views
Generic or specific? Making sensible software design decisions by Bert Jan Schrijver
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium... by Lisi Hocke
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...
Lisi Hocke35 views
ADDO_2022_CICID_Tom_Halpin.pdf by TomHalpin9
ADDO_2022_CICID_Tom_Halpin.pdfADDO_2022_CICID_Tom_Halpin.pdf
ADDO_2022_CICID_Tom_Halpin.pdf
TomHalpin95 views
Quality Engineer: A Day in the Life by John Valentino
Quality Engineer: A Day in the LifeQuality Engineer: A Day in the Life
Quality Engineer: A Day in the Life
John Valentino7 views
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx by animuscrm
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
animuscrm15 views
Ports-and-Adapters Architecture for Embedded HMI by Burkhard Stubert
Ports-and-Adapters Architecture for Embedded HMIPorts-and-Adapters Architecture for Embedded HMI
Ports-and-Adapters Architecture for Embedded HMI
Burkhard Stubert29 views

Splunk Conf 2014 - Getting the message

  • 1. Copyright © 2014 Splunk Inc. Getting the Message Damien Dallimore Dev Evangelist , CSO Office @ Splunk Nimish Doshi Principal Systems Engineer @ Splunk
  • 2. Disclaimer During the course of this presentation, we may make forward looking statements regarding future events or the expected performance of the company. We caution you that such statements reflect our current expectations and estimates based on factors currently known to us and that actual events or results could differ materially. For important factors that may cause actual results to differ from those contained in our forward-looking statements, please review our filings with the SEC. The forward-looking statements made in the this presentation are being made as of the time and date of its live presentation. If reviewed after its live presentation, this presentation may not contain current or accurate information. We do not assume any obligation to update any forward looking statements we may make. In addition, any information about our roadmap outlines our general product direction and is subject to change at any time without notice. It is for informational purposes only and shall not, be incorporated into any contract or other commitment. Splunk undertakes no obligation either to develop the features or functionality described or to include any such feature or functionality in a future release. 2
  • 3. Agenda 3 Damien’s Section What is messaging JMS + Demo AMQP + Demo Kafka + Demo Custom message handling Architecting for scale Nimish’s Section Using ZeroMQ Using JMS for underutilized computers Question time
  • 5. 5 From Middle Earth Make Splunk Apps & Add-ons Messaging background
  • 6. 6
  • 8. What is messaging ? Messaging infrastructures facilitate the sending/receiving of messages between distributed systems Message can be encoded in one of many available protocols A common paradigm involves producers and consumers exchanging via topics or queues 8 Topics (publish subscribe) Queues (point to point) TOPIC QUEUE
  • 9. Why are messaging architectures used ? Integrating Legacy Systems Integrating Heterogeneous Systems Distributed Applications Cluster Communication High Performance Streaming 9
  • 10. There’s a lot of information in the pipes 10
  • 11. The data opportunity Easily tap into a massive source of valuable inflight data flowing around the veins Don’t need to access the application directly ,pull data off the messaging bus I can not think of a single industry vertical that does not use messaging 11
  • 12. Getting this data into Splunk Many different messaging platforms and protocols JMS (Java Message Service) AMQP (Advanced Message Queueing Protocol) Kafka Nimish will cover some more uses cases also 12
  • 13. JMS Not a messaging protocol , but a programming interface to many different underlying message providers WebsphereMQ , Tibco EMS , ActiveMQ , HornetQ , SonicMQ etc… Very prevalent in the enterprise software landscape DEMO 13
  • 14. AMQP RabbitMQ Supports AMQP 0.9.1, 0.9, 0.8 Common in financial services and environments that need high performance and low latency DEMO 14
  • 15. Kafka Cluster centric design = strong durability and fault tolerance Scales elastically Producers and Consumers communicate via topics in a Kafka node cluster Very popular with open source big data / streaming analytics solutions DEMO 15
  • 16. Custom message handling These Modular Inputs can be used in a multitude of scenarios Message bodies can be anything : JSON, XML, CSV, Unstructured text, Binary Need to give the end user the ability to customize message processing So you can plugin your own custom handlers Need to write code , but it is really easy , and there are examples on GitHub I’m a big data pre processing fan 16
  • 18. Compile, bundle into jar file, copy to Splunk 18
  • 19. Declaratively apply it Let’s see if it works 19
  • 20. Achieving desired scale AMQP Mod Input AMQP Queue 20 Single Splunk Instance With 1 Modular Input instance , only so much performance / throughput can be achieved You’ll hit limits with JVM heap , CPU , OS STDIN/STDOUT Buffer , Splunk indexing pipeline
  • 21. So go Horizontal AMQP Queue 21 Splunk Indexer Cluster Universal Forwarders AMQP Broker AMQP Mod Input AMQP Mod Input
  • 23. About Me • Principal Systems Engineer at Splunk in the NorthEast • Session Speaker at all past Splunk .conf user conferences • Catch me on the Splunk Blogs 23
  • 24. Problem with Getting Business Data from JMS The goal is to index the business message contents into Splunk Message Uncertainty Principal: If you de-queue the message to look at it, you have affected the TXN If you use various browse APIs for content, you may miss it – Message may have already been consumed by TXN Suggestion: Use a parallel queue to log the message – Suggestion: Try ZeroMQ 24
  • 25. Why use ZeroMQ Light Weight Multiple Client language support (Python, C++, Java, etc) Multiple design patterns (Pub/Sub, Pipeline, Request/Reply, etc) Open Source with community support 25
  • 26. Application Queue and ZeroMQ Example 26 Auto Load Balance 1 2
  • 27. Example Python Sender context = zmq.Context() socket = context.socket(zmq.PUSH) socket.connect('tcp://127.0.0.1:5000') sleeptime=0.5 27 while True: num=random.randint(50,100) now = str(datetime.datetime.now()) sleep(sleeptime) payload = now + " Temperature=" + str(num) socket.send(payload)
  • 28. Python Receiver (Scripted Input) context = zmq.Context() socket = context.socket(zmq.PULL) # Change address and port to match your environment socket.bind("tcp://127.0.0.1:5000") 28 while True: msg = socket.recv() print "%s" % msg except: print "exception"
  • 29. Python Subscriber (Scripted Input) context = zmq.Context() socket = context.socket(zmq.SUB) socket.connect ("tcp://localhost:5556") # Subscribe to direction filter = "east" socket.setsockopt(zmq.SUBSCRIBE, filter) 29 while True: string = socket.recv() print string
  • 31. Getting Events out of Splunk 31 Splunk SDK Use Cases: – In Depth processing of Splunk events in a queued manner – Use as pivot point to drop off events into a Complex Event Processor – Batch Processing of Splunk events outside of Splunk  Divide and Conquer Approach as seen in last slide
  • 32. Java Example using SDK to load ZeroMQ String query=search; Job job = service.getJobs().create(query, queryArgs); while (!job.isDone()) { 32 Thread.sleep(100); job.refresh(); } // Get Query Results and store in String str… (Code Omitted) // Assuming single line events StringTokenizer st = new StringTokenizer(str, "n"); while(st.hasMoreTokens()) { String temp= st.nextToken(); sock.send(temp.getBytes(), 0); byte response[] = sock.recv(0); }
  • 33. Idle Computers at a Corporation 33 …
  • 34. Idea: Use Ideas from SETI @ Home 34
  • 35. Idle Computers Put to Work Using JMS 35 …
  • 36. Applications for Distributing Work Application Server would free up computing resources Work could be pushed to underutilized computers Examples: – Massive Mortgage Calculation Scenarios – Linear Optimization Problems – Matrix Multiplication – Compute all possible paths for combinatorics 36
  • 38. Algorithm Application servers push requests to queues, which may include data in the request object called a Unit of Work JMS client implements doWork() interface to work with data Message Driven Bean receives finished work and implements doStore() interface What does this have to do with Splunk? – Time Series results can be stored in Splunk for further or historical analytics 38
  • 39. Matrix Example High Level Architecture 39
  • 40. Search Language Against Matrix Result List Column Values of Each Stored Multiplied Matrix using Multikv 40 Screenshot here
  • 41. Search Language Against Matrix Result Visualize the Average for Columns 2 to 5 41 Screenshot here
  • 42. Search Language Against Matrix Result Perform arbitrary math on aggregate columns 42 Screenshot here
  • 43. Reference ZeroMQ – http://apps.splunk.com/app/1000/ – Blog: http://blogs.splunk.com/2012/06/08/zeromq-as-a-splunk-input/ Using JMS for Underutilized Computers – Github Reference: https://github.com/nimishdoshi/JMSClientApp/ – Blog: http://blogs.splunk.com/2014/04/11/splunk-as-a-recipient-on-the-jms-grid/ – Article:http://www.oracle.com/technetwork/articles/entarch/jms-distributed-work- 082249.html 43
  • 45. THANK YOU ddallimore@splunk.com ndoshi@splunk.com

Editor's Notes

  1. From Auckland Dev evang , ex customer 5th Conf Make Apps , Cut code Through messaging background , a lot of integration work in many different industrys , particularly in the enterprise Java space.
  2. Everything 100% open source use , reuse , whatever. Collaborate Community answers.splunk.com for support is best
  3. Enterprise Service Buses Multi tier apps ,asynch processing Apache Storm That pretty broadly covers most enterprise software scenarios.
  4. Interoperablity not guaranteed message producers and consumers may be implemented differently You “plugin” the underlying message provider implemention
  5. Wire level protocol, hence better interoperabilty than JMS and better performance Usual messaging features such as , Flow control , guaranteed delivery, quality of service etc… JP Morgan chase 1.0 is an entirely different protocol , any demand for this ?? Swiftmq Apache apollo Apache qpid
  6. Manage access to the cluster with Apache Zookeeper Data streams can be partitioned over multiple machines in the cluster Apache storm spout
  7. If you have to opportunity to get the data into an optimal format for Splunk , do it. Handle custom payloads , even binary Efficient use of license Pre compute some values that might not be best suited to the Splunk search language
  8. Inputting the setting into stanza Send message Show reversed output
  9. com.splunk.modinput.jms.customhandler.MessageTextReverser
  10. Same pattern applys to JMS and Kafka
  11. Your only limits are going to be your ability to provision Splunk nodes. Same pattern applys to other Mod Inputs Works with queues , not pub sub topics (you’ll get duplicates)