zabbix-server

by andry.kondratiev

Helm chartv1.0.6App 5.4.6Apache-2.0Verified publisher

Zabbix is a mature and effortless enterprise-class open source monitoring solution for network monitoring and application monitoring of millions of metrics.

About this chart

Helm Chart For Zabbix.

Introduction

This Helm chart installs Zabbix in a Kubernetes cluster.

Important note

This helm chart is still under developpement

Prerequisites

  • Kubernetes cluster 1.10+
  • Helm 3.0+
  • PV provisioner support in the underlying infrastructure.

Configure the chart

The items of section Configuration can be set via --set flag during installation or change the values according to the need of the environment in helm-zabbix/values.yaml file.

Configure the way how to expose Zabbix service:

  • Ingress: The ingress controller must be installed in the Kubernetes cluster.
  • ClusterIP: Exposes the service on a cluster-internal IP. Choosing this value makes the service only reachable from within the cluster.
  • NodePort: Exposes the service on each Node’s IP at a static port (the NodePort). You’ll be able to contact the NodePort service, from outside the cluster, by requesting NodeIP:NodePort.
  • LoadBalancer: Exposes the service externally using a cloud provider’s load balancer.

Installation

Install requirement kubectl and helm following the instructions this tutorial.

Access a Kubernetes cluster.

Create namespace monitoring in Kubernetes cluster.

kubectl create namespace monitoring

Add Helm repo:

helm repo add aekondratiev https://aekondratiev.github.io/helm-charts

Update the list helm. This is recommend before install/upgrade a helm chart:

helm repo update

Export default values of chart to file $HOME/zabbix_values.yaml:

helm show values aekondratiev/zabbix-server > $HOME/zabbix_values.yaml

Change the values according to the environment in the file $HOME/zabbix_values.yaml.

Install the Zabbix helm chart with a release name zabbix:

helm install zabbix aekondratiev/zabbix-server --dependency-update -f $HOME/zabbix_values.yaml -n monitoring

View the pods.

kubectl get pods -n monitoring

View the logs container of pods.

kubectl logs -f pods/POD_NAME -n monitoring

See the example of installation in minikube in this tutorial.

See section Basic Commands of Helm 3 for more information about commands of helm.

Uninstallation

To uninstall/delete the zabbix deployment:

helm delete zabbix -n monitoring

How to access Zabbix

After deploying the chart in your cluster, you can use the following command to access the zabbix frontend service:

View informations of zabbix services.

kubectl describe services zabbix-web -n monitoring

Listen on port 8888 locally, forwarding to 80 in the service zabbix-web.

kubectl port-forward service/zabbix-web 8888:80 -n monitoring

Access Zabbix in http://localhost:8888. Login Admin and password zabbix.

License

Apache License 2.0

Configuration

The following tables lists the configurable parameters of the chart and their default values.

KeyTypeDefaultDescription
affinityobject{}Affinity configurations
ingress.annotationsobject{}Ingress annotations
ingress.enabledboolfalseEnables Ingress
ingress.hostslist[{"host":null,"paths":[]}]Ingress hosts
ingress.tlslist[]Ingress TLS configuration
livenessProbe.failureThresholdint6When a probe fails, Kubernetes will try failureThreshold times before giving up. Giving up in case of liveness probe means restarting the container. In case of readiness probe the Pod will be marked Unready
livenessProbe.initialDelaySecondsint30Number of seconds after the container has started before liveness
livenessProbe.pathstring"/"Path of health check of application
livenessProbe.periodSecondsint10Specifies that the kubelet should perform a liveness probe every N seconds
livenessProbe.successThresholdint1Minimum consecutive successes for the probe to be considered successful after having failed
livenessProbe.timeoutSecondsint5Number of seconds after which the probe times out
nodeSelectorobject{}nodeSelector configurations
postgresql.enabledbooltrueCreate a database using Postgresql
postgresql.postgresqlDatabasestring"zabbix"Name of database
postgresql.postgresqlPasswordstring"zabbix_pwd"Password of database
postgresql.postgresqlPostgresPasswordstring"zabbix_pwd"Password ofpostgres user in Postgresql
postgresql.postgresqlUsernamestring"zabbix"User of database
readinessProbe.failureThresholdint6When a probe fails, Kubernetes will try failureThreshold times before giving up. Giving up in case of liveness probe means restarting the container. In case of readiness probe the Pod will be marked Unready
readinessProbe.initialDelaySecondsint5Number of seconds after the container has started before readiness
readinessProbe.pathstring"/"Path of health check of application
readinessProbe.periodSecondsint10Specifies that the kubelet should perform a readiness probe every N seconds
readinessProbe.successThresholdint1Minimum consecutive successes for the probe to be considered successful after having failed
readinessProbe.timeoutSecondsint5Number of seconds after which the probe times out
tolerationslist[]Tolerations configurations
zabbixServer.DB_SERVER_HOSTstring"zabbix-postgresql"Address of database host
zabbixServer.POSTGRES_DBstring"zabbix"Name of database
zabbixServer.POSTGRES_PASSWORDstring"zabbix_pwd"Password of database
zabbixServer.POSTGRES_USERstring"zabbix"User of database
zabbixServer.hostIPstring"0.0.0.0"optional set hostIP different from 0.0.0.0 to open port only on this IP
zabbixServer.hostPortboolfalseoptional set true open a port direct on node where zabbix server runs
zabbixServer.image.pullPolicystring"IfNotPresent"Pull policy of Docker image
zabbixServer.image.pullSecretslist[]List of dockerconfig secrets names to use when pulling images
zabbixServer.image.repositorystring"zabbix/zabbix-server-pgsql"Zabbix server Docker image name
zabbixServer.image.tagstring"ubuntu-5.4.1"Tag of Docker image of Zabbix server
zabbixServer.replicaCountint1Number of replicas of zabbixServer module
zabbixServer.resourcesobject{}
zabbixServer.service.portint10051Port of service in Kubernetes cluster
zabbixServer.service.typestring"ClusterIP"Type of service in Kubernetes cluster
zabbixagent.ZBX_ACTIVE_ALLOWbooltrueThis variable is boolean (true or false) and enables or disables feature of active checks
zabbixagent.ZBX_HOSTNAMEstring"zabbix-agent"Zabbix agent hostname Case sensitive hostname
zabbixagent.ZBX_JAVAGATEWAY_ENABLEboolfalseThe variable enable communication with Zabbix Java Gateway to collect Java related checks. By default, value is false.
zabbixagent.ZBX_PASSIVESERVERSstring"127.0.0.1"The variable is comma separated list of allowed Zabbix server or proxy hosts for connections to Zabbix agent container.
zabbixagent.ZBX_PASSIVE_ALLOWbooltrueThis variable is boolean (true or false) and enables or disables feature of passive checks. By default, value is true
zabbixagent.ZBX_SERVER_HOSTstring"127.0.0.1"Zabbix server host
zabbixagent.ZBX_SERVER_PORTint10051Zabbix server port
zabbixagent.ZBX_VMWARECACHESIZEstring"128M"Cache size
zabbixagent.enabledbooltrueEnables use of Zabbix agent
zabbixagent.image.pullPolicystring"IfNotPresent"Pull policy of Docker image
zabbixagent.image.pullSecretslist[]List of dockerconfig secrets names to use when pulling images
zabbixagent.image.repositorystring"zabbix/zabbix-agent"Zabbix agent Docker image name
zabbixagent.image.tagstring"ubuntu-5.4.1"Tag of Docker image of Zabbix agent
zabbixagent.resourcesobject{}
zabbixagent.service.portint10050Port to expose service
zabbixagent.service.targetPortint10050Port of application pod
zabbixagent.service.typestring"ClusterIP"Type of service for Zabbix agent
zabbixproxy.DB_SERVER_HOSTstring"maria-mariadb"Address of database host
zabbixproxy.DB_SERVER_PORTint3306Port of database
zabbixproxy.MYSQL_DATABASEstring"my_database"default to zabbix ( to be precised later)
zabbixproxy.MYSQL_PASSWORDstring"password1"Password of database
zabbixproxy.MYSQL_USERstring"admin"User of database
zabbixproxy.ZBX_HOSTNAMEstring"zabbix-proxy"Zabbix proxy hostname Case sensitive hostname
zabbixproxy.ZBX_JAVAGATEWAY_ENABLEboolfalseThe variable enable communication with Zabbix Java Gateway to collect Java related checks. By default, value is false.
zabbixproxy.ZBX_PROXYMODEint0The variable allows to switch Zabbix proxy mode. Bu default, value is 0 - active proxy. Allowed values are 0 and 1.
zabbixproxy.ZBX_SERVER_HOSTstring"zabbix-server"Zabbix server host
zabbixproxy.ZBX_SERVER_PORTint10051Zabbix server port
zabbixproxy.ZBX_VMWARECACHESIZEstring"128M"Cache size
zabbixproxy.enabledboolfalseEnables use of Zabbix proxy
zabbixproxy.image.pullPolicystring"IfNotPresent"Pull policy of Docker image
zabbixproxy.image.pullSecretslist[]List of dockerconfig secrets names to use when pulling images
zabbixproxy.image.repositorystring"zabbix/zabbix-proxy-mysql"Zabbix proxy Docker image name
zabbixproxy.image.tagstring"ubuntu-5.4.1"Tag of Docker image of Zabbix proxy
zabbixproxy.resourcesobject{}
zabbixproxy.service.portint10051Port to expose service
zabbixproxy.service.targetPortint10051Port of application pod
zabbixproxy.service.typestring"ClusterIP"Type of service for Zabbix proxy
zabbixweb.DB_SERVER_HOSTstring"zabbix-postgresql"Address of database host
zabbixweb.DB_SERVER_PORTint5432Port of database
zabbixweb.POSTGRES_DBstring"zabbix"Name of database
zabbixweb.POSTGRES_PASSWORDstring"zabbix_pwd"Password of database
zabbixweb.POSTGRES_USERstring"zabbix"User of database
zabbixweb.ZBX_SERVER_HOSTstring"zabbix-server"Zabbix server host
zabbixweb.ZBX_SERVER_PORTint10051Zabbix server port
zabbixweb.enabledbooltrueEnables use of Zabbix web
zabbixweb.image.pullPolicystring"IfNotPresent"Pull policy of Docker image
zabbixweb.image.pullSecretslist[]List of dockerconfig secrets names to use when pulling images
zabbixweb.image.repositorystring"zabbix/zabbix-web-apache-pgsql"Zabbix web Docker image name
zabbixweb.image.tagstring"ubuntu-5.4.1"Tag of Docker image of Zabbix web
zabbixweb.service.portint80Port to expose service
zabbixweb.service.targetPortint8080Port of application pod
zabbixweb.service.typestring"NodePort"Type of service for Zabbix web

Deploy zabbix-server with OpenTenant

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