promitor-agent-scraper
by Promitor
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.
| Parameter | Description | Default |
|---|---|---|
image.repository | Repository which provides the image | containers.promitor.io/tomkerkhove/promitor-agent-scraper |
image.tag | Tag of image to use | None, chart app version is used by default |
image.pullPolicy | Policy to pull image | Always |
image.pullSecrets | ImagePullSecrets for the pod | [] |
azureAuthentication.appId | [Deprecated] Use azureAuthentication.identity.id instead | |
azureAuthentication.appKey | [Deprecated] User azureAuthentication.identity.key instead | |
azureAuthentication.mode | Authentication type to use to authenticate. Options are ServicePrincipal (default), UserAssignedManagedIdentity or SystemAssignedManagedIdentity | |
azureAuthentication.identity.id | Id of the Azure AD entity to authenticate with | |
azureAuthentication.identity.key | Secret of the Azure AD entity to authenticate with | |
azureAuthentication.identity.binding | Aad Pod Identity name, when using UserAssignedManagedIdentity or SystemAssignedManagedIdentity as mode | |
concurrency.mutexTimeoutSeconds | A scrape job's maximum time hold(in seconds) a scraping mutex. | 90 |
resourceDiscovery.enabled | Indication whether or not resource discovery is required | false |
resourceDiscovery.host | DNS name or IP address of the Promitor Resource Discovery agent | |
resourceDiscovery.port | Port (UDP) address of the Promitor Resource Discovery agent | 80 |
metricSinks.atlassianStatuspage.enabled | Indication whether or not metrics should be emitted to a StatsD server | false |
metricSinks.atlassianStatuspage.pageId | Id of Atlassian Statuspage page | |
metricSinks.atlassianStatuspage.apiKey | API key of Atlassian Statuspage page | |
metricSinks.atlassianStatuspage.systemMetricMapping | Mapping of the Atlassian Statuspage system metrics and Promitor metrics. Learn how to configure it below. | None |
metricSinks.openTelemetryCollector.enabled | Indication whether or not metrics should be pushed to an OpenTelemetry Collector | false |
metricSinks.openTelemetryCollector.collectorUri | Uri of the OpenTelemetry Collector to push metrics to where the scraping endpoint for Prometheus is being exposed | `` |
metricSinks.prometheusScrapingEndpoint.enabled | Indication whether or not metrics should be exposed as a Prometheus scraping endpoint | true |
metricSinks.prometheusScrapingEndpoint.baseUriPath | Path where the scraping endpoint for Prometheus is being exposed | /metrics |
metricSinks.prometheusScrapingEndpoint.enableMetricTimestamps | Indication whether or not to include timestamp | true |
metricSinks.prometheusScrapingEndpoint.metricUnavailableValue | Value to report in Prometheus when no metric was found whether or not to include timestamp | NaN |
metricSinks.prometheusScrapingEndpoint.enableServiceDiscovery | Indication whether or not service discovery with annotations should be enabled (docs) | true |
metricSinks.prometheusScrapingEndpoint.serviceMonitor.enabled | Indication whether or not to create a ServiceMonitor object for Prometheus Operator | false |
metricSinks.prometheusScrapingEndpoint.serviceMonitor.namespace | The namespace where the ServiceMonitor should be created | |
metricSinks.prometheusScrapingEndpoint.serviceMonitor.labels | Labels for the ServiceMonitor | {} |
metricSinks.prometheusScrapingEndpoint.serviceMonitor.interval | How often Prometheus should scrape | 60s |
metricSinks.prometheusScrapingEndpoint.serviceMonitor.timeout | Timeout for the scraping operation | 10s |
metricSinks.prometheusScrapingEndpoint.serviceMonitor.metricRelabelings | MetricRelabelConfigs to apply to samples before ingestion. | [] |
metricSinks.prometheusScrapingEndpoint.serviceMonitor.relabelings | RelabelConfigs to apply to samples before scraping. | [] |
metricSinks.statsd.enabled | Indication whether or not metrics should be emitted to a StatsD server | false |
metricSinks.statsd.host | DNS name or IP address of StatsD server | |
metricSinks.statsd.port | Port (UDP) address of StatsD server | 8125 |
metricSinks.statsd.metricPrefix | Prefix that will be added to every metric defined in the metric declaration | |
prometheusRule.enabled | Indication whether or not to create PrometheusRule object(s) for Prometheus operator | false |
prometheusRule.additionalLabels | Additional labels that can be used so prometheusRules will be discovered by Prometheus | {} |
prometheusRule.interval | Interval determines how often rules in the group are evaluated (docs) | `` |
prometheusRule.namespace | namespace where prometheusRules object should be created | |
prometheusRule.rules | rules to be created | [] |
telemetry.applicationInsights.enabled | Indication whether or not to send telemetry to Azure Application Insights | false |
telemetry.applicationInsights.logLevel | Minimum level of logging for Azure Application Insights | |
telemetry.applicationInsights.key | Application Insights instrumentation key | |
telemetry.containerLogs.enabled | Indication whether or not to send telemetry to container logs | true |
telemetry.containerLogs.logLevel | Minimum level of logging for container logs | |
telemetry.defaultLogLevel | Minimum level of logging for all telemetry sinks, unless specified otherwise | Error |
azureMetadata.tenantId | Id of Azure tenant | |
azureMetadata.subscriptionId | Id of Azure subscription | |
azureMetadata.resourceGroupName | Name of resource group | promitor |
azureMetadata.cloud | Azure Cloud to authenticated and scraping metrics from. Options are Global (default), China, UsGov & Germany | Global |
metricDefaults.aggregation.interval | Default interval which defines over what period measurements of a metric should be aggregated | 00:05:00 |
metricDefaults.scraping.schedule | Cron expression that controls the fequency in which all the configured metrics will be scraped from Azure Monitor | */5 * * * * |
metrics | List of metrics to scrape configured following the metric declaration docs | |
azureMonitor.logging.enabled | Indication whether or not to provide logs on the integration with Azure Monitor and its APIs | false |
azureMonitor.logging.logLevel | Minimum level of logging for Azure Monitor interactions | N/A |
azureMonitor.integration.useAzureMonitorSdk | Whether to use the Azure Monitor SDK for scraping; alternative is the legacy Azure Management Library | true |
azureMonitor.integration.metricsBatching.enabled | Whether to scrape metrics in batch mode | false |
azureMonitor.integration.metricsBatching.maxBatchSize | Max number of resources within a batch | 50 |
azureMonitor.integration.metricsBatching.azureRegion | Azure region of resource targets for batching | |
azureMonitor.integration.history.startingFromInHours | Defines the amount of hours Promitor will use to define the starting point of the time window used for metric queries. | N/A |
rbac.create | If true, create & use RBAC resources | true |
rbac.podSecurityPolicyEnabled | Create pod security policy resources | false |
rbac.serviceAccount.create | Create service account resource | true |
rbac.serviceAccount.name | Service account name to use if create is false. If create is true, a name is generated using the fullname template | promitor-scraper |
rbac.serviceAccount.annotations | Service account annotations | {} |
rbac.serviceAccount.automountServiceAccountToken | If service account token should be mounted inside pod | false |
health.readiness.enabled | Indication if readiness probes should be used | true |
health.readiness.verifyDependencies | Indication 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.delay | Amount of seconds to wait before probing the container to verify if it's ready | 5 |
health.readiness.interval | Amount of seconds to wait before probing the container again to verify if it's ready after the last attempt | 5 |
health.readiness.thresholds.failure | Number of retries after first failed check before container will be marked Unready | 3 |
health.readiness.thresholds.success | Minimum consecutive successes for the probe to be considered successful after having failed | 1 |
health.readiness.timeoutSeconds | Amount of seconds after which the probe times out | 1 |
health.liveness.enabled | Indication if liveness probes should be used | true |
health.liveness.verifyDependencies | Indication 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.delay | Amount of seconds to wait before probing the container to verify if it's still alive | 5 |
health.liveness.interval | Amount of seconds to wait before probing the container again to verify if it's still alive after the last attempt | 30 |
health.liveness.thresholds.failure | Number of retries after first failed check before container restart | 3 |
health.liveness.thresholds.success | Minimum consecutive successes for the probe to be considered successful after having failed | 1 |
health.liveness.timeoutSeconds | Amount of seconds after which the probe times out | 1 |
affinity | Affinity settings (docs) | {} |
nodeSelector | Node labels for pod assignment | {} |
podLabels | Additional pod labels to include | {} |
annotations | Additional annotations to include | {} |
priorityClassName | Priority class to be used by pod (docs) | "" |
securityContext.enabled | Whether to include custom security context for pod or not | true |
securityContext.* | Custom security context object for pod (docs) | runAsGroup: 10000runAsNonRoot: truerunAsUser: 10000seccompProfile: type: RuntimeDefault |
containerSecurityContext.enabled | Whether to include custom security context for container or not | true |
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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartpromitor-agent-scraper is pinned at v2.16.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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