Back to Charts

⚠️ Repo Archive Notice

stable/stackdriver-exporter/README.md

latest7.4 KB
Original Source

⚠️ Repo Archive Notice

As of Nov 13, 2020, charts in this repo will no longer be updated. For more information, see the Helm Charts Deprecation and Archive Notice, and Update.

Stackdriver Exporter

Prometheus exporter for Stackdriver, allowing for Google Cloud metrics. You must have appropriate IAM permissions for this exporter to work. If you are passing in an IAM key then you must have:

  • monitoring.metricDescriptors.list
  • monitoring.timeSeries.list

These are contained within roles/monitoring.viewer. If you're using legacy access scopes, then you must have https://www.googleapis.com/auth/monitoring.read.

Learn more: https://github.com/frodenas/stackdriver_exporter

DEPRECATION NOTICE

This chart is deprecated and no longer supported.

TL;DR;

bash
$ helm install stable/stackdriver-exporter --set stackdriver.projectId=google-project-name

Introduction

This chart creates a Stackdriver-Exporter deployment on a Kubernetes cluster using the Helm package manager.

Prerequisites

  • Kubernetes 1.8+ with Beta APIs enabled

Installing the Chart

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

bash
$ helm install --name my-release stable/stackdriver-exporter --set stackdriver.projectId=google-project-name

The command deploys Stackdriver-Exporter on the Kubernetes cluster using the default configuration. The configuration section lists the parameters that can be configured during installation.

Uninstalling the Chart

To uninstall/delete the my-release deployment:

bash
$ helm delete --purge 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 of the Stackdriver-Exporter chart and their default values.

ParameterDescriptionDefault
replicaCountDesired number of pods1
restartPolicyContainer restart policyAlways
image.repositoryContainer image repositoryfrodenas/stackdriver-exporter
image.tagContainer image tagv0.6.0
image.pullPolicyContainer image pull policyIfNotPresent
resourcesResource requests & limits{}
serviceAccount.nameName of Kubernetes service account to use"" (defaults to default)
serviceAccount.createToggle for service account creationfalse
serviceAccount.annotationsAnnotations for service account. Only used if create is true.nil
service.typeType of service to createClusterIP
service.httpPortPort for the http service9255
stackdriver.projectIdGCP Project ID``
stackdriver.serviceAccountSecretOptionally specify an existing secret which contains credentials.json if necessary.""
stackdriver.serviceAccountKeyOptionally specify the service account key JSON file. Must be provided when no existing secret is used, in this case a new secret will be created holding this service account""
stackdriver.maxRetriesMax number of retries that should be attempted on errors from Stackdriver0
stackdriver.httpTimeoutHow long should Stackdriver_exporter wait for a result from the Stackdriver API10s
stackdriver.maxBackoffMax time between each request in an exponential backoff scenario5s
stackdriver.backoffJitterThe amount of jitter to introduce in an exponential backoff scenario1s
stackdriver.retryStatusesThe HTTP statuses that should trigger a retry503
stackdriver.metrics.typePrefixesComma separated Metric Type prefixescompute.googleapis.com/instance/cpu
stackdriver.metrics.intervalMetrics interval to request from GCP5m
stackdriver.metrics.offsetOffset (into the past) to request0s
web.listenAddressPort to listen on9255
web.pathPath under which to expose metrics/metrics
annotationsDeployment annotations{}
affinityPod affinity{}
nodeSelectorNode labels for pod assignment{}
tolerationsNode taints to tolerate (requires Kubernetes >=1.6)[]
serviceMonitor.enabledif true, creates a Prometheus Operator ServiceMonitorfalse
serviceMonitor.namespaceNamespace where you want to create the ServiceMonitormonitoring
serviceMonitor.additionalLabelsLabels used by Prometheus Operator to discover your Service Monitor. Set according to your Prometheus setup{}
monitoring
serviceMonitor.intervalHow frequently to scrape metrics (not set: fall back to Prometheus' default)nil
serviceMonitor.honorLabelsif true, label conflicts are resolved by keeping label values from the scraped datatrue

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

bash
$ helm install --name my-release \
    --set key_1=value_1,key_2=value_2 \
    stable/stackdriver-exporter

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

bash
# example for staging
$ helm install --name my-release -f values.yaml stable/stackdriver-exporter

Tip: You can use the default values.yaml, as long as you provide a value for stackdriver.projectId

Google Storage Metrics

In order to get metrics for GCS you need to ensure the metrics interval is > 24h. You can read more information about this in this bug report.

The easiest way to do this is to create two separate exporters with different prefixes and intervals, to ensure you gather all appropriate metrics.