promitor-agent-scraper

by Promitor

Helm chartv2.16.1App 2.16.1MITVerified publisherOfficial

Promitor, bringing Azure Monitor metrics where you need them.

About this chart

Promitor

Promitor is an Azure Monitor scraper which makes the metrics available for metric systems such as Atlassian Statuspage, Prometheus and StatsD.

TL;DR

helm repo add promitor https://charts.promitor.io/
helm repo update
helm install promitor-agent-scraper promitor/promitor-agent-scraper

Introduction

This chart bootstraps a Promitor Scraper Agent deployment on a Kubernetes cluster using the Helm package manager. It will provide the scraper agent with a Kubernetes Service so that other Pods can consume it.

Prerequisites

  • Kubernetes v1.9 or above
  • Azure Subscription
  • Azure AD Application to authenticate with (docs)

Installing the Chart

To install the chart with the release name promitor-agent-scraper:

$ helm install promitor-agent-scraper promitor/promitor-agent-scraper \
               --set azureAuthentication.identity.mode='ServicePrincipal' \
               --set azureAuthentication.identity.id='<azure-ad-app-id>' \
               --set azureAuthentication.identity.key='<azure-ad-app-key>' \
               --values /path/to/metric-declaration.yaml

The command deploys Prometheus on the Kubernetes cluster with the specified metrics declaration, for more information see our documentation.

Uninstalling the Chart

To uninstall/delete the promitor-agent-scraper deployment:

helm uninstall promitor-agent-scraper

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 Promitor chart and their default values.

ParameterDescriptionDefault
image.repositoryRepository which provides the imagecontainers.promitor.io/tomkerkhove/promitor-agent-scraper
image.tagTag of image to useNone, chart app version is used by default
image.pullPolicyPolicy to pull imageAlways
image.pullSecretsImagePullSecrets for the pod[]
azureAuthentication.appId[Deprecated] Use azureAuthentication.identity.id instead
azureAuthentication.appKey[Deprecated] User azureAuthentication.identity.key instead
azureAuthentication.modeAuthentication type to use to authenticate. Options are ServicePrincipal (default), UserAssignedManagedIdentity or SystemAssignedManagedIdentity
azureAuthentication.identity.idId of the Azure AD entity to authenticate with
azureAuthentication.identity.keySecret of the Azure AD entity to authenticate with
azureAuthentication.identity.bindingAad Pod Identity name, when using UserAssignedManagedIdentity or SystemAssignedManagedIdentity as mode
concurrency.mutexTimeoutSecondsA scrape job's maximum time hold(in seconds) a scraping mutex.90
resourceDiscovery.enabledIndication whether or not resource discovery is requiredfalse
resourceDiscovery.hostDNS name or IP address of the Promitor Resource Discovery agent
resourceDiscovery.portPort (UDP) address of the Promitor Resource Discovery agent80
metricSinks.atlassianStatuspage.enabledIndication whether or not metrics should be emitted to a StatsD serverfalse
metricSinks.atlassianStatuspage.pageIdId of Atlassian Statuspage page
metricSinks.atlassianStatuspage.apiKeyAPI key of Atlassian Statuspage page
metricSinks.atlassianStatuspage.systemMetricMappingMapping of the Atlassian Statuspage system metrics and Promitor metrics. Learn how to configure it below.None
metricSinks.openTelemetryCollector.enabledIndication whether or not metrics should be pushed to an OpenTelemetry Collectorfalse
metricSinks.openTelemetryCollector.collectorUriUri of the OpenTelemetry Collector to push metrics to where the scraping endpoint for Prometheus is being exposed``
metricSinks.prometheusScrapingEndpoint.enabledIndication whether or not metrics should be exposed as a Prometheus scraping endpointtrue
metricSinks.prometheusScrapingEndpoint.baseUriPathPath where the scraping endpoint for Prometheus is being exposed/metrics
metricSinks.prometheusScrapingEndpoint.enableMetricTimestampsIndication whether or not to include timestamptrue
metricSinks.prometheusScrapingEndpoint.metricUnavailableValueValue to report in Prometheus when no metric was found whether or not to include timestampNaN
metricSinks.prometheusScrapingEndpoint.enableServiceDiscoveryIndication whether or not service discovery with annotations should be enabled (docs)true
metricSinks.prometheusScrapingEndpoint.serviceMonitor.enabledIndication whether or not to create a ServiceMonitor object for Prometheus Operatorfalse
metricSinks.prometheusScrapingEndpoint.serviceMonitor.namespaceThe namespace where the ServiceMonitor should be created
metricSinks.prometheusScrapingEndpoint.serviceMonitor.labelsLabels for the ServiceMonitor{}
metricSinks.prometheusScrapingEndpoint.serviceMonitor.intervalHow often Prometheus should scrape60s
metricSinks.prometheusScrapingEndpoint.serviceMonitor.timeoutTimeout for the scraping operation10s
metricSinks.prometheusScrapingEndpoint.serviceMonitor.metricRelabelingsMetricRelabelConfigs to apply to samples before ingestion.[]
metricSinks.prometheusScrapingEndpoint.serviceMonitor.relabelingsRelabelConfigs to apply to samples before scraping.[]
metricSinks.statsd.enabledIndication whether or not metrics should be emitted to a StatsD serverfalse
metricSinks.statsd.hostDNS name or IP address of StatsD server
metricSinks.statsd.portPort (UDP) address of StatsD server8125
metricSinks.statsd.metricPrefixPrefix that will be added to every metric defined in the metric declaration
prometheusRule.enabledIndication whether or not to create PrometheusRule object(s) for Prometheus operatorfalse
prometheusRule.additionalLabelsAdditional labels that can be used so prometheusRules will be discovered by Prometheus{}
prometheusRule.intervalInterval determines how often rules in the group are evaluated (docs)``
prometheusRule.namespacenamespace where prometheusRules object should be created
prometheusRule.rulesrules to be created[]
telemetry.applicationInsights.enabledIndication whether or not to send telemetry to Azure Application Insightsfalse
telemetry.applicationInsights.logLevelMinimum level of logging for Azure Application Insights
telemetry.applicationInsights.keyApplication Insights instrumentation key
telemetry.containerLogs.enabledIndication whether or not to send telemetry to container logstrue
telemetry.containerLogs.logLevelMinimum level of logging for container logs
telemetry.defaultLogLevelMinimum level of logging for all telemetry sinks, unless specified otherwiseError
azureMetadata.tenantIdId of Azure tenant
azureMetadata.subscriptionIdId of Azure subscription
azureMetadata.resourceGroupNameName of resource grouppromitor
azureMetadata.cloudAzure Cloud to authenticated and scraping metrics from. Options are Global (default), China, UsGov & GermanyGlobal
metricDefaults.aggregation.intervalDefault interval which defines over what period measurements of a metric should be aggregated00:05:00
metricDefaults.scraping.scheduleCron expression that controls the fequency in which all the configured metrics will be scraped from Azure Monitor*/5 * * * *
metricsList of metrics to scrape configured following the metric declaration docs
azureMonitor.logging.enabledIndication whether or not to provide logs on the integration with Azure Monitor and its APIsfalse
azureMonitor.logging.logLevelMinimum level of logging for Azure Monitor interactionsN/A
azureMonitor.integration.useAzureMonitorSdkWhether to use the Azure Monitor SDK for scraping; alternative is the legacy Azure Management Librarytrue
azureMonitor.integration.metricsBatching.enabledWhether to scrape metrics in batch modefalse
azureMonitor.integration.metricsBatching.maxBatchSizeMax number of resources within a batch50
azureMonitor.integration.metricsBatching.azureRegionAzure region of resource targets for batching
azureMonitor.integration.history.startingFromInHoursDefines the amount of hours Promitor will use to define the starting point of the time window used for metric queries.N/A
rbac.createIf true, create & use RBAC resourcestrue
rbac.podSecurityPolicyEnabledCreate pod security policy resourcesfalse
rbac.serviceAccount.createCreate service account resourcetrue
rbac.serviceAccount.nameService account name to use if create is false. If create is true, a name is generated using the fullname templatepromitor-scraper
rbac.serviceAccount.annotationsService account annotations{}
rbac.serviceAccount.automountServiceAccountTokenIf service account token should be mounted inside podfalse
health.readiness.enabledIndication if readiness probes should be usedtrue
health.readiness.verifyDependenciesIndication if readiness probes should verify if Promitor can interat with external dependencies. Do note that this will contact all dependencies which can have performance impact, cause throttling or cascading failures when consumed very often.false
health.readiness.delayAmount of seconds to wait before probing the container to verify if it's ready5
health.readiness.intervalAmount of seconds to wait before probing the container again to verify if it's ready after the last attempt5
health.readiness.thresholds.failureNumber of retries after first failed check before container will be marked Unready3
health.readiness.thresholds.successMinimum consecutive successes for the probe to be considered successful after having failed1
health.readiness.timeoutSecondsAmount of seconds after which the probe times out1
health.liveness.enabledIndication if liveness probes should be usedtrue
health.liveness.verifyDependenciesIndication if liveness probes should verify if Promitor can interat with external dependencies. Do note that this will contact all dependencies which can have performance impact, cause throttling or cascading failures when consumed very often.false
health.liveness.delayAmount of seconds to wait before probing the container to verify if it's still alive5
health.liveness.intervalAmount of seconds to wait before probing the container again to verify if it's still alive after the last attempt30
health.liveness.thresholds.failureNumber of retries after first failed check before container restart3
health.liveness.thresholds.successMinimum consecutive successes for the probe to be considered successful after having failed1
health.liveness.timeoutSecondsAmount of seconds after which the probe times out1
affinityAffinity settings (docs){}
nodeSelectorNode labels for pod assignment{}
podLabelsAdditional pod labels to include{}
annotationsAdditional annotations to include{}
priorityClassNamePriority class to be used by pod (docs)""
securityContext.enabledWhether to include custom security context for pod or nottrue
securityContext.*Custom security context object for pod (docs)runAsGroup: 10000runAsNonRoot: truerunAsUser: 10000seccompProfile: type: RuntimeDefault
containerSecurityContext.enabledWhether to include custom security context for container or nottrue

Deploy promitor-agent-scraper with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has promitor-agent-scraper 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 chartpromitor-agent-scraper is pinned at v2.16.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