prometheus-snmp-exporter

by joaquinito2051

Helm chartv0.0.2App 0.14.0

Prometheus SNMP Exporter

About this chart

Prometheus SNMP Exporter

Prometheus exporter for snmp monitoring

Learn more: https://github.com/prometheus/snmp_exporter

TL;DR;

$ helm install <helm-repo>/prometheus-snmp-exporter

$ helm install stable/prometheus-snmp-exporter

Introduction

This chart creates a SNMP-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:

$ helm install --name my-release <helm-repo>/prometheus-snmp-exporter

$ helm install --name my-release stable/prometheus-snmp-exporter The command deploys SNMP 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:

$ 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 SNMP-Exporter chart and their default values.

ParameterDescriptionDefault
configPrometheus SNMP configuration{}
configmapReload.nameconfigmap-reload container nameconfigmap-reload
configmapReload.image.repositoryconfigmap-reload container image repositoryjimmidyson/configmap-reload
configmapReload.image.tagconfigmap-reload container image tagv0.2.2
configmapReload.image.pullPolicyconfigmap-reload container image pull policyIfNotPresent
configmapReload.extraArgsAdditional configmap-reload container arguments{}
configmapReload.extraConfigmapMountsAdditional configmap-reload configMap mounts[]
configmapReload.resourcesconfigmap-reload pod resource requests & limits{}
extraArgsOptional flags for exporter[]
image.repositorycontainer image repositoryprom/snmp-exporter
image.tagcontainer image tagv0.12.0
image.pullPolicycontainer image pull policyIfNotPresent
ingress.annotationsIngress annotationsNone
ingress.enabledEnables Ingressfalse
ingress.hostsIngress accepted hostnamesNone
ingress.tlsIngress TLS configurationNone
nodeSelectornode labels for pod assignment{}
tolerationsnode tolerations for pod assignment[]
affinitynode affinity for pod assignment{}
podAnnotationsannotations to add to each pod{}
resourcespod resource requests & limits{}
restartPolicycontainer restart policyAlways
service.annotationsannotations for the service{}
service.labelsadditional labels for the serviceNone
service.typetype of service to createClusterIP
service.portport for the snmp http service9116
service.externalIPslist of external ips[]
rbac.createUse Role-based Access Controltrue
serviceAccount.createShould we create a ServiceAccounttrue
serviceAccount.nameName of the ServiceAccount to usenull
serviceMonitor.enabledEnables ServiceMonitorfalse

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

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
$ helm install --name my-release \
    --set key_1=value_1,key_2=value_2 \
    <helm-repo>/prometheus-snmp-exporter
$ helm install --name my-release \

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

# example for staging
$ helm install --name my-release -f values.yaml <helm-repo>/prometheus-snmp-exporter

$ helm install --name my-release -f values.yaml stable/prometheus-snmp-exporter

Tip: You can use the default values.yaml

Prometheus Configuration

The snmp exporter needs to be passed the address as a parameter, this can be done with relabelling.

Example config:

scrape_configs:
  - job_name: 'snmp'
    static_configs:
      - targets:
        - 192.168.1.2  # SNMP device.
    metrics_path: /snmp
    params:
      module: [if_mib]
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: my-service-name:9116  # The SNMP exporter's Service name and port.

See prometheus/snmp_exporter/README.md for further information.

Deploy prometheus-snmp-exporter with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has prometheus-snmp-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 chartprometheus-snmp-exporter is pinned at v0.0.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