• Stars
    star
    107
  • Rank 323,524 (Top 7 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created about 3 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A metric collection daemon allows you to configure aggregations in runtime

events2prom ๐Ÿงน

Build

events2prom collects events and aggregates them in memory to publish metrics in the Prometheus exposition format. It allows enabling and disabling aggregations in runtime and can support high dimensional cases.

Note: This is an experimental project, no stability guarantees.

Usage

$ docker run -it -p 6677:6677 -p 6678:6678/udp \
    -v "${PWD}/examples/config/events2prom.yaml":/events2prom.yaml \
    public.ecr.aws/q1p8v8z2/events2prom \
    -config /events2prom.yaml
2021/11/08 13:27:17 Listening to admin server at ":6677"...
2021/11/08 13:27:17 Enabled collection: "request_count_by_pod"
2021/11/08 13:27:17 Enabled collection: "request_latency_ms"
2021/11/08 13:27:17 Listening events at [::]:6678, let's ๐Ÿงน...

Then, run the example to generate events:

$ docker run -it --network host public.ecr.aws/q1p8v8z2/events2prom-example

Open http://127.0.0.1:6677/metrics to see the aggregated metrics.

# HELP request_count_by_pod Request count by pod
# TYPE request_count_by_pod counter
request_count_by_pod{pod="pod-1e0"} 1337
request_count_by_pod{pod="pod-1ff"} 1278
request_count_by_pod{pod="pod-def"} 1280
# HELP request_latency_ms Request latency in ms distribution
# TYPE request_latency_ms histogram
request_latency_ms_bucket{pod="pod-1e0",le="0"} 3
request_latency_ms_bucket{pod="pod-1e0",le="100"} 333
request_latency_ms_bucket{pod="pod-1e0",le="200"} 683
request_latency_ms_bucket{pod="pod-1e0",le="300"} 991
request_latency_ms_bucket{pod="pod-1e0",le="+Inf"} 991
request_latency_ms_sum{pod="pod-1e0"} 268975
request_latency_ms_count{pod="pod-1e0"} 991
request_latency_ms_bucket{pod="pod-1ff",le="0"} 5
request_latency_ms_bucket{pod="pod-1ff",le="100"} 328
request_latency_ms_bucket{pod="pod-1ff",le="200"} 661
request_latency_ms_bucket{pod="pod-1ff",le="300"} 978
request_latency_ms_bucket{pod="pod-1ff",le="+Inf"} 978
request_latency_ms_sum{pod="pod-1ff"} 250721
request_latency_ms_count{pod="pod-1ff"} 978
request_latency_ms_bucket{pod="pod-def",le="0"} 1
request_latency_ms_bucket{pod="pod-def",le="100"} 324
request_latency_ms_bucket{pod="pod-def",le="200"} 640
request_latency_ms_bucket{pod="pod-def",le="300"} 984
request_latency_ms_bucket{pod="pod-def",le="+Inf"} 984
request_latency_ms_sum{pod="pod-def"} 254033
request_latency_ms_count{pod="pod-def"} 984

Usage on Kubernetes

Run the following to install events2prom on a Kubernetes cluster. See the config file to edit the config:

$ kubectl apply -f ./examples/config/k8s.yaml

Run an example program to produce events2prom events:

$ kubectl apply -f ./examples/config/example-app-k8s.yaml

Run the following command to ensure both events2prom and example application is running:

$ kubectl get pods -n events2prom
NAME                 READY   STATUS    RESTARTS   AGE
events2prom-7gmr8           1/1     Running   0          5m31s
events2prom-97vw6           1/1     Running   0          5m3s
events2prom-dp9z4           1/1     Running   0          5m22s
events2prom-dvwbn           1/1     Running   0          5m17s
events2prom-example-47zq6   1/1     Running   0          32s
events2prom-example-6dr8c   1/1     Running   0          32s
events2prom-example-k4b76   1/1     Running   0          32s
events2prom-example-ltkqx   1/1     Running   0          32s
events2prom-example-s5lgq   1/1     Running   0          32s
events2prom-sxtpc           1/1     Running   0          4m58s

events2prom will run as a DaemonSet and will publish Prometheus metrics. Run Prometheus to scrape the events2prom output.

More Repositories

1

hey

HTTP load generator, ApacheBench (ab) replacement
Go
17,864
star
2

boom

HTTP(S) load generator, ApacheBench (ab) replacement, written in Go
Go
4,745
star
3

statik

Embed files into a Go executable
Go
3,649
star
4

go-hardware

A directory of hardware related libs, tools, and tutorials for Go
Go
1,329
star
5

gom

A visual interface to work with runtime profiling data for Go
Go
1,295
star
6

gotest

go test with colors
Go
1,242
star
7

coop

Cheat sheet for some of the common concurrent flows in Go
Go
1,214
star
8

autopprof

Pprof made easy at development time for Go
Go
738
star
9

drive

Pull or push Google Drive files
Go
465
star
10

openai-go

Go client libraries for OpenAI
Go
443
star
11

go-test-trace

Go test with tracing.
Go
381
star
12

govalidate

Validates your Go installation and dependencies.
Go
335
star
13

portmidi

Go bindings for libportmidi
Go
283
star
14

globalconf

Persist flag values into an ini file
Go
275
star
15

magicmime

Go bindings for libmagic to detect MIME types
Go
216
star
16

ticktock

A cron job scheduler for Go
Go
209
star
17

go2xcode

Go package to Xcode project generator
Go
177
star
18

fake-it-til-you-make-it

A program that demonstrates that GitHub contribution graph can be cheated
Go
147
star
19

golambda

AWS Lambda Go functions made easy...
Go
137
star
20

launchpad

Talk to your Novation Launchpad in Go
Go
130
star
21

pprof-merge

Merge multiple pprof profile files into a single file
Go
118
star
22

goproxy-s3

Go proxy that serves from S3
Go
104
star
23

go-sql-driver-spanner

Google Cloud Spanner driver for Go
Go
89
star
24

awesome-spanner

A curated list of awesome Google Cloud Spanner references, tools, libraries and more.
82
star
25

coinsensus

Decentralized distributed systems consensus
62
star
26

opencensus-grpc-demo

Export metrics and traces from gRPC servers and clients
Java
59
star
27

spannerz

Google Cloud Spanner Query Planner Visualizer
Go
59
star
28

aws-containers

My personal mind map of container platforms and tools on AWS
53
star
29

gowiki

Personal fork of Go wiki
47
star
30

command

CLI subcommands for Go
Go
44
star
31

trace

Drafts of a Dapper-style tracing client for Go
Go
44
star
32

obs-luts

LUT files to use with OBS
43
star
33

littlebits

littleBits Go module -- an io.Reader and io.Writer to read from and write to a circuit
Go
40
star
34

dfanout

A simple HTTP/2 fanout server
Go
38
star
35

goutil

Various Go utility packages.
Go
37
star
36

gce-metadata

GCE metadata command line tool
Go
32
star
37

myko

A simple attribution engine.
Go
28
star
38

log-to-xray

Write log entries, get X-Ray traces.
Go
27
star
39

pprof-upload

Upload pprof output to continuous profiler
Go
26
star
40

keys

Let your golang programs store and access passwords in a secure way
Go
26
star
41

go-numa

NUMA bindings for Go, requires libnuma.
Go
24
star
42

httpaa

Where http.HaandleFunc and alike lives.
Go
23
star
43

drummachine

Akai MPD18 replica written in Go, runs on mobile devices
Go
21
star
44

go-xcode

Reference Xcode project to build iOS apps with Go
Makefile
18
star
45

firmata

Firmata client for Go
Arduino
18
star
46

k8s-helloworld-leaderelection

Go
16
star
47

audio

Go
15
star
48

bubblr

Android client for App Engine Channels API
Java
15
star
49

rrqueue

Simple priority queues and round robin consumer for golang
Go
15
star
50

cosmicbackgroundmusic

Go
13
star
51

mysql-args-anonymizer

Go
13
star
52

sensors

Experiments with Android NDK sensors and Go
Go
13
star
53

redfail

Simple command to colorize the stderr of a target program
Go
12
star
54

opentelemetry-metric-go

Experiments, no real code.
Go
12
star
55

node-plussignin

Google+ Sign In middleware for Connect.
JavaScript
12
star
56

gcp-connectivitytests

Google Cloud Connectivity Tests
Go
11
star
57

perf2cloudprofiler

Upload perf output to Google Cloud profiler from anywhere
Go
10
star
58

drivefuse

Google Drive for Linux, BSD and MacOSX
C
10
star
59

grpcutil

Go
9
star
60

spanner-dotfiles

A set of personal aliases to use with Google Cloud Spanner.
7
star
61

talks

7
star
62

go-brillo

Go development notes for the Brillo targets. (External contributors who are willing to contribute are welcomed to comment.)
7
star
63

go-benchmarks

6
star
64

al

OpenAL bindings for Go (work-in-progress)
6
star
65

janis

The missing components of Android SDK
Java
6
star
66

pizza

rakyll.pizza
Go
6
star
67

rakyll.github.io

HTML
5
star
68

blinker

A tiny Raspberry Pi program controlled by a Go mobile app
Go
5
star
69

pubsub

Go
5
star
70

rakyll

Public profile...
5
star
71

refutil

Personal collection of reflection utils for Go
Go
4
star
72

benchmarks

Interesting Go benchmarks to watch
Go
4
star
73

experimental

Experimental Go packages
Go
3
star
74

node-ini

Simple ini reader for Node.js
JavaScript
3
star
75

snippetr

Extract code snippets from source code.
JavaScript
3
star
76

go0

$ docker run -i -t rakyll/go0
Dockerfile
2
star
77

ecs-metadata-proxy

Proxy to debug metadata server in ECS tasks
Go
2
star
78

aestaticdeploy

Takes a static directory and serves it on Google App Engine
Go
2
star
79

zigot

En extensible protocol for cloud storage, against of proprietary APIs.
2
star
80

appdatapreferences-localstorage

Syncs your local storage to Google Drive's appdata folder.
JavaScript
2
star
81

skeleton

skeletons for go projects
Go
1
star
82

travis-build

Go
1
star
83

colab-gemini

Jupyter Notebook
1
star
84

trace2

Go
1
star
85

allgo

All Go is a repo to be used to test godoc command and godoc.org
Go
1
star
86

dockerfiles

All images are ARMv7
1
star
87

reviews

Catch all repo for reviewing things.
1
star