www.centreon.com
Stream connector : Easily sending events and/or
metrics from the Centreon open-source solution
to any data platform
November 8th, 2018
2
Who am I
David Boucher
●
From Paris, France
●
I work at Centreon (http://www.centreon.com)
●
Long experience in IT supervision
3
●
Data sharing between monitoring tools
●
Use cases of Centreon Stream connector
●
How does it work?
●
Demo
OVERVIEW
4
DATA SHARING BETWEEN MONITORING TOOLS
Centreon Stream connector
5
Data sharing between monitoring tools
65% of companies use more
than 10 supervision tools
(Teamquest Survey)
6
Data sharing between monitoring tools
Tools have their field of use and the needs of users are generally
more important. They therefore use more than one tool :
●
IT supervision
●
APM supervision
●
Several storages
●
Notification system
●
Data analysis
7
Data sharing between monitoring tools
People want several tools, therefore we provide them many tools in many different fields!
Among monitoring tools, we can find :
●
IT monitoring
●
APM monitoring
●
Error tracking tools
●
Network monitoring
●
Logs analysis tools
●
Mobile monitoring
●
Time series tools
●
Containers/VM monitoring
●
Correlation tools
●
Ticketing tools
●
Machine Learning tools
●
Etc...
8
Data sharing between monitoring tools
If you want your monitoring tools to work together, data sharing must
be easy.
It was our goal when we designed the stream connector.
9
USE CASES
Centreon Stream connector
10
Monitoring tools
Centreon Web UI
Broker RRD Broker SQL
Engine
cbmod
Centreon Plugins
Centcore
externalcmd
Centreon
Simple architecture
Internal connectors:
1.TCP connector
2.SQL connector
3.RRD connector
1
1
23
11
Use cases
After, TCP, SQL and RRD connectors, others were proposed:
●
Graphite
●
Influxdb
But this is not a good solution, writing a connector per storage
that satisfies all customers is too complicated.
The best solution was to create something:
●
Customizable
●
Easy to use
●
Extensible
12
Use cases
The stream connector is a Broker connector providing a
Lua binding. This language is:
●
Easy to learn
●
Lightweight
●
Fast
●
Easy to bind with C/C++
●
Expensible with many libraries.
13
Use cases
Centreon
Other tools
Manager of managers
Use case with a manager of managers
14
Use cases
Centreon TSDB
Use case with external statistical tool
R Shiny
15
HOW DOES IT WORK?
Centreon Stream connector
16
How does it work?
The script to execute Accepted categories
by this connector
Here we can send information
to the Lua script.
17
How does it work?
Data received by broker are structured as events classified by category and by type
(called element). They are converted to Lua tables before being sent to the stream
connector.
Examples:
●
a service status has a category 1 and an element 24
●
a host status has also a category 1 but an element 14.
See https://documentation.centreon.com/docs/centreon-broker/en/latest/dev/bbdo.html
for full list of events.
Event d under the form
of a Lua table
True if the value has been processed.
False otherwise.
18
How does it work?
Broker offers an SDK to help the stream connector programmers.
All the functions are described at
https://documentation.centreon.com/docs/centreon-broker/en/latest/exploit/stream_connectors.html
The SDK exposes:
●
A log object named broker_log
●
A bulk of functions like json_encode, json_decode, parse_perfdata, or others...
●
An access to the stream connector cache, for example you can get the host name
of the host of id 12 by calling broker_cache:get_hostname(12)
●
A tcp socket object (broker_tcp_socket)
19
DEMO
Centreon Stream connector
20
Demo
Centreon WARP 10
We want to send service metrics to the time series database
WARP10.
The stream connector is therefore configured with a filter that
retains NEB category events.
21
Demo
Since we only want service metrics, we can restrict the events to
service status, that is to say element 24.
A service status event in Lua looks like this:
22
Demo
An insert in Warp10 is a line of the form :
1541172410000000// central_17:Cpu:cpu0 {host=central_17, service=Cpu} 9
Timestamp
in microseconds
A name,
here we concatenate
the host name
and the service description
These are labels, interesting
for filtering in warp10
Value of the metric
23
Demo
The service status event does not contain the host name or the service description.
The Broker cache
Provides functions
to get these informations
24
Demo
1541172410000000// central_17:Cpu:cpu0 {host=central_17, service=Cpu} 9
{
cpu0 = 9,
total_cpu_avg = 9
}
Cache may be empty,
so we check returned
valuesto avoid writing
continuously in
the database,
we use a table
25
Demo
The flush function is
almost a curl call
through the lua-curl binding
26
Demo
27
Centreon Stream connector
https://www.centreon.com/
https://github.com/centreon/centreon-stream-connector-scripts
https://centreon.github.io/register-slack
https://twitter.com/CentreonLabs
www.centreon.com
Thank You!

OSMC 2018 | Stream connector: Easily sending events and/or metrics from the Centreon open-source solution to any data platform by David Boucher

  • 1.
    www.centreon.com Stream connector :Easily sending events and/or metrics from the Centreon open-source solution to any data platform November 8th, 2018
  • 2.
    2 Who am I DavidBoucher ● From Paris, France ● I work at Centreon (http://www.centreon.com) ● Long experience in IT supervision
  • 3.
    3 ● Data sharing betweenmonitoring tools ● Use cases of Centreon Stream connector ● How does it work? ● Demo OVERVIEW
  • 4.
    4 DATA SHARING BETWEENMONITORING TOOLS Centreon Stream connector
  • 5.
    5 Data sharing betweenmonitoring tools 65% of companies use more than 10 supervision tools (Teamquest Survey)
  • 6.
    6 Data sharing betweenmonitoring tools Tools have their field of use and the needs of users are generally more important. They therefore use more than one tool : ● IT supervision ● APM supervision ● Several storages ● Notification system ● Data analysis
  • 7.
    7 Data sharing betweenmonitoring tools People want several tools, therefore we provide them many tools in many different fields! Among monitoring tools, we can find : ● IT monitoring ● APM monitoring ● Error tracking tools ● Network monitoring ● Logs analysis tools ● Mobile monitoring ● Time series tools ● Containers/VM monitoring ● Correlation tools ● Ticketing tools ● Machine Learning tools ● Etc...
  • 8.
    8 Data sharing betweenmonitoring tools If you want your monitoring tools to work together, data sharing must be easy. It was our goal when we designed the stream connector.
  • 9.
  • 10.
    10 Monitoring tools Centreon WebUI Broker RRD Broker SQL Engine cbmod Centreon Plugins Centcore externalcmd Centreon Simple architecture Internal connectors: 1.TCP connector 2.SQL connector 3.RRD connector 1 1 23
  • 11.
    11 Use cases After, TCP,SQL and RRD connectors, others were proposed: ● Graphite ● Influxdb But this is not a good solution, writing a connector per storage that satisfies all customers is too complicated. The best solution was to create something: ● Customizable ● Easy to use ● Extensible
  • 12.
    12 Use cases The streamconnector is a Broker connector providing a Lua binding. This language is: ● Easy to learn ● Lightweight ● Fast ● Easy to bind with C/C++ ● Expensible with many libraries.
  • 13.
    13 Use cases Centreon Other tools Managerof managers Use case with a manager of managers
  • 14.
    14 Use cases Centreon TSDB Usecase with external statistical tool R Shiny
  • 15.
    15 HOW DOES ITWORK? Centreon Stream connector
  • 16.
    16 How does itwork? The script to execute Accepted categories by this connector Here we can send information to the Lua script.
  • 17.
    17 How does itwork? Data received by broker are structured as events classified by category and by type (called element). They are converted to Lua tables before being sent to the stream connector. Examples: ● a service status has a category 1 and an element 24 ● a host status has also a category 1 but an element 14. See https://documentation.centreon.com/docs/centreon-broker/en/latest/dev/bbdo.html for full list of events. Event d under the form of a Lua table True if the value has been processed. False otherwise.
  • 18.
    18 How does itwork? Broker offers an SDK to help the stream connector programmers. All the functions are described at https://documentation.centreon.com/docs/centreon-broker/en/latest/exploit/stream_connectors.html The SDK exposes: ● A log object named broker_log ● A bulk of functions like json_encode, json_decode, parse_perfdata, or others... ● An access to the stream connector cache, for example you can get the host name of the host of id 12 by calling broker_cache:get_hostname(12) ● A tcp socket object (broker_tcp_socket)
  • 19.
  • 20.
    20 Demo Centreon WARP 10 Wewant to send service metrics to the time series database WARP10. The stream connector is therefore configured with a filter that retains NEB category events.
  • 21.
    21 Demo Since we onlywant service metrics, we can restrict the events to service status, that is to say element 24. A service status event in Lua looks like this:
  • 22.
    22 Demo An insert inWarp10 is a line of the form : 1541172410000000// central_17:Cpu:cpu0 {host=central_17, service=Cpu} 9 Timestamp in microseconds A name, here we concatenate the host name and the service description These are labels, interesting for filtering in warp10 Value of the metric
  • 23.
    23 Demo The service statusevent does not contain the host name or the service description. The Broker cache Provides functions to get these informations
  • 24.
    24 Demo 1541172410000000// central_17:Cpu:cpu0 {host=central_17,service=Cpu} 9 { cpu0 = 9, total_cpu_avg = 9 } Cache may be empty, so we check returned valuesto avoid writing continuously in the database, we use a table
  • 25.
    25 Demo The flush functionis almost a curl call through the lua-curl binding
  • 26.
  • 27.
  • 28.