mqtt-exporter

by funkypenguin

Helm chartv1.1.2App 1.0.0Verified publisher

Simple and generic Prometheus exporter for MQTT. Tested with Mosquitto MQTT and Xiaomi sensors.

About this chart

mqtt-exporter

Simple and generic Prometheus exporter for MQTT. Tested with Mosquitto MQTT and Xiaomi sensors.

This chart is not maintained by the upstream project and any issues with the chart should be raised here

Source Code

Requirements

Kubernetes: >=1.16.0-0

Dependencies

RepositoryNameVersion
https://library-charts.k8s-at-home.comcommon4.5.2

TL;DR

helm repo add k8s-at-home https://k8s-at-home.com/charts/
helm repo update
helm install mqtt-exporter k8s-at-home/mqtt-exporter

Installing the Chart

To install the chart with the release name mqtt-exporter

helm install mqtt-exporter k8s-at-home/mqtt-exporter

Uninstalling the Chart

To uninstall the mqtt-exporter deployment

helm uninstall mqtt-exporter

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

Configuration

Read through the values.yaml file. It has several commented out suggested values. Other values may be used from the values.yaml from the common library.

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

helm install mqtt-exporter \
  --set env.TZ="America/New York" \
    k8s-at-home/mqtt-exporter

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

helm install mqtt-exporter k8s-at-home/mqtt-exporter -f values.yaml

Custom configuration

N/A

Values

Important: When deploying an application Helm chart you can add more values from our common library chart here

KeyTypeDefaultDescription
envobjectSee belowenvironment variables. See image docs for more details.
env.LOG_LEVELstring"INFO"Logging level
env.MQTT_ADDRESSstring"127.0.0.1"IP or hostname of MQTT broker
env.MQTT_IGNORED_TOPICSstringnilComma-separated lists of topics to ignore. Accepts wildcards.
env.MQTT_KEEPALIVEint60Keep alive interval to maintain connection with MQTT broker
env.MQTT_PASSWORDstringnilPassword which should be used to authenticate against the MQTT broker
env.MQTT_PORTint1883TCP port of MQTT broker
env.MQTT_TOPICstring"#"Topic path to subscribe to
env.MQTT_USERNAMEstringnilUsername which should be used to authenticate against the MQTT broker
env.PROMETHEUS_PORTint9000HTTP server PORT to expose Prometheus metrics
env.PROMETHEUS_PREFIXstring"mqtt_"Prefix added to the metric name, example: mqtt_temperature
env.TOPIC_LABELstring"topic"Define the Prometheus label for the topic, example temperature{topic="device1"}
env.TZstring"UTC"Set the container timezone
env.ZIGBEE2MQTT_AVAILABILITYstring"False"Normalize sensor name for device availability metric added by Zigbee2MQTT
image.pullPolicystring"IfNotPresent"image pull policy
image.repositorystring"kpetrem/mqtt-exporter"image repository
image.tagstring"latest"image tag
ingress.mainobjectSee values.yamlEnable and configure ingress settings for the chart under this key.
metrics.enabledboolSee values.yamlEnable and configure a Prometheus serviceMonitor for the chart under this key.
metrics.serviceMonitor.intervalstring"30s"Interval at which Prometheus should scrape metrics
metrics.serviceMonitor.labelsobject{}Additional labels for the Kubernetes ServiceMonitor object
metrics.serviceMonitor.scrapeTimeoutstring"10s"Timeout after which the scrape is ended
persistenceobjectSee values.yamlConfigure persistence settings for the chart under this key.
securityContext.capabilities.drop[0]string"ALL"
securityContext.readOnlyRootFilesystembooltrue
securityContext.runAsNonRootbooltrue
securityContext.runAsUserint65534
serviceobjectSee values.yamlConfigures service settings for the chart.

Changelog

Version 1.1.2

Added

N/A

Changed

  • Upgraded common chart dependency to version 4.5.2

Fixed

N/A

Older versions

A historical overview of changes can be found on ArtifactHUB

Support


Autogenerated from chart metadata using helm-docs v0.1.1

Deploy mqtt-exporter with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has mqtt-exporter 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 chartmqtt-exporter is pinned at v1.1.2 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