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
649 Pokémon palettes as CSVs, with a Python lib to turn names/IDs into palettes, or MatPlotLib compatible ListedColormaps.

PokePalette 649 Pokémon, broken down into CSVs of their RGB colour palettes. Complete with a Python library to convert names or Pokédex IDs into eithe

11 Dec 05, 2022
Visualizing weather changes across the world using third party APIs and Python.

WEATHER FORECASTING ACROSS THE WORLD Overview Python scripts were created to visualize the weather for over 500 cities across the world at varying di

G Johnson 0 Jun 12, 2021
Manim is an animation engine for explanatory math videos.

A community-maintained Python framework for creating mathematical animations.

12.4k Dec 30, 2022
Ana's Portfolio

Ana's Portfolio ✌️ Welcome to my Portfolio! You will find here different Projects I have worked on (from scratch) 💪 Projects 💻 1️⃣ Hangman game (Mad

Ana Katherine Cortes Sobrino 9 Mar 15, 2022
Matplotlib JOTA style for making figures

Matplotlib JOTA style for making figures This repo has Matplotlib JOTA style to format plots and figures for publications and presentation.

JOTA JORNALISMO 2 May 05, 2022
Collection of scripts for making high quality beautiful math-related posters.

Poster Collection of scripts for making high quality beautiful math-related posters. The poster can have as large printing size as 3x2 square feet wit

Nattawut Phetmak 3 Jun 09, 2022
SummVis is an interactive visualization tool for text summarization.

SummVis is an interactive visualization tool for analyzing abstractive summarization model outputs and datasets.

Robustness Gym 246 Dec 08, 2022
A set of three functions, useful in geographical calculations of different sorts

GreatCircle A set of three functions, useful in geographical calculations of different sorts. Available for PHP, Python, Javascript and Ruby. Live dem

72 Sep 30, 2022
https://there.oughta.be/a/macro-keyboard

inkkeys Details and instructions can be found on https://there.oughta.be/a/macro-keyboard In contrast to most of my other projects, I decided to put t

Sebastian Staacks 209 Dec 21, 2022
Material for dataviz course at university of Bordeaux

Material for dataviz course at university of Bordeaux

Nicolas P. Rougier 50 Jul 17, 2022
Squidpy is a tool for the analysis and visualization of spatial molecular data.

Squidpy is a tool for the analysis and visualization of spatial molecular data. It builds on top of scanpy and anndata, from which it inherits modularity and scalability. It provides analysis tools t

Theis Lab 251 Dec 19, 2022
MPL Plotter is a Matplotlib based Python plotting library built with the goal of delivering publication-quality plots concisely.

MPL Plotter is a Matplotlib based Python plotting library built with the goal of delivering publication-quality plots concisely.

Antonio López Rivera 162 Nov 11, 2022
Generate graphs with NetworkX, natively visualize with D3.js and pywebview

webview_d3 This is some PoC code to render graphs created with NetworkX natively using D3.js and pywebview. The main benifit of this approac

byt3bl33d3r 68 Aug 18, 2022
A simple python tool for explore your object detection dataset

A simple tool for explore your object detection dataset. The goal of this library is to provide simple and intuitive visualizations from your dataset and automatically find the best parameters for ge

GRADIANT - Centro Tecnolóxico de Telecomunicacións de Galicia 142 Dec 25, 2022
A python package for animating plots build on matplotlib.

animatplot A python package for making interactive as well as animated plots with matplotlib. Requires Python = 3.5 Matplotlib = 2.2 (because slider

Tyler Makaro 394 Dec 18, 2022
3D-Lorenz-Attractor-simulation-with-python

3D-Lorenz-Attractor-simulation-with-python Animação 3D da trajetória do Atrator de Lorenz, implementada em Python usando o método de Runge-Kutta de 4ª

Hevenicio Silva 17 Dec 08, 2022
Bcc2telegraf: An integration that sends ebpf-based bcc histogram metrics to telegraf daemon

bcc2telegraf bcc2telegraf is an integration that sends ebpf-based bcc histogram

Peter Bobrov 2 Feb 17, 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
This is simply repo for line drawing rendering using freestyle in Blender.

blender_freestyle_line_drawing This is simply repo for line drawing rendering using freestyle in Blender. how to use blender2935 --background --python

MaxLin 3 Jul 02, 2022
TensorDebugger (TDB) is a visual debugger for deep learning. It extends TensorFlow with breakpoints + real-time visualization of the data flowing through the computational graph

TensorDebugger (TDB) is a visual debugger for deep learning. It extends TensorFlow (Google's Deep Learning framework) with breakpoints + real-time visualization of the data flowing through the comput

Eric Jang 1.4k Dec 15, 2022