diff --git a/prometheus-to-sd/Makefile b/prometheus-to-sd/Makefile index 311529554..353771da5 100644 --- a/prometheus-to-sd/Makefile +++ b/prometheus-to-sd/Makefile @@ -16,7 +16,7 @@ all: build ENVVAR = GOOS=linux GOARCH=amd64 CGO_ENABLED=0 PREFIX = gcr.io/google-containers -TAG = v0.2.6 +TAG = v0.3.0 build: $(ENVVAR) go build -a -o monitor diff --git a/prometheus-to-sd/README.md b/prometheus-to-sd/README.md index 753369e1c..b1fdea458 100644 --- a/prometheus-to-sd/README.md +++ b/prometheus-to-sd/README.md @@ -7,7 +7,7 @@ k8s cluster should run on GCE or GKE. ## Container Image -Look at the following link: https://gcr.io/google-containers/prometheus-to-sd and pick the latest image. +Look at the following link: https://gcr.io/google-containers/prometheus-to-sd and pick the latest image. # Usage @@ -39,6 +39,16 @@ the prometheus-to-sd. Values of the `namespace_id` and `pod_id` can be passed to the component through the additional flags or omitted. `container_name` is always empty for now. Field `zone` is overridable via flag. +## Scrape interval vs. export interval + +There are two flags: `scrape-interval` and `export-interval` that allow +specifying how often metrics are read from the sources and how often they are +exported to Stackdriver, respectively. By default both are set to 1m. The +scrapes can be more frequent than exports, however, to achieve grater precision +for metrics being exported. For example, if metrics are exported once every +minute and a container dies between scrapes, up to 1 minutes of metrics can be +lost. Frequent scrapes mitigate that, at the cost of elevated resource usage. + ## Deployment Example of [deployment](https://github.com/GoogleCloudPlatform/k8s-stackdriver/blob/master/prometheus-to-sd/kubernetes/prometheus-to-sd-kube-state-metrics.yaml)