mm

command module
v0.0.0-...-a7b1af8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2017 License: Apache-2.0 Imports: 19 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

mm

Problem - many of existing software in Kubernetes ecosystem already expose metrics in prometheus format, for example k8s apiserver or etcd. What if you want to store metrics in InfluxDB?

Metrics middleware for Kubernetes helps with selecting services which exposes metrics by label, pull prometheus metrics from them, then convert them and push to InfluxDB.

Requirements

Quickstart

# start local k8s cluster
$ minikube start
# deploy monitoring services
$ minikube addons enable heapster
# expose InfluxDB service
$ kubectl expose service monitoring-influxdb --namespace=kube-system --type=NodePort --name influxdb
# check that you have 2 URL's
# then open first URL, connect to DB using port from second URL and then create a new database
$ minikube service influxdb --url --namespace kube-system
# deploy prometheus node exporter from https://github.com/coreos/kube-prometheus/tree/master/manifests/exporters
$ kubectl create -f kube/node-exporter-svc.yaml -f kube/node-exporter-ds.yaml
# test that it works
$ curl $(minikube ip):9100/metrics
# compile program
$ make install
# grab metrics and push them into InfluxDB
$ mm --metrics-services-label-selector=app:node-exporter --influxdb-service-namespace=kube-system --influxdb-service-name=influxdb --influxdb-database-name=<database-name>

For more complicated example with several metrics endpoints you may add common label to them like metrics=true.

Development

Look at Makefile targets to know available actions.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址