prometheus-to-sd

by joaquinito2051

Helm chartv0.1.1App 0.2.2

Scrape metrics stored in prometheus format and push them to the Stackdriver

About this chart

prometheus-to-sd

prometheus-to-sd is a simple component that can scrape metrics stored in prometheus text format from one or multiple components and push them to the Stackdriver

TL;DR;

$ helm install <helm-repo>/prometheus-to-sd

$ helm install stable/prometheus-to-sd

Prerequisites

  • a service exposing metrics in prometheus format
  • k8s cluster should run on GCE or GKE

Installing the Chart

To install the chart with the release name my-release:

$ helm install --name my-release <helm-repo>/prometheus-to-sd

$ helm install --name my-release stable/prometheus-to-sd The command deploys prometheus-to-sd on the Kubernetes cluster in the default configuration.

Uninstalling the Chart

To uninstall/delete the my-release deployment:

$ helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Configuration

The following table lists the configurable parameters and their default values.

ParameterDescriptionDefault
image.repositoryprometheus-to-sd image repositorygcr.io/google-containers/prometheus-to-sd
image.tagprometheus-to-sd image tagv0.2.2
image.pullPolicyImage pull policyIfNotPresent
resourcesCPU/Memory resource requests/limits{}
portProfiler port6060
metricSourcesSources for metrics in the next format: component-name:http://host:port?whitelisted=a,b,c{}
nodeSelectornode labels for pod assignment{}

For more information please refer to the prometheus-to-sd documentation.

Specify each parameter using the --set key=value[,key=value] argument to helm install. For example,

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
$ helm install --name my-release \
  --set "metricsSources.kube-state-metrics=http://kube-state-metrics:8080" \
    <helm-repo>/prometheus-to-sd
$ helm install --name my-release \

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,

$ helm install --name my-release -f values.yaml <helm-repo>/prometheus-to-sd

$ helm install --name my-release -f values.yaml stable/prometheus-to-sd Multiple metrics sources can be defined.

Deploy prometheus-to-sd with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has prometheus-to-sd on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartprometheus-to-sd is pinned at v0.1.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply