zabbix-kubernetes-discovery

License Issues Pipeline Docker Pipeline Helm Pipeline Helm Release

Zabbix Kubernetes Discovery

Artifact Hub

Introduction

Kubernetes monitoring for Zabbix with discovery objects:

Works with 2 variables only by default:

Helm

Before installation, you need to create zabbix-monitoring namespace in your cluster:

$ kubectl create namespace zabbix-monitoring

All Helm options/parameters are available in the Helm folder here.

Install from local

To install the chart with the release name zabbix-kubernetes-discovery from local Helm templates:

$ helm upgrade --install zabbix-kubernetes-discovery \
    ./helm/zabbix-kubernetes-discovery/ \
    --values ./helm/zabbix-kubernetes-discovery/values.yaml \
    --namespace zabbix-monitoring \
    --set namespace.name="zabbix-monitoring" \
    --set environment.ZABBIX_ENDPOINT="zabbix-proxy.example.com" \
    --set environment.KUBERNETES_NAME="kubernetes-cluster-example"

Install from repo

To install the chart with the release name zabbix-kubernetes-discovery from my Helm repository:

$ helm repo add djerfy https://djerfy.github.io/helm-charts
$ helm upgrade --install zabbix-kubernetes-discovery \
    djerfy/zabbix-kubernetes-discovery \
    --namespace zabbix-monitoring
    --set namespace.name="zabbix-monitoring" \
    --set environment.ZABBIX_ENDPOINT="zabbix-proxy.example.com" \
    --set environment.KUBERNETES_NAME="kubernetes-cluster-name"

Uninstall

To uninstall/delete the zabbix-kubernetes-discovery deployment:

$ helm list -n zabbix-monitoring
$ helm delete -n zabbix-monitoring zabbix-kubernetes-discovery

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

Commands

usage: zabbix-kubernetes-discovery.py [-h]
    [--zabbix-timeout ZABBIX_TIMEOUT]
    --zabbix-endpoint ZABBIX_ENDPOINT
    --kubernetes-name KUBERNETES_NAME
    --monitoring-mode {volume,deployment,daemonset,node,statefulset,cronjob}
    --monitoring-type {discovery,item,json}
    [--object-name OBJECT_NAME]
    [--match-label KEY=VALUE]
    [--include-name INCLUDE_NAME]
    [--include-namespace INCLUDE_NAMESPACE]
    [--exclude-name EXCLUDE_NAME]
    [--exclude-namespace EXCLUDE_NAMESPACE]
    [--no-wait]
    [--verbose]
    [--debug]

Zabbix

Import template

Zabbix template is located in ./zabbix/ folder on this repository.

After downloading, you need to import it as below:

  1. Go to Configuration in menu
  2. And Templates
  3. Click Import
  4. Select downloaded template file
  5. Confirm import

zabbix-template-import

Discovery rules

Development

Manual build

You can build Docker image manually like this:

$ docker build -t zabbix-kubernetes-discovery .

Contributing

All contributions are welcome! Please fork the main branch, create a new branch and then create a pull request.