zabbix-agent

by Helm

Helm chartv0.0.5App 6.4.0-latest

Zabbix monitoring server

About this chart

Zabbix agent

Zabbix is a monitoring system.

Zabbix agent is used by zabbix server to run checks.

TL;DR;

$ helm repo add fermosit https://harbor.fermosit.es/chartrepo/library
$ helm upgrade --install fermosit/zabbix-agent

Introduction

This chart bootstraps a Zabbix agent deployment on a Kubernetes cluster using the Helm package manager.

Source code: https://github.com/elmanytas/zabbix-kubernetes/zabbix-agent

Report bugs here: https://github.com/elmanytas/zabbix-kubernetes/issues

Prerequisites

  • Kubernetes 1.12+
  • Helm 2.11+ or Helm 3.0-beta4+

Installing the Chart

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

$ helm repo add fermosit https://harbor.fermosit.es/chartrepo/library
$ helm install my-release fermosit/zabbix-agent

The command deploys Zabbix Agent on the Kubernetes cluster using default configuration. The Parameters section lists the parameters that can be configured during installation.

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall/delete the my-release deployment:

$ helm delete my-release

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

Parameters

The following table lists the configurable parameters of the Zabbix Agent chart and their default values.

ParameterDescriptionDefault
image.registryZabbix agent image registrydocker.io
image.repositoryZabbix agent image namezabbix/zabbix-agent
image.tagZabbix agent image tag{TAG_NAME}
image.pullPolicyImage pull policyIfNotPresent
image.pullSecretsSpecify docker-registry secret names as an array[] (does not add image pull secrets to deployed pods)
nameOverride.Strings to partially override fullname templates with a string (will prepend the release name)nil
fullnameOverride.Strings to fully override fullname templates with a stringnil
livenessProbe.initialDelaySecondsDelay before liveness probe is initiated60
livenessProbe.periodSecondsHow often to perform the probe10
livenessProbe.timeoutSecondsWhen the probe times out5
livenessProbe.failureThresholdMinimum consecutive failures for the probe6
livenessProbe.successThresholdMinimum consecutive successes for the probe1
readinessProbe.initialDelaySecondsDelay before readiness probe is initiated10
readinessProbe.periodSecondsHow often to perform the probe10
readinessProbe.timeoutSecondsWhen the probe times out5
readinessProbe.failureThresholdMinimum consecutive failures for the probe6
readinessProbe.successThresholdMinimum consecutive successes for the probe1
schedulerNameName of the alternate schedulernil
nodeSelectorNode labels for pod assignment{}
tolerationsList of node taints to tolerate[]
affinityMap of node/pod affinities{}
podAnnotationsPod annotations{}
updateStrategySet up update strategyRollingUpdate for web and Recreate for server
zabbix_varsVariables in lowercase passed to deployments in uppercaseDefault zabbix variables

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

helm repo add fermosit https://harbor.fermosit.es/chartrepo/library
helm upgrade --install zabbix-agent fermosit/zabbix-agent \
  --namespace zabbix \
  --set zabbix_vars.zbx_activeservers=zabbix.example.com \
  --set zabbix_vars.zbx_hostname=agent.example.com

The above command sets the visible Zabbix installation name in right top corner of the web interface.

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

$ helm install --name my-release -f values.yaml fermosit/zabbix-agent

Tip: You can use the default values.yaml

Configuration and installation details

Zabbix variables

Zabbix variables are defined in zabbix_vars dictionary in lowercase.

All variables are converted to uppercase in deployment time.

Take a look to the repository readme to configure all variables you need.

Active/pasive checks

Zabbix supports active and passive checks.

Pasive checks configuration example:

zabbix_vars:
  zbx_passiveservers=zabbix.example.com

Active checks configuration example:

zabbix_vars:
  zbx_activeservers=zabbix.example.com
  zbx_hostname=agent_name

Remember that zabbix uses ports 10050 and 10051 for passive and active checks, so, if agent and server are not in the same kubernetes cluster, you need to expose the right port using a LoadBalancer service in agent or server or add in your nginx ingress controller something similar to:

tcp:
  '10050': zabbix/zabbix-zabbix-agent:10050

In a Kubernetes environment using active checks could be easyer than using pasive checks.

Deploy zabbix-agent with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has zabbix-agent 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 chartzabbix-agent is pinned at v0.0.5 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