{"repo":"dburriss/fennel","free":true,"listed":false,"github":"https://github.com/dburriss/fennel","clone":"git clone https://github.com/dburriss/fennel.git","description":"A Prometheus parsing and line generation library","language":"F#","stars":15,"topics":["prometheus","parser","team-devon","domain-telemetry"],"license":"MIT","category":"analytics","readme_excerpt":"Fennel Fennel - A flowering plant in the carrot family Fennel is a simple library that speaks Promethean. If can translate prometheus log strings to typed metrics, as well as create metrics in well formatted Prometheus lines. Why Fennel? But the noble son of Iapetus outwitted him and stole the far-seen gleam of unwearying fire in a hollow fennel stalk - Hesiod in the Theogony The myth has it that Prometheus stole fire from Zeus by smuggling an ember in a hollow fennel stalk. If you are wondering more about why I created this than about the name, it is simple. I was looking for something that just allowed me to create Prometheus log lines as strings. I also wanted to be able to parse Prometheus logs. Circa 2019 when I looked for this all I found were libraries that tied very deeply into ASP.NET Core. I had been looking for an excuse to play with a parsing library like FParsec... and here we are. Nuget Available on Nuget.org Nuget Package Manger Install-Package Fennel .NET CLI dotnet add package Fennel PackageReference Paket paket add Fennel Usage Translating text to Types Assuming we have the following Prometheus logs as input : You can break the result down into individually parsed lines. F# Each line has multiple possibilities: C# Or you can parse an individual line: Metric to string You can also create correctly formatted Prometheus strings for comment , help , and metric lines. F# C#","default_branch":null,"files":null,"tree":[],"storefront":"/r/dburriss","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/dburriss/fennel/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}