Bcc2telegraf: An integration that sends ebpf-based bcc histogram metrics to telegraf daemon

Overview

bcc2telegraf

bcc2telegraf is an integration that sends ebpf-based bcc histogram metrics (https://github.com/iovisor/bcc) to telegraf daemon (https://github.com/influxdata/telegraf)

Original bcc/table.py v.0.10 just printed histograms to stdout. This extension instead creates a memory buffer full of text lines formatted to the requirements of telegraf line protocol and sends it by http to telegraf url .

Important difference is bcc helpers create log2 histogram with low-high ends of bucket like 0-1,1-2,3-4,5-8,9-16,17-32 etc. Tools like prometheus or grafana require those histograms be cumulative, with low always starting with 0, like 0-1,0-2,0-4,0-8,0-16,0-32 etc. So bcc2telegraf transforms log2 histograms into cumulative ones.

Sample telegraf lines generated by this module:

ebpf,metric=biolatency,host=abc.example.com,dc=east-1,tag1=dm-14,cloud=Nine,hi=512 value=100 1645026564
ebpf,metric=biolatency,host=abc.example.com,dc=east-1,tag1=dm-14,cloud=Nine,hi=1024 value=777 1645026564
ebpf,metric=biolatency,host=abc.example.com,dc=east-1,tag1=dm-14,cloud=Nine,hi=2048 value=888 1645026564

You may create some function which extends tag1 with some other tags, based on the histogram bucket struct key described in ebpf C program e.g. your_function returns 8.8.8.8,cloud=GCP then pass this function to send_log2_hist (... bucket_fn=your_function...) and telegraf line will contain ... tag1=8.8.8.8,cloud=GCP...

Usage:

  • set TELEGRAF_URL environment variable to your telegraf service
  • copy a python-based bcc program, e.g. biolatency or tcprtt
  • change it by adding an import bcc2telegraf and replace instances of dist.print_log2_hist(label...) with dist.send_log2_hist(label...) or with dist.send_log2_hist(label,bucket_fn=your_function...)
  • think about creating a systemctl-managed service out of that program
Owner
Peter Bobrov
44 y.o. дядя Петя from молодежный коллектив
Peter Bobrov
It's an application to calculate I from v and r. It can also plot a graph between V vs I.

Ohm-s-Law-Visualizer It's an application to calculate I from v and r using Ohm's Law. It can also plot a graph between V vs I. Story I'm doing my Unde

Sihab Sahariar 1 Nov 20, 2021
Frbmclust - Clusterize FRB profiles using hierarchical clustering, plot corresponding parameters distributions

frbmclust Getting Started Clusterize FRB profiles using hierarchical clustering,

3 May 06, 2022
Comparing USD and GBP Exchange Rates

Currency Data Visualization Comparing USD and GBP Exchange Rates This is a bar graph comparing GBP and USD exchange rates. I chose blue for the UK bec

5 Oct 28, 2021
plotly scatterplots which show molecule images on hover!

molplotly Plotly scatterplots which show molecule images on hovering over the datapoints! Required packages: pandas rdkit jupyter_dash ➡️ See example.

150 Dec 28, 2022
Sci palettes for matplotlib/seaborn

sci palettes for matplotlib/seaborn Installation python3 -m pip install sci-palettes Usage import seaborn as sns import matplotlib.pyplot as plt impor

Qingdong Su 2 Jun 07, 2022
Epagneul is a tool to visualize and investigate windows event logs

epagneul Epagneul is a tool to visualize and investigate windows event logs. Dep

jurelou 190 Dec 13, 2022
Chem: collection of mostly python code for molecular visualization, QM/MM, FEP, etc

chem: collection of mostly python code for molecular visualization, QM/MM, FEP,

5 Sep 02, 2022
Because trello only have payed options to generate a RunUp chart, this solves that!

Trello Runup Chart Generator The basic concept of the project is that Corello is pay-to-use and want to use Trello To-Do/Doing/Done automation with gi

Rômulo Schiavon 1 Dec 21, 2021
Learn Data Science with focus on adding value with the most efficient tech stack.

DataScienceWithPython Get started with Data Science with Python An engaging journey to become a Data Scientist with Python TL;DR Download all Jupyter

Learn Python with Rune 110 Dec 22, 2022
This is a learning tool and exploration app made using the Dash interactive Python framework developed by Plotly

Support Vector Machine (SVM) Explorer This app has been moved here. This repo is likely outdated and will not be updated. This is a learning tool and

Plotly 150 Nov 03, 2022
Learning Convolutional Neural Networks with Interactive Visualization.

CNN Explainer An interactive visualization system designed to help non-experts learn about Convolutional Neural Networks (CNNs) For more information,

Polo Club of Data Science 6.3k Jan 01, 2023
A flexible tool for creating, organizing, and sharing visualizations of live, rich data. Supports Torch and Numpy.

Visdom A flexible tool for creating, organizing, and sharing visualizations of live, rich data. Supports Python. Overview Concepts Setup Usage API To

FOSSASIA 9.4k Jan 07, 2023
Log visualizer for whirl-framework

Lumberjack Log visualizer for whirl-framework Установка pip install -r requirements.txt Как пользоваться python3 lumberjack.py -l путь до лога -o

Vladimir Malinovskii 2 Dec 19, 2022
Numerical methods for ordinary differential equations: Euler, Improved Euler, Runge-Kutta.

Numerical methods Numerical methods for ordinary differential equations are methods used to find numerical approximations to the solutions of ordinary

Aleksey Korshuk 5 Apr 29, 2022
Python wrapper for Synoptic Data API. Retrieve data from thousands of mesonet stations and networks. Returns JSON from Synoptic as Pandas DataFrame

☁ Synoptic API for Python (unofficial) The Synoptic Mesonet API (formerly MesoWest) gives you access to real-time and historical surface-based weather

Brian Blaylock 23 Jan 06, 2023
This is a place where I'm playing around with pandas to analyze data in a csv/excel file.

pandas-csv-excel-analysis This is a place where I'm playing around with pandas to analyze data in a csv/excel file. 0-start A very simple cheat sheet

Chuqin 3 Oct 05, 2022
This is a Web scraping project using BeautifulSoup and Python to scrape basic information of all the Test matches played till Jan 2022.

Scraping-test-matches-data This is a Web scraping project using BeautifulSoup and Python to scrape basic information of all the Test matches played ti

Souradeep Banerjee 4 Oct 10, 2022
A Python package for caclulations and visualizations in geological sciences.

geo_calcs A Python package for caclulations and visualizations in geological sciences. Free software: MIT license Documentation: https://geo-calcs.rea

Drew Heasman 1 Jul 12, 2022
Custom ROI in Computer Vision Applications

EasyROI Helper library for drawing ROI in Computer Vision Applications Table of Contents EasyROI Table of Contents About The Project Tech Stack File S

43 Dec 09, 2022
Simple Python interface for Graphviz

Simple Python interface for Graphviz

Sebastian Bank 1.3k Dec 26, 2022