├── zabbix_templates ├── 6.4 │ ├── documentation │ │ ├── start.html │ │ ├── custom-service-cups.html │ │ ├── index.html │ │ ├── custom-service-exim.html │ │ ├── custom-service-springboot.html │ │ ├── custom-service-elasticsearch-cluster.html │ │ ├── custom-service-nginx-logstats.html │ │ ├── custom-service-nginx.html │ │ ├── custom-os-puppet.html │ │ └── custom-os-linux-hardware.html │ └── create_template_documentation ├── 3.2-outdated │ ├── documentation │ │ ├── start.html │ │ ├── index.html │ │ ├── custom-service-cups.html │ │ ├── custom-service-exim.html │ │ ├── custom-service-nginx-logstats.html │ │ └── custom-service-elasticsearch-cluster.html │ └── create_template_documentation ├── 3.4-outdated │ ├── documentation │ │ ├── start.html │ │ ├── custom-service-cups.html │ │ ├── index.html │ │ ├── custom-service-exim.html │ │ ├── custom-service-springboot.html │ │ ├── custom-service-nginx-logstats.html │ │ └── custom-service-elasticsearch-cluster.html │ └── create_template_documentation ├── 4.4-outdated │ ├── documentation │ │ ├── start.html │ │ ├── custom-service-cups.html │ │ ├── index.html │ │ ├── custom-service-exim.html │ │ ├── custom-service-springboot.html │ │ ├── custom-service-elasticsearch-cluster.html │ │ ├── custom-service-nginx-logstats.html │ │ ├── custom-os-puppet.html │ │ └── custom-os-linux-hardware.html │ └── create_template_documentation └── 5.2-outdated │ ├── documentation │ ├── start.html │ ├── custom-service-cups.html │ ├── index.html │ ├── custom-service-exim.html │ ├── custom-service-springboot.html │ ├── custom-service-elasticsearch-cluster.html │ ├── custom-service-nginx-logstats.html │ ├── custom-service-nginx.html │ ├── custom-os-puppet.html │ └── custom-os-linux-hardware.html │ └── create_template_documentation ├── .github ├── FUNDING.yml └── workflows │ ├── release.yml │ ├── continuous-integration-workflow.yml │ └── shared.yml ├── .gitignore ├── extension-files ├── agent-config │ ├── zabbix_dmesg.conf │ ├── zabbix_linux_process_threads.conf │ ├── zabbix_linux_process.conf │ ├── zabbix_check_multipath.conf │ ├── zabbix_agent_extensions.conf │ ├── zabbix_generic_discovery.conf │ ├── zabbix_varnish.conf │ ├── zabbix_check_puppetstate.conf │ ├── zabbix_check_httpjson_queryagent.conf │ ├── zabbix_ntp.conf │ ├── zabbix_springboot.conf │ ├── zabbix_nfs.conf │ ├── zabbix_redis.conf │ ├── zabbix_filesystem_discovery.conf │ ├── zabbix_apache-mod-jk.conf │ ├── zabbix_mailq.conf │ ├── zabbix_apache.conf │ ├── zabbix_nginx-status.conf │ ├── zabbix_disk_discovery.conf │ ├── zabbix_smartmontools.conf │ ├── zabbix_apache-mod-status.conf │ ├── zabbix_elasticsearch.conf │ └── zabbix_disk_performance.conf ├── pam-config ├── sudoers ├── check_payloads │ └── jsession_query.erb ├── tools │ ├── zabbix_check_memory │ ├── zabbix_check_apache-mod-jk │ ├── zabbix_check_linux_process │ ├── zabbix_check_apache │ ├── zabbix_check_nginx-status │ ├── zabbix_check_springboot │ ├── zabbix_discovery_generic │ ├── zabbix_check_apache-mod-status │ ├── zabbix_check_multipath │ ├── zabbix_check_dmesg │ ├── zabbix_check_smartmontools │ ├── zabbix_check_puppetstate │ └── zabbix_check_elasticsearch ├── test │ ├── last_run_summary.yaml │ └── last_run_report.yaml └── postinstall ├── docker-scripts ├── 05_perform_upgrade_and_cleanup.sh ├── 04_install_agent_extensions.sh └── 01_phase_base.sh ├── docker-files ├── Dockerfile-zabbix-agent └── Dockerfile-zabbix-agent2 ├── DEVELOPMENT.md ├── kubernetes ├── zabbix-agent-daemonset-kubernetes.yaml ├── zabbix-agent2-daemonset-kubernetes.yaml └── zabbix-agent2-daemonset-kubernetes-release.yaml ├── create_packages └── ci_test /zabbix_templates/6.4/documentation/start.html: -------------------------------------------------------------------------------- 1 | Please select a template... 2 | -------------------------------------------------------------------------------- /zabbix_templates/3.2-outdated/documentation/start.html: -------------------------------------------------------------------------------- 1 | Please select a template... 2 | -------------------------------------------------------------------------------- /zabbix_templates/3.4-outdated/documentation/start.html: -------------------------------------------------------------------------------- 1 | Please select a template... 2 | -------------------------------------------------------------------------------- /zabbix_templates/4.4-outdated/documentation/start.html: -------------------------------------------------------------------------------- 1 | Please select a template... 2 | -------------------------------------------------------------------------------- /zabbix_templates/5.2-outdated/documentation/start.html: -------------------------------------------------------------------------------- 1 | Please select a template... 2 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: scoopex 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | *.deb 3 | *.rpm 4 | *.idea 5 | zabbix-agent-daemonset-kubernetes-release.yaml 6 | -------------------------------------------------------------------------------- /extension-files/agent-config/zabbix_dmesg.conf: -------------------------------------------------------------------------------- 1 | UserParameter=linux.dmesg,sudo /usr/bin/zabbix_check_dmesg 2 | -------------------------------------------------------------------------------- /extension-files/agent-config/zabbix_linux_process_threads.conf: -------------------------------------------------------------------------------- 1 | UserParameter=custom.process_threads[*],ps -e -T | wc -l 2 | -------------------------------------------------------------------------------- /extension-files/agent-config/zabbix_linux_process.conf: -------------------------------------------------------------------------------- 1 | UserParameter=custom.process[*],/usr/bin/zabbix_check_linux_process $1 $2 2 | -------------------------------------------------------------------------------- /extension-files/agent-config/zabbix_check_multipath.conf: -------------------------------------------------------------------------------- 1 | UserParameter=linux.multipath,sudo /usr/bin/zabbix_check_multipath 2>/dev/null 2 | -------------------------------------------------------------------------------- /extension-files/agent-config/zabbix_agent_extensions.conf: -------------------------------------------------------------------------------- 1 | UserParameter=zabbix.agent_extensions.version,/bin/echo -n 'VERSION TO BE REPLACED' 2 | -------------------------------------------------------------------------------- /extension-files/agent-config/zabbix_generic_discovery.conf: -------------------------------------------------------------------------------- 1 | # Discovery 2 | UserParameter=generic.discovery[*],/usr/bin/zabbix_discovery_generic $1 $2 3 | -------------------------------------------------------------------------------- /extension-files/agent-config/zabbix_varnish.conf: -------------------------------------------------------------------------------- 1 | UserParameter=varnish.stat[*],(test -f /usr/bin/varnishstat && varnishstat -1 -f $1 | awk '{print $$2}') 2 | -------------------------------------------------------------------------------- /extension-files/pam-config: -------------------------------------------------------------------------------- 1 | # disable logging for zabbix agent 2 | session [success=1 default=ignore] pam_succeed_if.so quiet uid = 0 ruser = zabbix 3 | 4 | -------------------------------------------------------------------------------- /extension-files/agent-config/zabbix_check_puppetstate.conf: -------------------------------------------------------------------------------- 1 | # Return Puppet statistics 2 | UserParameter=puppet[*],sudo /usr/bin/zabbix_check_puppetstate $1 $2 3 | -------------------------------------------------------------------------------- /extension-files/agent-config/zabbix_check_httpjson_queryagent.conf: -------------------------------------------------------------------------------- 1 | UserParameter=jsessions[*],/usr/bin/zabbix_check_httpjson_queryagent -m $1 -u $2 -f $3 -p $4 -s $5 --cachable $6 2 | -------------------------------------------------------------------------------- /extension-files/agent-config/zabbix_ntp.conf: -------------------------------------------------------------------------------- 1 | UserParameter=ntpd.primarypeer.stats[*],zabbix_check_ntp $1 2>/dev/null 2 | UserParameter=ntpd.peers.goodcount,zabbix_check_ntp count 2>/dev/null 3 | -------------------------------------------------------------------------------- /extension-files/agent-config/zabbix_springboot.conf: -------------------------------------------------------------------------------- 1 | UserParameter=springboot.discovery[*],/usr/bin/zabbix_check_springboot discovery $1 $2 2 | UserParameter=springboot.get[*],/usr/bin/zabbix_check_springboot get $1 $2 3 | -------------------------------------------------------------------------------- /docker-scripts/05_perform_upgrade_and_cleanup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eux 4 | 5 | apt-get update 6 | apt-get upgrade -y 7 | apt-get dist-upgrade -y 8 | 9 | apt-get autoremove -y 10 | rm -rf /var/lib/apt/lists/* 11 | 12 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Releases 2 | 3 | on: 4 | push: 5 | tags: 6 | - '*' 7 | 8 | jobs: 9 | CI_RELEASE: 10 | uses: ./.github/workflows/shared.yml 11 | with: 12 | publish_steps: true 13 | 14 | -------------------------------------------------------------------------------- /extension-files/agent-config/zabbix_nfs.conf: -------------------------------------------------------------------------------- 1 | UserParameter=nfs.rpc.calls,awk '/^rpc/{printf("%s",$2);}' /proc/net/rpc/nfs 2>/dev/null || echo "0" 2 | UserParameter=nfs.rpc.retransmits,awk '/^rpc/{printf("%s",$3);}' /proc/net/rpc/nfs 2>/dev/null || echo "0" 3 | -------------------------------------------------------------------------------- /extension-files/agent-config/zabbix_redis.conf: -------------------------------------------------------------------------------- 1 | # Discovery 2 | UserParameter=redis.discovery,/usr/bin/zabbix_check_redis localhost list_key_space_db 3 | 4 | # Return Redis statistics 5 | UserParameter=redis[*],/usr/bin/zabbix_check_redis $1 $2 $3 -a "$4" 6 | -------------------------------------------------------------------------------- /.github/workflows/continuous-integration-workflow.yml: -------------------------------------------------------------------------------- 1 | name: Build package and test 2 | on: 3 | push: 4 | branches: 5 | - '*' 6 | jobs: 7 | CI_DEV: 8 | uses: ./.github/workflows/shared.yml 9 | with: 10 | publish_steps: false 11 | -------------------------------------------------------------------------------- /docker-scripts/04_install_agent_extensions.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -xe 4 | cd /tmp/setup 5 | ls -l /tmp/setup 6 | dpkg -i "zabbix-agent-extensions_${BUILD_VERSION?The version of the extension}_all.deb" 7 | sed -i '~s,/var/lib/zabbix/:/sbin/nologin,/var/lib/zabbix/:/bin/bash,' /etc/passwd 8 | -------------------------------------------------------------------------------- /extension-files/agent-config/zabbix_filesystem_discovery.conf: -------------------------------------------------------------------------------- 1 | # Discovery 2 | # Add a configfile to /etc/zabbix/item_zabbix_discovery_devices.conf 3 | Alias=vfs.fs.discovery:custom.vfs.fs.discovery 4 | UserParameter=custom.vfs.fs.discovery,/usr/bin/zabbix_discovery_filesystems --config /etc/zabbix/item_zabbix_discovery_filesystems.json 5 | 6 | -------------------------------------------------------------------------------- /extension-files/sudoers: -------------------------------------------------------------------------------- 1 | Defaults:zabbix !syslog 2 | Defaults:zabbix !requiretty 3 | 4 | zabbix ALL=(ALL) NOPASSWD: /usr/bin/zabbix_check_multipath 5 | zabbix ALL=(ALL) NOPASSWD: /usr/bin/zabbix_check_smartmontools 6 | zabbix ALL=(ALL) NOPASSWD: /usr/bin/mailq 7 | zabbix ALL=(ALL) NOPASSWD: /usr/bin/zabbix_check_dmesg 8 | zabbix ALL=(ALL) NOPASSWD: /usr/bin/zabbix_check_puppetstate 9 | -------------------------------------------------------------------------------- /extension-files/agent-config/zabbix_apache-mod-jk.conf: -------------------------------------------------------------------------------- 1 | UserParameter=apache.jk.stp,/usr/bin/zabbix_check_apache-mod-jk http://127.0.0.1/jkstatus?mime=txt STP 2>/dev/null 2 | UserParameter=apache.jk.act,/usr/bin/zabbix_check_apache-mod-jk http://127.0.0.1/jkstatus?mime=txt ACT 2>/dev/null 3 | UserParameter=apache.jk.dis,/usr/bin/zabbix_check_apache-mod-jk http://127.0.0.1/jkstatus?mime=txt DIS 2>/dev/null 4 | -------------------------------------------------------------------------------- /extension-files/agent-config/zabbix_mailq.conf: -------------------------------------------------------------------------------- 1 | # This works for Exim and Postfix 2 | UserParameter=mailq.count.general,test -f /usr/bin/mailq && sudo mailq | awk 'BEGIN{count=0}/^([a-zA-Z0-9][a-zA-Z0-9]*[ ]*.*[ ]*..*@..*|.*<.*>)$/{count++}END{print count}' 3 | # Exim only 4 | UserParameter=mailq.count.frozen,test -f /usr/bin/mailq && sudo mailq | awk 'BEGIN{count=0}/.*frozen.*/{count++}END{print count}' 5 | -------------------------------------------------------------------------------- /extension-files/agent-config/zabbix_apache.conf: -------------------------------------------------------------------------------- 1 | UserParameter=apache.rss.memory.total,/usr/bin/zabbix_check_apache total 2>/dev/null 2 | UserParameter=apache.rss.memory.biggest,/usr/bin/zabbix_check_apache biggest 2>/dev/null 3 | UserParameter=apache.rss.memory.smallest,/usr/bin/zabbix_check_apache smallest 2>/dev/null 4 | UserParameter=apache.rss.memory.average,/usr/bin/zabbix_check_apache average 2>/dev/null 5 | -------------------------------------------------------------------------------- /docker-scripts/01_phase_base.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eux 4 | 5 | apt-get autoremove -y 6 | source /etc/lsb-release 7 | 8 | apt-get update 9 | apt-get install curl vim-tiny sudo jq python3 -y 10 | apt-get upgrade -y 11 | apt-get dist-upgrade -y 12 | apt-get autoremove -y 13 | apt-get clean 14 | apt-get autoremove -y 15 | 16 | rm -rf /var/lib/apt/lists/* 17 | 18 | echo "set nocompatible" > /var/lib/zabbix/.vimrc 19 | -------------------------------------------------------------------------------- /extension-files/agent-config/zabbix_nginx-status.conf: -------------------------------------------------------------------------------- 1 | UserParameter=nginx.writer[*],/usr/bin/zabbix_check_nginx-status writer $1 2>/dev/null 2 | UserParameter=nginx.reader[*],/usr/bin/zabbix_check_nginx-status reader $1 2>/dev/null 3 | UserParameter=nginx.keepalive[*],/usr/bin/zabbix_check_nginx-status keepalive $1 2>/dev/null 4 | UserParameter=nginx.accepts[*],/usr/bin/zabbix_check_nginx-status accepts $1 2>/dev/null 5 | UserParameter=nginx.handled[*],/usr/bin/zabbix_check_nginx-status handled $1 2>/dev/null 6 | UserParameter=nginx.requests[*],/usr/bin/zabbix_check_nginx-status requests $1 2>/dev/null 7 | -------------------------------------------------------------------------------- /extension-files/agent-config/zabbix_disk_discovery.conf: -------------------------------------------------------------------------------- 1 | # Discovery 2 | # Add a configfile to /etc/zabbix/item_zabbix_discovery_devices.conf 3 | UserParameter=custom.vfs.dev.discovery,/usr/bin/zabbix_discovery_devices --config /etc/zabbix/item_zabbix_discovery_devices.json 4 | Alias=vfs.dev.discovery:custom.vfs.dev.discovery 5 | UserParameter=vfs.dev.discovery.rawdisks,/usr/bin/zabbix_discovery_devices --only_rawdisk --config /etc/zabbix/item_zabbix_discovery_devices.json 6 | UserParameter=vfs.dev.discovery.softwareraid,/usr/bin/zabbix_discovery_devices --software_raid --config /etc/zabbix/item_zabbix_discovery_devices.json 7 | -------------------------------------------------------------------------------- /extension-files/agent-config/zabbix_smartmontools.conf: -------------------------------------------------------------------------------- 1 | # invoke /usr/bin/zabbix_discovery_devices --help to view information about configuration format 2 | UserParameter=vfs.dev.discovery.smart,/usr/bin/zabbix_discovery_devices --config /etc/zabbix/item_zabbix_discovery_devices.json --only_rawdisk --smart 3 | # 4 | UserParameter=hardware.disk.health[*],sudo /usr/bin/zabbix_check_smartmontools --health --device "$1" 5 | UserParameter=hardware.disk.smart.attributes[*],sudo /usr/bin/zabbix_check_smartmontools --device "$1" --attribute "$2" 6 | UserParameter=hardware.disk.smart.info[*],sudo /usr/bin/zabbix_check_smartmontools --device "$1" --info "$2" 7 | 8 | -------------------------------------------------------------------------------- /docker-files/Dockerfile-zabbix-agent: -------------------------------------------------------------------------------- 1 | # see https://github.com/zabbix/zabbix-docker/blob/7.2/Dockerfiles/agent/ubuntu/Dockerfile 2 | FROM zabbix/zabbix-agent:ubuntu-7.2-latest 3 | 4 | ARG BUILD_DATE 5 | ARG BUILD_VERSION 6 | 7 | USER 0 8 | ADD /docker-scripts /tmp/setup 9 | RUN chmod 755 /tmp/setup/*.sh 10 | RUN /tmp/setup/01_phase_base.sh 11 | 12 | ADD zabbix-agent-extensions_${BUILD_VERSION}_all.deb /tmp/setup 13 | RUN /tmp/setup/04_install_agent_extensions.sh 14 | RUN /tmp/setup/05_perform_upgrade_and_cleanup.sh 15 | 16 | ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"] 17 | 18 | USER 1997 19 | 20 | CMD ["/usr/sbin/zabbix_agentd", "--foreground", "-c", "/etc/zabbix/zabbix_agentd.conf"] 21 | -------------------------------------------------------------------------------- /docker-files/Dockerfile-zabbix-agent2: -------------------------------------------------------------------------------- 1 | # see https://github.com/zabbix/zabbix-docker/blob/7.2/Dockerfiles/agent/ubuntu/Dockerfile 2 | FROM zabbix/zabbix-agent2:ubuntu-7.2-latest 3 | 4 | ARG BUILD_DATE 5 | ARG BUILD_VERSION 6 | 7 | USER 0 8 | ADD /docker-scripts /tmp/setup 9 | RUN chmod 755 /tmp/setup/*.sh 10 | RUN /tmp/setup/01_phase_base.sh 11 | 12 | ADD zabbix-agent-extensions_${BUILD_VERSION}_all.deb /tmp/setup 13 | RUN /tmp/setup/04_install_agent_extensions.sh 14 | RUN /tmp/setup/05_perform_upgrade_and_cleanup.sh 15 | 16 | ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"] 17 | 18 | USER 1997 19 | 20 | CMD ["/usr/sbin/zabbix_agent2", "--foreground", "-c", "/etc/zabbix/zabbix_agent2.conf"] 21 | -------------------------------------------------------------------------------- /extension-files/agent-config/zabbix_apache-mod-status.conf: -------------------------------------------------------------------------------- 1 | UserParameter=apache.writer[*],/usr/bin/zabbix_check_apache-mod-status writer $1 2>/dev/null 2 | UserParameter=apache.reader[*],/usr/bin/zabbix_check_apache-mod-status reader $1 2>/dev/null 3 | UserParameter=apache.keepalive[*],/usr/bin/zabbix_check_apache-mod-status keepalive $1 2>/dev/null 4 | UserParameter=apache.total[*],/usr/bin/zabbix_check_apache-mod-status total $1 2>/dev/null 5 | UserParameter=apache.all[*],/usr/bin/zabbix_check_apache-mod-status all $1 2>/dev/null 6 | UserParameter=apache.accesses[*],/usr/bin/zabbix_check_apache-mod-status accesses $1 2>/dev/null 7 | UserParameter=apache.kbytes[*],/usr/bin/zabbix_check_apache-mod-status kbytes $1 2>/dev/null 8 | -------------------------------------------------------------------------------- /extension-files/check_payloads/jsession_query.erb: -------------------------------------------------------------------------------- 1 | { 2 | "size": 0, 3 | "query": { 4 | "filtered": { 5 | "query": { 6 | "query_string": { 7 | "query": "*", 8 | "analyze_wildcard": true 9 | } 10 | }, 11 | "filter": { 12 | "bool": { 13 | "must": [ 14 | { 15 | "range": { 16 | "@timestamp": { 17 | "gte": "<%= options[:param][:period] %>" 18 | } 19 | } 20 | } 21 | ] 22 | } 23 | } 24 | } 25 | }, 26 | "aggs": { 27 | "1": { 28 | "cardinality": { 29 | "field": "jsessionid" 30 | } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /extension-files/agent-config/zabbix_elasticsearch.conf: -------------------------------------------------------------------------------- 1 | UserParameter=elasticsearch[*],/usr/bin/zabbix_check_elasticsearch $1 $2 2 | UserParameter=health[*],/usr/local/bin/es_stats_zabbix --configuration /etc/zabbix/es_stats_zabbix.ini single health[$1,$2] 3 | UserParameter=clusterstats[*],/usr/local/bin/es_stats_zabbix --configuration /etc/zabbix/es_stats_zabbix.ini single clusterstats[$1,$2] 4 | UserParameter=clusterstate[*],/usr/local/bin/es_stats_zabbix --configuration /etc/zabbix/es_stats_zabbix.ini single clusterstate[$1,$2] 5 | UserParameter=nodestats[*],/usr/local/bin/es_stats_zabbix --configuration /etc/zabbix/es_stats_zabbix.ini single nodestats[$1,$2] 6 | UserParameter=nodeinfo[*],/usr/local/bin/es_stats_zabbix --configuration /etc/zabbix/es_stats_zabbix.ini single nodeinfo[$1,$2] 7 | -------------------------------------------------------------------------------- /extension-files/agent-config/zabbix_disk_performance.conf: -------------------------------------------------------------------------------- 1 | # Device status 2 | 3 | UserParameter=custom.vfs.dev.read.ops[*],awk '{print $$1}' /sys/class/block/$1/stat 4 | UserParameter=custom.vfs.dev.read.merged[*],awk '{print $$2}' /sys/class/block/$1/stat 5 | UserParameter=custom.vfs.dev.read.sectors[*],awk '{print $$3}' /sys/class/block/$1/stat 6 | UserParameter=custom.vfs.dev.read.ms[*],awk '{print $$4}' /sys/class/block/$1/stat 7 | UserParameter=custom.vfs.dev.write.ops[*],awk '{print $$5}' /sys/class/block/$1/stat 8 | UserParameter=custom.vfs.dev.write.merged[*],awk '{print $$6}' /sys/class/block/$1/stat 9 | UserParameter=custom.vfs.dev.write.sectors[*],awk '{print $$7}' /sys/class/block/$1/stat 10 | UserParameter=custom.vfs.dev.write.ms[*],awk '{print $$8}' /sys/class/block/$1/stat 11 | UserParameter=custom.vfs.dev.io.active[*],awk '{print $$9}' /sys/class/block/$1/stat 12 | UserParameter=custom.vfs.dev.io.ms[*],awk '{print $$10}' /sys/class/block/$1/stat 13 | UserParameter=custom.vfs.dev.weight.io.ms[*],awk '{print $$11}' /sys/class/block/$1/stat 14 | UserParameter=custom.vfs.dev.queue_depth[*],awk '{print $$1}' /sys/block/$1/device/queue_depth 15 | -------------------------------------------------------------------------------- /extension-files/tools/zabbix_check_memory: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import re 4 | import json 5 | import sys 6 | 7 | units = { 8 | "kB": 1024, 9 | "mB": 1024*1024, 10 | "gB": 1024*1024*1024, 11 | "tB": 1024*1024*1024*1024, 12 | } 13 | result = {} 14 | with open("/proc/meminfo") as f_mem: 15 | for line in f_mem.readlines(): 16 | m = re.match(r"(.+):\s+(\d+)\s+(.+)",line) 17 | if not m: 18 | continue 19 | name = m.group(1) 20 | amount = int(m.group(2)) 21 | unit = m.group(3) 22 | 23 | if unit not in units: 24 | print("ERROR : unit %s not known" % unit) 25 | sys.exit(1) 26 | result[name] = amount * units[unit] 27 | 28 | # https://blog.famzah.net/2014/09/22/know-your-linux-memory-usage/ 29 | # https://linuxwiki.de/proc/meminfo 30 | # MemTotal = MemFree + (Buffers + Cached + SwapCached) + AnonPages + ((SReclaimable + SUnreclaim) + PageTables + KernelStack) 31 | 32 | result["CalculatedUserSpace"] = result["Active(anon)"] - result["SwapCached"] 33 | result["CalculatedKernelSpace"] = result["MemTotal"] - result["CalculatedUserSpace"] 34 | 35 | 36 | print(json.dumps(result,indent=True)) 37 | -------------------------------------------------------------------------------- /extension-files/test/last_run_summary.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | version: 3 | config: '081501b9ace9f5cf1d7e8d8b9609bfba75a893c6' 4 | puppet: 5.5.16 5 | resources: 6 | changed: 0 7 | corrective_change: 0 8 | failed: 0 9 | failed_to_restart: 0 10 | out_of_sync: 0 11 | restarted: 0 12 | scheduled: 0 13 | skipped: 0 14 | total: 550 15 | time: 16 | anchor: 0.003317653 17 | apt_key: 0.0015725110000000002 18 | augeas: 5.146380485000001 19 | catalog_application: 9.264215750619769 20 | config_retrieval: 4.8963285610079765 21 | convert_catalog: 0.24869656935334206 22 | exec: 0.053084863999999995 23 | fact_generation: 4.207539677619934 24 | file: 0.3369427640000001 25 | file_line: 0.005351552 26 | filebucket: 0.000325669 27 | group: 0.004148149 28 | mailalias: 0.000127512 29 | node_retrieval: 0.11580314487218857 30 | package: 0.008126484000000002 31 | plugin_sync: 0.9009264390915632 32 | resources: 8.1549e-05 33 | schedule: 0.00041577300000000003 34 | service: 1.064840845 35 | sshkey: 0.018164765999999992 36 | tidy: 0.000104248 37 | total: 19.647196507 38 | transaction_evaluation: 9.03375961817801 39 | user: 0.07400423199999998 40 | last_run: 1592421286 41 | changes: 42 | total: 0 43 | events: 44 | failure: 0 45 | success: 0 46 | total: 0 47 | -------------------------------------------------------------------------------- /extension-files/test/last_run_report.yaml: -------------------------------------------------------------------------------- 1 | --- !ruby/object:Puppet::Transaction::Report 2 | host: fuzzy-001 3 | time: '2020-06-17T21:14:27.086488678+02:00' 4 | configuration_version: '081501b9ace9f5cf1d7e8d8b9609bfba75a893c6' 5 | transaction_uuid: 7c37ecf6-eceb-43a4-b935-5e045aa80a4a 6 | report_format: 10 7 | puppet_version: 5.5.16 8 | status: unchanged 9 | transaction_completed: true 10 | noop: false 11 | noop_pending: false 12 | environment: production_master 13 | logs: 14 | - level: notice 15 | message: Applied catalog in 9.26 seconds 16 | source: Puppet 17 | tags: 18 | - notice 19 | time: '2020-06-17T21:14:46.829396599+02:00' 20 | file: 21 | line: 22 | metrics: 23 | resources: 24 | name: resources 25 | label: Resources 26 | values: 27 | - - total 28 | - Total 29 | - 550 30 | - - skipped 31 | - Skipped 32 | - 0 33 | - - failed 34 | - Failed 35 | - 0 36 | - - failed_to_restart 37 | - Failed to restart 38 | - 0 39 | - - restarted 40 | - Restarted 41 | - 0 42 | - - changed 43 | - Changed 44 | - 0 45 | - - out_of_sync 46 | - Out of sync 47 | - 0 48 | - - scheduled 49 | - Scheduled 50 | - 0 51 | - - corrective_change 52 | - Corrective change 53 | - 0 54 | 55 | -------------------------------------------------------------------------------- /extension-files/tools/zabbix_check_apache-mod-jk: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # This program is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; either version 2 of the License, or 6 | # (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License along 14 | # with this program; if not, write to the Free Software Foundation, Inc., 15 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | 17 | export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/bin:/bin:$PATH" 18 | 19 | if [ -z "$1" ];then 20 | echo "$0 ACT|DIS|STP" 21 | echo "$0 'http://127.0.0.1/jkstatus?mime=txt' ACT" 22 | exit 1 23 | fi 24 | 25 | URL="$1" 26 | WHAT="$2" 27 | 28 | curl -s -q "$URL"|awk -v what="$WHAT" ' 29 | BEGIN{ 30 | pat = "activation=" what; 31 | a=0 32 | } 33 | $0 ~ pat{ 34 | a++; 35 | } 36 | END{ 37 | printf("%s", a); 38 | } 39 | ' 40 | -------------------------------------------------------------------------------- /extension-files/tools/zabbix_check_linux_process: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # This program is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; either version 2 of the License, or 6 | # (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License along 14 | # with this program; if not, write to the Free Software Foundation, Inc., 15 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | 17 | PNAME="$1" 18 | QRY="$2" 19 | 20 | if [ -z "$1" ] || [ -z "$2" ];then 21 | echo "$0 maxage|minage" 22 | fi 23 | 24 | if [ "$QRY" = "maxage" ];then 25 | COMP="0" 26 | for pid in $(pgrep "$PNAME");do 27 | AGE="$(ps -o etimes= -p "$pid"|awk '{print $1}')" 28 | if [ "$AGE" -gt "$COMP" ];then 29 | COMP="$AGE" 30 | fi 31 | done 32 | echo -n "$COMP" 33 | exit 0 34 | elif [ "$QRY" = "minage" ];then 35 | COMP="0" 36 | for pid in $(pgrep "$PNAME");do 37 | AGE="$(ps -o etimes= -p "$pid"|awk '{print $1}')" 38 | if [ "$AGE" -le "$COMP" ] || [ "$COMP" = "0" ];then 39 | COMP="$AGE" 40 | fi 41 | done 42 | echo -n "$COMP" 43 | exit 0 44 | fi 45 | -------------------------------------------------------------------------------- /DEVELOPMENT.md: -------------------------------------------------------------------------------- 1 | # How to test and debug 2 | 3 | * Install the packages on the zabbix agent host 4 | * Test the agent on the agent machine 5 | 6 | ``` 7 | zabbix_agentd -t linux.dmesg 8 | zabbix_agentd --print 9 | ``` 10 | * Test the agent on the server machine 11 | 12 | ``` 13 | apt-get install zabbix-get 14 | zabbix_get -s 127.0.0.1 -k linux.dmesg 15 | ``` 16 | 17 | # How to release and/or install the userparameter scripts 18 | 19 | Adpoted from: https://www.digitalocean.com/community/tutorials/how-to-use-fpm-to-easily-create-packages-in-multiple-formats 20 | 21 | * Install FPM : https://fpm.readthedocs.io/en/latest/installing.html 22 | ``` 23 | sudo apt-get install ruby-dev build-essential debhelper devscripts rpm xalan 24 | gem install --no-document fpm 25 | ``` 26 | * Get the repo 27 | ``` 28 | git clone https://github.com/scoopex/zabbix-agent-extensions 29 | cd zabbix-agent-extensions 30 | ``` 31 | * Release only: Edit this file (README.md) and describe the new feature 32 | * Create packages 33 | ``` 34 | git commit .... 35 | ./create_packages 36 | ``` 37 | * Install the rpm or debian archive on as an addition to your zabbix-agent: 38 | 39 | ``` 40 | rpm -Uvh noarch/zabbix-agent-extensions-.noarch.rpm 41 | dpkg -i zabbix-agent-extensions__all.deb 42 | ``` 43 | * Push release 44 | ``` 45 | git tag 46 | ./create_packages 47 | git push 48 | git push --tags 49 | ``` 50 | * Github builds and tests the release and uploads it to github 51 | * RPM and DEB packages 52 | * Docker Images 53 | 54 | -------------------------------------------------------------------------------- /zabbix_templates/6.4/create_template_documentation: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | rm -rf documentation 5 | mkdir documentation 6 | 7 | cat > documentation/index.html <<'EOF' 8 | 21 | 22 |
23 | 24 |

25 | Template: 26 | 39 | 40 | 41 |

42 | 43 |

44 | 45 | 48 | Zabbix Manual: Items
49 | Zabbix Manual: Triggers 50 |

51 |
52 | EOF 53 | 54 | 55 | cat > documentation/start.html <<'EOF' 56 | Please select a template... 57 | EOF 58 | -------------------------------------------------------------------------------- /zabbix_templates/3.2-outdated/create_template_documentation: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | rm -rf documentation 5 | mkdir documentation 6 | 7 | cat > documentation/index.html <<'EOF' 8 | 21 | 22 |
23 | 24 |

25 | Template: 26 | 39 | 40 | 41 |

42 | 43 |

44 | 45 | 48 | Zabbix Manual: Items
49 | Zabbix Manual: Triggers 50 |

51 |
52 | EOF 53 | 54 | 55 | cat > documentation/start.html <<'EOF' 56 | Please select a template... 57 | EOF 58 | -------------------------------------------------------------------------------- /zabbix_templates/3.4-outdated/create_template_documentation: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | rm -rf documentation 5 | mkdir documentation 6 | 7 | cat > documentation/index.html <<'EOF' 8 | 21 | 22 |
23 | 24 |

25 | Template: 26 | 39 | 40 | 41 |

42 | 43 |

44 | 45 | 48 | Zabbix Manual: Items
49 | Zabbix Manual: Triggers 50 |

51 |
52 | EOF 53 | 54 | 55 | cat > documentation/start.html <<'EOF' 56 | Please select a template... 57 | EOF 58 | -------------------------------------------------------------------------------- /zabbix_templates/4.4-outdated/create_template_documentation: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | rm -rf documentation 5 | mkdir documentation 6 | 7 | cat > documentation/index.html <<'EOF' 8 | 21 | 22 |
23 | 24 |

25 | Template: 26 | 39 | 40 | 41 |

42 | 43 |

44 | 45 | 48 | Zabbix Manual: Items
49 | Zabbix Manual: Triggers 50 |

51 |
52 | EOF 53 | 54 | 55 | cat > documentation/start.html <<'EOF' 56 | Please select a template... 57 | EOF 58 | -------------------------------------------------------------------------------- /zabbix_templates/5.2-outdated/create_template_documentation: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | rm -rf documentation 5 | mkdir documentation 6 | 7 | cat > documentation/index.html <<'EOF' 8 | 21 | 22 |
23 | 24 |

25 | Template: 26 | 39 | 40 | 41 |

42 | 43 |

44 | 45 | 48 | Zabbix Manual: Items
49 | Zabbix Manual: Triggers 50 |

51 |
52 | EOF 53 | 54 | 55 | cat > documentation/start.html <<'EOF' 56 | Please select a template... 57 | EOF 58 | -------------------------------------------------------------------------------- /extension-files/tools/zabbix_check_apache: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # This program is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; either version 2 of the License, or 6 | # (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License along 14 | # with this program; if not, write to the Free Software Foundation, Inc., 15 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | 17 | 18 | export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/bin:/bin:$PATH" 19 | 20 | if [ -z "$1" ];then 21 | echo "$0 total|biggest|smallest|average" 22 | exit 1 23 | fi 24 | 25 | ps auxwwww|awk -v what="$1" ' 26 | BEGIN{ 27 | a=0; 28 | c=0; 29 | max=0; 30 | min=0; 31 | } 32 | /\/httpd2-prefork|\/apache2|\/httpd/{ 33 | a = a + $6; 34 | c++ 35 | if ($6 > max){ 36 | max = $6; 37 | } 38 | if ((min == 0) || (min > $6)){ 39 | min = $6; 40 | } 41 | } 42 | END{ 43 | if (what == "total"){ 44 | printf("%i",a*1024); 45 | }else if (what == "biggest"){ 46 | printf("%i",max*1024); 47 | }else if (what == "smallest"){ 48 | printf("%i",min*1024); 49 | }else if (what == "average"){ 50 | if (c == 0){ 51 | printf("0"); 52 | }else{ 53 | printf("%i",(a/c)*1024); 54 | } 55 | 56 | } 57 | }' 58 | 59 | -------------------------------------------------------------------------------- /zabbix_templates/6.4/documentation/custom-service-cups.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 |

Macro Overview

35 | 36 | The following macros can be overloaded on host level. 37 | 38 | 39 | 40 | 41 |
NameDefault
42 |

Static Elements

43 |

Trigger Overview

44 | 45 | 46 | 47 | 48 |
NameDescriptionPriorityExpressionDependencies
49 |

Graph Overview

50 | 51 | 52 | 53 | 54 |
NameElements
55 |

Item Overview

56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
CUPS TCP port $1 listening statenet.tcp.listen[631]607d0
Number of $1 processesproc.num[cupsd]607d
67 | 68 | 69 | -------------------------------------------------------------------------------- /zabbix_templates/4.4-outdated/documentation/custom-service-cups.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 |

Macro Overview

35 | 36 | The following macros can be overloaded on host level. 37 | 38 | 39 | 40 | 41 |
NameDefault
42 |

Static Elements

43 |

Trigger Overview

44 | 45 | 46 | 47 | 48 |
NameDescriptionPriorityExpressionDependencies
49 |

Graph Overview

50 | 51 | 52 | 53 | 54 |
NameElements
55 |

Item Overview

56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
CUPS TCP port $1 listening statenet.tcp.listen[631]607d0
Number of $1 processesproc.num[cupsd]607d
67 | 68 | 69 | -------------------------------------------------------------------------------- /zabbix_templates/5.2-outdated/documentation/custom-service-cups.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 |

Macro Overview

35 | 36 | The following macros can be overloaded on host level. 37 | 38 | 39 | 40 | 41 |
NameDefault
42 |

Static Elements

43 |

Trigger Overview

44 | 45 | 46 | 47 | 48 |
NameDescriptionPriorityExpressionDependencies
49 |

Graph Overview

50 | 51 | 52 | 53 | 54 |
NameElements
55 |

Item Overview

56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
CUPS TCP port $1 listening statenet.tcp.listen[631]607d0
Number of $1 processesproc.num[cupsd]607d
67 | 68 | 69 | -------------------------------------------------------------------------------- /extension-files/tools/zabbix_check_nginx-status: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # This program is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; either version 2 of the License, or 6 | # (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License along 14 | # with this program; if not, write to the Free Software Foundation, Inc., 15 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | 17 | WHAT="$1" 18 | PORT="${2:-80}" 19 | HOSTNAME="${3:-127.0.0.1}" 20 | if [ -z "$WHAT" ];then 21 | echo "$0 reader|writer|keepalive|accepts|handled|requests" 22 | exit 1 23 | fi 24 | 25 | wget -q --user-agent "ZABBIX" --timeout=5 -O- "http://$HOSTNAME:$PORT/basic_status"|awk -v get=$WHAT ' 26 | /Active connections:/{ 27 | if (get == "total"){ 28 | printf("%s",$3); 29 | } 30 | } 31 | /^ [0-9][0-9]* [0-9][0-9]* [0-9][0-9]*/{ 32 | if (get == "accepts"){ 33 | printf("%s",$1); 34 | } 35 | if (get == "handled"){ 36 | printf("%s",$2); 37 | } 38 | if (get == "requests"){ 39 | printf("%s",$3); 40 | } 41 | } 42 | /Reading: .* Writing: .* Waiting: .*/{ 43 | if (get == "reader"){ 44 | printf("%s",$2); 45 | } 46 | if (get == "writer"){ 47 | printf("%s",$4); 48 | } 49 | if (get == "keepalive"){ 50 | printf("%s",$6); 51 | } 52 | 53 | } 54 | ' 55 | 56 | -------------------------------------------------------------------------------- /.github/workflows/shared.yml: -------------------------------------------------------------------------------- 1 | name: Shared Build Workflow 2 | 3 | on: 4 | workflow_call: 5 | inputs: 6 | publish_steps: 7 | description: "Publish artefacts" 8 | required: false 9 | default: false 10 | type: boolean 11 | 12 | jobs: 13 | build-and-release: 14 | name: CI-PKGs 15 | runs-on: ubuntu-latest 16 | steps: 17 | - name: Checkout code 18 | uses: actions/checkout@v2 19 | with: 20 | fetch-depth: 0 21 | - name: Setup 22 | run: | 23 | sudo apt-get install ruby-dev build-essential debhelper devscripts rpm xalan wget -y 24 | sudo gem install fpm 25 | - name: Build Package 26 | run: ./create_packages 27 | # - name: Test Package 28 | # run: sudo ./ci_test 29 | - name: Build and test container image zabbix-agent 30 | run: | 31 | ./create_docker -t zabbix-agent test 32 | - name: Build and test container image zabbix-agent2 33 | run: | 34 | ./create_docker -t zabbix-agent2 test 35 | # Publish release 36 | - uses: ncipollo/release-action@v1 37 | if: ${{ inputs.publish_steps }} 38 | with: 39 | artifacts: "zabbix-agent-extensions*.deb,zabbix-agent-extensions-*.rpm,kubernetes/zabbix-agent*-daemonset-kubernetes-release.yaml" 40 | - name: Login to Docker Hub 41 | if: ${{ inputs.publish_steps }} 42 | uses: docker/login-action@v3 43 | with: 44 | username: ${{ vars.DOCKERHUB_USERNAME }} 45 | password: ${{ secrets.DOCKERHUB_TOKEN }} 46 | - name: Publish docker images for zabbix-agent 47 | if: ${{ inputs.publish_steps }} 48 | run: | 49 | ./create_docker -t zabbix-agent publish 50 | - name: Publish docker images for zabbix-agent2 51 | if: ${{ inputs.publish_steps }} 52 | run: | 53 | ./create_docker -t zabbix-agent2 publish 54 | -------------------------------------------------------------------------------- /extension-files/tools/zabbix_check_springboot: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 3 | # This program is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; either version 2 of the License, or 6 | # (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License along 14 | # with this program; if not, write to the Free Software Foundation, Inc., 15 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | 17 | import sys 18 | import urllib.request 19 | import json 20 | 21 | if len(sys.argv) < 2: 22 | print(sys.argv[0] + " discovery ") 23 | print(sys.argv[0] + " get ") 24 | sys.exit(1) 25 | 26 | 27 | if sys.argv[1] == "discovery": 28 | discovered = {'data': []} 29 | resource = urllib.request.urlopen(sys.argv[2]) 30 | content = resource.read().decode(resource.headers.get_content_charset()) 31 | data = json.loads(content) 32 | for elem in data['availableTags']: 33 | if elem['tag'] == sys.argv[3]: 34 | for item in elem['values']: 35 | discovered_item = {} 36 | discovered_item['{#'+sys.argv[3].upper()+'}'] = item 37 | discovered['data'].append(discovered_item) 38 | print(json.dumps(discovered, sort_keys=True)) 39 | elif sys.argv[1] == "get": 40 | get = {} 41 | try: 42 | resource = urllib.request.urlopen(sys.argv[2]+"?"+sys.argv[3]) 43 | content = resource.read().decode(resource.headers.get_content_charset()) 44 | data = json.loads(content) 45 | for item in data['measurements']: 46 | get[item['statistic']] = str(item['value']) 47 | except: 48 | get['fail'] = 'request failed' 49 | print(json.dumps(get, sort_keys=True)) 50 | -------------------------------------------------------------------------------- /zabbix_templates/3.2-outdated/documentation/index.html: -------------------------------------------------------------------------------- 1 | 14 | 15 |
16 | 17 |

18 | Template: 19 | 34 | 35 | 36 |

37 | 38 |

39 | 40 | 43 | Zabbix Manual: Items
44 | Zabbix Manual: Triggers 45 |

46 |
47 | -------------------------------------------------------------------------------- /extension-files/tools/zabbix_discovery_generic: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # This program is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; either version 2 of the License, or 6 | # (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License along 14 | # with this program; if not, write to the Free Software Foundation, Inc., 15 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | 17 | APPNAME="$1" 18 | TYPE="$2" 19 | DIR="/etc/zabbix/zabbix-discovery-generic" 20 | 21 | # Checks 22 | if [ -z "$APPNAME" ];then 23 | echo -n "NOT SUPPORTED" 24 | exit 1 25 | fi 26 | 27 | if ( ! (echo "$TYPE"|egrep -q "^(json|plain)$"));then 28 | echo -n "NOT SUPPORTED, USE 'json' or 'plain'" 29 | exit 1 30 | fi 31 | 32 | if (! echo "$APPNAME"|egrep -q "^[a-zA-Z0-9\.][a-zA-Z0-9\.]*$" );then 33 | echo -n "NOT SUPPORTED" 34 | exit 1 35 | fi 36 | 37 | # JSON ################################################################## 38 | if [ "$TYPE" = "json" ];then 39 | 40 | cat <<'EOF' 41 | { 42 | "data":[ 43 | EOF 44 | 45 | # Example entry 46 | # { 47 | # "{#FSNAME}":"\/", 48 | # "{#FSTYPE}":"rootfs" 49 | # }, 50 | 51 | FIRST=1 52 | shopt -s nullglob 53 | for FILE in $DIR/$APPNAME-*.json; 54 | do 55 | if [ "$FIRST" != "1" ];then 56 | echo -n "," 57 | fi 58 | FIRST=0 59 | cat $FILE 60 | done 61 | shopt -u nullglob 62 | cat <<'EOF' 63 | ] 64 | } 65 | EOF 66 | 67 | # PLAIN ################################################################# 68 | elif [ "$TYPE" = "plain" ];then 69 | shopt -s nullglob 70 | for FILE in $DIR/$APPNAME-*.plain; 71 | do 72 | echo -n "'$(cat $FILE)'," 73 | done 74 | shopt -u nullglob 75 | fi 76 | -------------------------------------------------------------------------------- /zabbix_templates/6.4/documentation/index.html: -------------------------------------------------------------------------------- 1 | 14 | 15 |
16 | 17 |

18 | Template: 19 | 36 | 37 | 38 |

39 | 40 |

41 | 42 | 45 | Zabbix Manual: Items
46 | Zabbix Manual: Triggers 47 |

48 |
49 | -------------------------------------------------------------------------------- /zabbix_templates/3.2-outdated/documentation/custom-service-cups.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 |

Macro Overview

35 | 36 | The following macros can be overloaded on host level. 37 | 38 | 39 | 40 | 41 |
NameDefault
42 |

Static Elements

43 |

Trigger Overview

44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 54 | 55 |
NameDescriptionPriorityExpressionDependencies
CUPS port not listeningAverage{Custom - Service - Cups:net.tcp.listen[631].last(0)}=0
No cupsd process runningAverage{Custom - Service - Cups:proc.num[cupsd].last(0)}=0CUPS port not listening
53 |
56 |

Graph Overview

57 | 58 | 59 | 60 | 61 |
NameElements
62 |

Item Overview

63 | 64 | 65 | 66 | 67 | 68 | 71 | 72 | 73 | 76 | 77 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
69 |

Zabbix Agent

70 |
CUPS TCP port $1 listening statenet.tcp.listen[631]6070
74 |

Zabbix Agent

75 |
Number of $1 processesproc.num[cupsd]607365
78 | 79 | 80 | -------------------------------------------------------------------------------- /zabbix_templates/3.4-outdated/documentation/custom-service-cups.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 |

Macro Overview

35 | 36 | The following macros can be overloaded on host level. 37 | 38 | 39 | 40 | 41 |
NameDefault
42 |

Static Elements

43 |

Trigger Overview

44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 54 | 55 |
NameDescriptionPriorityExpressionDependencies
CUPS port not listeningAverage{Custom - Service - Cups:net.tcp.listen[631].last(0)}=0
No cupsd process runningAverage{Custom - Service - Cups:proc.num[cupsd].last(0)}=0CUPS port not listening
53 |
56 |

Graph Overview

57 | 58 | 59 | 60 | 61 |
NameElements
62 |

Item Overview

63 | 64 | 65 | 66 | 67 | 68 | 71 | 72 | 73 | 76 | 77 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
69 |

Zabbix Agent

70 |
CUPS TCP port $1 listening statenet.tcp.listen[631]6070
74 |

Zabbix Agent

75 |
Number of $1 processesproc.num[cupsd]607365
78 | 79 | 80 | -------------------------------------------------------------------------------- /zabbix_templates/3.4-outdated/documentation/index.html: -------------------------------------------------------------------------------- 1 | 14 | 15 |
16 | 17 |

18 | Template: 19 | 36 | 37 | 38 |

39 | 40 |

41 | 42 | 45 | Zabbix Manual: Items
46 | Zabbix Manual: Triggers 47 |

48 |
49 | -------------------------------------------------------------------------------- /zabbix_templates/4.4-outdated/documentation/index.html: -------------------------------------------------------------------------------- 1 | 14 | 15 |
16 | 17 |

18 | Template: 19 | 36 | 37 | 38 |

39 | 40 |

41 | 42 | 45 | Zabbix Manual: Items
46 | Zabbix Manual: Triggers 47 |

48 |
49 | -------------------------------------------------------------------------------- /kubernetes/zabbix-agent-daemonset-kubernetes.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Namespace 3 | metadata: 4 | name: infra-zabbix-agent 5 | 6 | --- 7 | 8 | apiVersion: apps/v1 9 | kind: DaemonSet 10 | metadata: 11 | name: zabbix-agent 12 | namespace: "infra-zabbix-agent" 13 | spec: 14 | selector: 15 | matchLabels: 16 | name: zabbix-agent 17 | template: 18 | metadata: 19 | labels: 20 | name: zabbix-agent 21 | spec: 22 | # this toleration is to have the daemonset runnable also on master nodes 23 | # tolerations: 24 | # - key: node-role.kubernetes.io/master 25 | # effect: NoSchedule 26 | hostPID: true 27 | hostIPC: true 28 | hostNetwork: false 29 | containers: 30 | - resources: 31 | requests: 32 | cpu: 150m 33 | memory: 128M 34 | limits: 35 | cpu: 200m 36 | memory: 128M 37 | securityContext: 38 | privileged: true 39 | env: 40 | - name: ZBX_METADATA 41 | value: "kubernetes-node" 42 | - name: ZBX_HOSTNAME 43 | valueFrom: 44 | fieldRef: 45 | fieldPath: spec.nodeName 46 | - name: ZBX_SERVER_HOST 47 | value: "zabbix-proxy" 48 | - name: ZBX_PASSIVESERVERS 49 | value: "127.0.0.1,zabbix-proxy" 50 | image: zabbix-tooling/zabbix-agent-with-agent-extensions:latest 51 | imagePullPolicy: Always 52 | name: zabbix-agent 53 | volumeMounts: 54 | - name: rootfs 55 | mountPath: /rootfs 56 | - name: run 57 | mountPath: /var/run/ 58 | - name: zabbix-agent-extensions-include 59 | mountPath: /etc/zabbix/zabbix_agentd.d 60 | volumes: 61 | - name: rootfs 62 | hostPath: 63 | path: / 64 | - name: run 65 | hostPath: 66 | path: /var/run/ 67 | - name: zabbix-agent-extensions-include 68 | configMap: 69 | name: zabbix-agent-extensions-include 70 | defaultMode: 0755 71 | 72 | --- 73 | 74 | apiVersion: v1 75 | kind: ConfigMap 76 | metadata: 77 | name: zabbix-agent-extensions-include 78 | namespace: "infra-zabbix-agent" 79 | data: 80 | "zabbix-agent-extensions-include-extra.conf": | 81 | # Extra 82 | -------------------------------------------------------------------------------- /kubernetes/zabbix-agent2-daemonset-kubernetes.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Namespace 3 | metadata: 4 | name: infra-zabbix-agent 5 | 6 | --- 7 | 8 | apiVersion: apps/v1 9 | kind: DaemonSet 10 | metadata: 11 | name: zabbix-agent2 12 | namespace: "infra-zabbix-agent" 13 | spec: 14 | selector: 15 | matchLabels: 16 | name: zabbix-agent 17 | template: 18 | metadata: 19 | labels: 20 | name: zabbix-agent 21 | spec: 22 | # this toleration is to have the daemonset runnable also on master nodes 23 | # tolerations: 24 | # - key: node-role.kubernetes.io/master 25 | # effect: NoSchedule 26 | hostPID: true 27 | hostIPC: true 28 | hostNetwork: false 29 | containers: 30 | - resources: 31 | requests: 32 | cpu: 150m 33 | memory: 128M 34 | limits: 35 | cpu: 200m 36 | memory: 128M 37 | securityContext: 38 | privileged: true 39 | env: 40 | - name: ZBX_METADATA 41 | value: "kubernetes-node" 42 | - name: ZBX_HOSTNAME 43 | valueFrom: 44 | fieldRef: 45 | fieldPath: spec.nodeName 46 | - name: ZBX_SERVER_HOST 47 | value: "zabbix-proxy" 48 | - name: ZBX_PASSIVESERVERS 49 | value: "127.0.0.1,zabbix-proxy" 50 | image: zabbix-tooling/zabbix-agent2-with-agent-extensions:latest 51 | imagePullPolicy: Always 52 | name: zabbix-agent 53 | volumeMounts: 54 | - name: rootfs 55 | mountPath: /rootfs 56 | - name: run 57 | mountPath: /var/run/ 58 | - name: zabbix-agent-extensions-include 59 | mountPath: /etc/zabbix/zabbix_agentd.d 60 | volumes: 61 | - name: rootfs 62 | hostPath: 63 | path: / 64 | - name: run 65 | hostPath: 66 | path: /var/run/ 67 | - name: zabbix-agent-extensions-include 68 | configMap: 69 | name: zabbix-agent-extensions-include 70 | defaultMode: 0755 71 | 72 | --- 73 | 74 | apiVersion: v1 75 | kind: ConfigMap 76 | metadata: 77 | name: zabbix-agent-extensions-include 78 | namespace: "infra-zabbix-agent" 79 | data: 80 | "zabbix-agent-extensions-include-extra.conf": | 81 | # Extra 82 | -------------------------------------------------------------------------------- /kubernetes/zabbix-agent2-daemonset-kubernetes-release.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Namespace 3 | metadata: 4 | name: infra-zabbix-agent 5 | 6 | --- 7 | 8 | apiVersion: apps/v1 9 | kind: DaemonSet 10 | metadata: 11 | name: zabbix-agent2 12 | namespace: "infra-zabbix-agent" 13 | spec: 14 | selector: 15 | matchLabels: 16 | name: zabbix-agent 17 | template: 18 | metadata: 19 | labels: 20 | name: zabbix-agent 21 | spec: 22 | # this toleration is to have the daemonset runnable also on master nodes 23 | # tolerations: 24 | # - key: node-role.kubernetes.io/master 25 | # effect: NoSchedule 26 | hostPID: true 27 | hostIPC: true 28 | hostNetwork: false 29 | containers: 30 | - resources: 31 | requests: 32 | cpu: 150m 33 | memory: 128M 34 | limits: 35 | cpu: 200m 36 | memory: 128M 37 | securityContext: 38 | privileged: true 39 | env: 40 | - name: ZBX_METADATA 41 | value: "kubernetes-node" 42 | - name: ZBX_HOSTNAME 43 | valueFrom: 44 | fieldRef: 45 | fieldPath: spec.nodeName 46 | - name: ZBX_SERVER_HOST 47 | value: "zabbix-proxy" 48 | - name: ZBX_PASSIVESERVERS 49 | value: "127.0.0.1,zabbix-proxy" 50 | image: zabbix-tooling/zabbix-agent2-with-agent-extensions:latest 51 | imagePullPolicy: Always 52 | name: zabbix-agent 53 | volumeMounts: 54 | - name: rootfs 55 | mountPath: /rootfs 56 | - name: run 57 | mountPath: /var/run/ 58 | - name: zabbix-agent-extensions-include 59 | mountPath: /etc/zabbix/zabbix_agentd.d 60 | volumes: 61 | - name: rootfs 62 | hostPath: 63 | path: / 64 | - name: run 65 | hostPath: 66 | path: /var/run/ 67 | - name: zabbix-agent-extensions-include 68 | configMap: 69 | name: zabbix-agent-extensions-include 70 | defaultMode: 0755 71 | 72 | --- 73 | 74 | apiVersion: v1 75 | kind: ConfigMap 76 | metadata: 77 | name: zabbix-agent-extensions-include 78 | namespace: "infra-zabbix-agent" 79 | data: 80 | "zabbix-agent-extensions-include-extra.conf": | 81 | # Extra 82 | -------------------------------------------------------------------------------- /zabbix_templates/5.2-outdated/documentation/index.html: -------------------------------------------------------------------------------- 1 | 14 | 15 |
16 | 17 |

18 | Template: 19 | 37 | 38 | 39 |

40 | 41 |

42 | 43 | 46 | Zabbix Manual: Items
47 | Zabbix Manual: Triggers 48 |

49 |
50 | -------------------------------------------------------------------------------- /zabbix_templates/6.4/documentation/custom-service-exim.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 |

Macro Overview

35 | 36 | The following macros can be overloaded on host level. 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |
NameDefault
{$EXIM_LOGFILE}/var/log/exim4/mainlog
45 |

Static Elements

46 |

Trigger Overview

47 | 48 | 49 | 50 | 51 |
NameDescriptionPriorityExpressionDependencies
52 |

Graph Overview

53 | 54 | 55 | 56 | 57 | 58 | 60 | 61 | 62 | 64 | 65 |
NameElements
Service - Exim - Detailslog.count[{$EXIM_LOGFILE},"Action: flagged as Spam but accepted:",,100,skip,]
59 |
Service - Exim - Overviewlog.count[{$EXIM_LOGFILE}," Completed$",,100,skip,]
log.count[{$EXIM_LOGFILE},": Rejected",,100,skip,]
63 |
66 |

Item Overview

67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
ZABBIX_ACTIVERejected Mailslog.count[{$EXIM_LOGFILE},": Rejected",,100,skip,]2w90d
ZABBIX_ACTIVEAccepted Spam Mailslog.count[{$EXIM_LOGFILE},"Action: flagged as Spam but accepted:",,100,skip,]2w90d
ZABBIX_ACTIVECompleted Mailslog.count[{$EXIM_LOGFILE}," Completed$",,100,skip,]2w90d
81 | 82 | 83 | -------------------------------------------------------------------------------- /zabbix_templates/4.4-outdated/documentation/custom-service-exim.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 |

Macro Overview

35 | 36 | The following macros can be overloaded on host level. 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |
NameDefault
{$EXIM_LOGFILE}/var/log/exim4/mainlog
45 |

Static Elements

46 |

Trigger Overview

47 | 48 | 49 | 50 | 51 |
NameDescriptionPriorityExpressionDependencies
52 |

Graph Overview

53 | 54 | 55 | 56 | 57 | 58 | 60 | 61 | 62 | 64 | 65 |
NameElements
Service - Exim - Detailslog.count[{$EXIM_LOGFILE},"Action: flagged as Spam but accepted:",,100,skip,]
59 |
Service - Exim - Overviewlog.count[{$EXIM_LOGFILE}," Completed$",,100,skip,]
log.count[{$EXIM_LOGFILE},": Rejected",,100,skip,]
63 |
66 |

Item Overview

67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
ZABBIX_ACTIVERejected Mailslog.count[{$EXIM_LOGFILE},": Rejected",,100,skip,]2w90d
ZABBIX_ACTIVEAccepted Spam Mailslog.count[{$EXIM_LOGFILE},"Action: flagged as Spam but accepted:",,100,skip,]2w90d
ZABBIX_ACTIVECompleted Mailslog.count[{$EXIM_LOGFILE}," Completed$",,100,skip,]2w90d
81 | 82 | 83 | -------------------------------------------------------------------------------- /zabbix_templates/5.2-outdated/documentation/custom-service-exim.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 |

Macro Overview

35 | 36 | The following macros can be overloaded on host level. 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |
NameDefault
{$EXIM_LOGFILE}/var/log/exim4/mainlog
45 |

Static Elements

46 |

Trigger Overview

47 | 48 | 49 | 50 | 51 |
NameDescriptionPriorityExpressionDependencies
52 |

Graph Overview

53 | 54 | 55 | 56 | 57 | 58 | 60 | 61 | 62 | 64 | 65 |
NameElements
Service - Exim - Detailslog.count[{$EXIM_LOGFILE},"Action: flagged as Spam but accepted:",,100,skip,]
59 |
Service - Exim - Overviewlog.count[{$EXIM_LOGFILE}," Completed$",,100,skip,]
log.count[{$EXIM_LOGFILE},": Rejected",,100,skip,]
63 |
66 |

Item Overview

67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
ZABBIX_ACTIVERejected Mailslog.count[{$EXIM_LOGFILE},": Rejected",,100,skip,]2w90d
ZABBIX_ACTIVEAccepted Spam Mailslog.count[{$EXIM_LOGFILE},"Action: flagged as Spam but accepted:",,100,skip,]2w90d
ZABBIX_ACTIVECompleted Mailslog.count[{$EXIM_LOGFILE}," Completed$",,100,skip,]2w90d
81 | 82 | 83 | -------------------------------------------------------------------------------- /zabbix_templates/3.2-outdated/documentation/custom-service-exim.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 |

Macro Overview

35 | 36 | The following macros can be overloaded on host level. 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |
NameDefault
{$EXIM_LOGFILE}/var/log/exim4/mainlog
45 |

Static Elements

46 |

Trigger Overview

47 | 48 | 49 | 50 | 51 |
NameDescriptionPriorityExpressionDependencies
52 |

Graph Overview

53 | 54 | 55 | 56 | 57 | 58 | 60 | 61 | 62 | 64 | 65 |
NameElements
Service - Exim - Detailslog.count[{$EXIM_LOGFILE},"Action: flagged as Spam but accepted:",,100,skip,]
59 |
Service - Exim - Overviewlog.count[{$EXIM_LOGFILE}," Completed$",,100,skip,]
log.count[{$EXIM_LOGFILE},": Rejected",,100,skip,]
63 |
66 |

Item Overview

67 | 68 | 69 | 70 | 71 | 72 | 75 | 76 | 77 | 80 | 81 | 82 | 85 | 86 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
73 |

ERROR - Unknown

74 |
Rejected Mailslog.count[{$EXIM_LOGFILE},": Rejected",,100,skip,]601490
78 |

ERROR - Unknown

79 |
Accepted Spam Mailslog.count[{$EXIM_LOGFILE},"Action: flagged as Spam but accepted:",,100,skip,]601490
83 |

ERROR - Unknown

84 |
Completed Mailslog.count[{$EXIM_LOGFILE}," Completed$",,100,skip,]601490
87 | 88 | 89 | -------------------------------------------------------------------------------- /zabbix_templates/3.4-outdated/documentation/custom-service-exim.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 |

Macro Overview

35 | 36 | The following macros can be overloaded on host level. 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |
NameDefault
{$EXIM_LOGFILE}/var/log/exim4/mainlog
45 |

Static Elements

46 |

Trigger Overview

47 | 48 | 49 | 50 | 51 |
NameDescriptionPriorityExpressionDependencies
52 |

Graph Overview

53 | 54 | 55 | 56 | 57 | 58 | 60 | 61 | 62 | 64 | 65 |
NameElements
Service - Exim - Detailslog.count[{$EXIM_LOGFILE},"Action: flagged as Spam but accepted:",,100,skip,]
59 |
Service - Exim - Overviewlog.count[{$EXIM_LOGFILE}," Completed$",,100,skip,]
log.count[{$EXIM_LOGFILE},": Rejected",,100,skip,]
63 |
66 |

Item Overview

67 | 68 | 69 | 70 | 71 | 72 | 75 | 76 | 77 | 80 | 81 | 82 | 85 | 86 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
73 |

Zabbix Agent (active)

74 |
Rejected Mailslog.count[{$EXIM_LOGFILE},": Rejected",,100,skip,]1m2w90d
78 |

Zabbix Agent (active)

79 |
Accepted Spam Mailslog.count[{$EXIM_LOGFILE},"Action: flagged as Spam but accepted:",,100,skip,]1m2w90d
83 |

Zabbix Agent (active)

84 |
Completed Mailslog.count[{$EXIM_LOGFILE}," Completed$",,100,skip,]1m2w90d
87 | 88 | 89 | -------------------------------------------------------------------------------- /extension-files/tools/zabbix_check_apache-mod-status: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # This program is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; either version 2 of the License, or 6 | # (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License along 14 | # with this program; if not, write to the Free Software Foundation, Inc., 15 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | 17 | 18 | WHAT="$1" 19 | PORT="${2:-80}" 20 | HOSTNAME="${3:-127.0.0.1}" 21 | if [ -z "$WHAT" ];then 22 | echo "$0 reader|writer|keepalive|total|all|accesses|kbytes" 23 | exit 1 24 | fi 25 | 26 | 27 | if [ "$WHAT" == "accesses" ] || [ "$WHAT" == "kbytes" ];then 28 | wget -q --timeout=5 --user-agent "ZABBIX" -O- "http://$HOSTNAME:$PORT/server-status?auto"|awk -v get=$WHAT ' 29 | /Total Accesses:/{ 30 | if (get == "accesses"){ 31 | printf("%s",$3); 32 | } 33 | } 34 | /Total kBytes:/{ 35 | if (get == "kbytes"){ 36 | printf("%s",$3); 37 | } 38 | } 39 | ' 40 | else 41 | wget -q --timeout=5 --user-agent "ZABBIX" -O- "http://$HOSTNAME:$PORT/server-status?auto"|\ 42 | awk -v get=$WHAT ' 43 | BEGIN{ 44 | readers = 0; writers = 0; keepalives = 0; total = 0; 45 | } 46 | /Scoreboard:/{ 47 | scoreboard = $0; 48 | print scoreboard > "/dev/stderr" ; 49 | sub(/^Scoreboard: /, "", scoreboard); 50 | total = length(scoreboard); 51 | for(i=0;i<=length(scoreboard);i++){ 52 | what = substr(scoreboard, i , 1) 53 | if(what == "W"){ 54 | writers++; 55 | } 56 | else if (what == "R"){ 57 | readers++; 58 | } 59 | else if (what == "K"){ 60 | keepalives++; 61 | } 62 | } 63 | } 64 | END{ 65 | if (total == 0){ 66 | print "FAIL: Unable to get scoreboard" > "/dev/stderr"; 67 | print "FAIL" ; 68 | exit; 69 | } 70 | if(get == "reader"){ 71 | print readers; 72 | } 73 | else if(get == "writer"){ 74 | print writers; 75 | } 76 | else if(get == "keepalive"){ 77 | print keepalives; 78 | } 79 | else if(get == "total"){ 80 | print total; 81 | } 82 | else if(get == "all"){ 83 | print "Reader " readers ", Writer " writers ", Keepalive " keepalives ", Total " total; 84 | } 85 | else{ 86 | print "Reader " readers ", Writer " writers ", Keepalive " keepalive ", Total " total > "/dev/stderr"; 87 | } 88 | } 89 | ' 90 | fi 91 | -------------------------------------------------------------------------------- /extension-files/postinstall: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | THE_INCLUDE="Include=/usr/share/zabbix-agent-extensions/include.d/" 4 | if [ -e /etc/zabbix/zabbix_agent2.conf ]; then 5 | AGENT=zabbix-agent2 6 | AGENT_INCLUDE=zabbix_agent2.d 7 | AGENT_CONF=zabbix_agent2.conf 8 | else 9 | AGENT=zabbix-agent 10 | AGENT_INCLUDE=zabbix_agentd.d 11 | AGENT_CONF=zabbix_agentd.conf 12 | fi 13 | 14 | if (grep -q -P "Ubuntu|Debian|CentOS|Raspbian" /etc/os-release);then 15 | 16 | if [ -e "/etc/zabbix/$AGENT_INCLUDE/zabbix-agent-extensions" ] || [ -e "/etc/zabbix/$AGENT_INCLUDE/zabbix-agent-extensions.conf" ];then 17 | echo "Notice: /etc/zabbix/$AGENT_INCLUDE/zabbix-agent-extensions already exists, no need to add the Include to /etc/zabbix/$AGENT_CONF" 18 | elif ! (grep -q "$THE_INCLUDE" /etc/zabbix/$AGENT_CONF);then 19 | echo "" >> /etc/zabbix/$AGENT_CONF 20 | echo "#################################################################" >> /etc/zabbix/$AGENT_CONF 21 | echo "# Added by postinstall of package zabbix-agent-extensions" >> /etc/zabbix/$AGENT_CONF 22 | echo "$THE_INCLUDE" >> /etc/zabbix/$AGENT_CONF 23 | 24 | fi 25 | 26 | if [ -e "/etc/zabbix/zabbix_agentd2.d/zabbix-agent-extensions" ];then 27 | echo "Notice: /etc/zabbix/zabbix_agentd2.d/zabbix-agent-extensions already exists, no need to add the Include to /etc/zabbix/zabbix_agent2.conf" 28 | elif ( [ -e "/etc/zabbix/zabbix_agent2.conf" ] && ! (grep -q "$THE_INCLUDE" /etc/zabbix/zabbix_agent2.conf) );then 29 | echo "" >> /etc/zabbix/zabbix_agent2.conf 30 | echo "#################################################################" >> /etc/zabbix/zabbix_agent2.conf 31 | echo "# Added by postinstall of package zabbix-agent-extensions" >> /etc/zabbix/zabbix_agent2.conf 32 | echo "$THE_INCLUDE" >> /etc/zabbix/zabbix_agent2.conf 33 | fi 34 | 35 | 36 | usermod -G adm -a zabbix 37 | 38 | mkdir -m 755 -p /var/cache/zabbix 39 | chown -R zabbix:zabbix /var/cache/zabbix 40 | 41 | mkdir -m 755 -p /etc/zabbix/zabbix-discovery-generic 42 | chown zabbix:zabbix /etc/zabbix/zabbix-discovery-generic 43 | 44 | if (which systemctl >/dev/null 2>&1);then 45 | echo "Restarting with systemctl" 46 | systemctl restart $AGENT.service 47 | elif [ -f /etc/init.d/$AGENT ];then 48 | echo "Restarting with /etc/init.d/$AGENT" 49 | /etc/init.d/$AGENT restart 50 | 51 | else 52 | echo "no known init method" 53 | fi 54 | 55 | if ( (which systemctl >/dev/null 2>&1) && (systemctl list-unit-files zabbix-agent2.service|grep -q enabled) );then 56 | echo "Restarting zabbix-agent2 with systemctl" 57 | systemctl restart zabbix-agent2.service 58 | elif [ -f /etc/init.d/zabbix-agent2 ];then 59 | echo "Restarting with /etc/init.d/zabbix-agent2" 60 | /etc/init.d/zabbix-agent2 restart 61 | else 62 | echo "no known init method" 63 | fi 64 | else 65 | echo "Notice: no postinstall implemented for you distribution, contributions and merge requests are very welcome ;-)" 66 | fi 67 | -------------------------------------------------------------------------------- /extension-files/tools/zabbix_check_multipath: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # -*- coding: iso8859-1 -*- 4 | # 5 | # check_multipath.py 6 | # 7 | # This program is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 2 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License along 18 | # with this program; if not, write to the Free Software Foundation, Inc., 19 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 20 | 21 | """Package versioning 22 | """ 23 | 24 | import os.path 25 | import sys 26 | import re 27 | import subprocess 28 | 29 | os.environ['LANG'] = "C" 30 | 31 | __author__ = "Marc Schoechlin " 32 | __version__ = "$Revision$" 33 | 34 | def log(line): 35 | sys.stderr.write("%s: %s\n" % (sys.argv[0], line)) 36 | 37 | ######################################################################### 38 | # check if multipathing is enabled 39 | 40 | cmd = "lsmod" 41 | process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) 42 | out, err = process.communicate() 43 | 44 | multipath_system = False 45 | for line in out.decode('utf8').splitlines(): 46 | match = re.match(r"^dm_multipath", line) 47 | if match: 48 | multipath_system = 1 49 | break 50 | 51 | if not multipath_system: 52 | log("STATUS OK : No multipathing here") 53 | print("OK: No multipathing here") 54 | sys.exit(0) 55 | 56 | ######################################################################### 57 | # check multipath setup 58 | 59 | paths = 0 60 | broken_paths = 0 61 | luns = 0 62 | output = "" 63 | 64 | cmd = "multipath -ll" 65 | process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) 66 | out, err = process.communicate() 67 | 68 | multipath_system = False 69 | for line in out.decode('utf8').splitlines(): 70 | 71 | output += sys.argv[0] + " " + line 72 | match = re.match(r"^.+\s.*([a-f0-9]{33})", line) 73 | if match: 74 | ghosts = 0 75 | lun = match.group(1) 76 | luns += 1 77 | continue 78 | match = re.match(r"^.*(\d:\d:\d:\d).*$", line) 79 | # A path 80 | if not match: 81 | continue 82 | paths += 1 83 | 84 | match = re.match(r"^.*\d:\d:\d:\d.*(faulty|failed).*$", line) 85 | if match: 86 | broken_paths += 1 87 | 88 | if (broken_paths > 0): 89 | print("ERROR: L:%i,P:%i,B%i" % (luns, paths, broken_paths)) 90 | log(output) 91 | else: 92 | print("OK: L:%i,P:%i,B%i" % (luns, paths, broken_paths)) 93 | log("OK: LUNS:%i, PATHS:%i, BROKEN PATHS %i" % (luns, paths, broken_paths)) 94 | 95 | # vim: ai et ts=2 shiftwidth=2 expandtab tabstop=3 tw=120 96 | -------------------------------------------------------------------------------- /zabbix_templates/6.4/documentation/custom-service-springboot.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 |

Macro Overview

35 | 36 | The following macros can be overloaded on host level. 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |
NameDefault
{$SPRINGBOOT_BASE_URI}http://127.0.0.1:6001/actuator
45 |

Static Elements

46 |

Trigger Overview

47 | 48 | 49 | 50 | 51 |
NameDescriptionPriorityExpressionDependencies
52 |

Graph Overview

53 | 54 | 55 | 56 | 57 |
NameElements
58 |

Item Overview

59 | 60 | 61 | 62 | 63 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
64 |

Discovery rule "Metric http.server.requests by uri"

65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 |
NameValue
NameMetric http.server.requests by uri
Keyspringboot.discovery[{$SPRINGBOOT_BASE_URI}/metrics/http.server.requests,uri]
TypeZABBIX_ACTIVE
Delay10m
82 |

Trigger Overview

83 | 84 | 85 | 86 | 87 |
NameDescriptionPriorityExpressionDependencies
88 |

Graph Overview

89 | 90 | 91 | 92 | 93 | 94 | 96 | 97 |
NameElements
Performance HTTP {#URI}springboot.uri[{#URI},requests_per_second]
springboot.uri[{#URI},average_responsetime]
95 |
98 |

Item Overview

99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
ZABBIX_ACTIVEPerformance HTTP {#URI} Dataspringboot.get[{$SPRINGBOOT_BASE_URI}/metrics/http.server.requests,tag=uri:{#URI}]3m2h0
CALCULATED{#URI} Average Request Timespringboot.uri[{#URI},average_responsetime]14d90d
DEPENDENT{#URI} Requestsspringboot.uri[{#URI},requests]07d90d
DEPENDENT{#URI} Requests/secspringboot.uri[{#URI},requests_per_second]07d90d
DEPENDENT{#URI} Timespringboot.uri[{#URI},time]07d90d
119 | 120 | 121 | -------------------------------------------------------------------------------- /zabbix_templates/4.4-outdated/documentation/custom-service-springboot.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 |

Macro Overview

35 | 36 | The following macros can be overloaded on host level. 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |
NameDefault
{$SPRINGBOOT_BASE_URI}http://127.0.0.1:6001/actuator
45 |

Static Elements

46 |

Trigger Overview

47 | 48 | 49 | 50 | 51 |
NameDescriptionPriorityExpressionDependencies
52 |

Graph Overview

53 | 54 | 55 | 56 | 57 |
NameElements
58 |

Item Overview

59 | 60 | 61 | 62 | 63 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
64 |

Discovery rule "Metric http.server.requests by uri"

65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 |
NameValue
NameMetric http.server.requests by uri
Keyspringboot.discovery[{$SPRINGBOOT_BASE_URI}/metrics/http.server.requests,uri]
TypeZABBIX_ACTIVE
Delay10m
82 |

Trigger Overview

83 | 84 | 85 | 86 | 87 |
NameDescriptionPriorityExpressionDependencies
88 |

Graph Overview

89 | 90 | 91 | 92 | 93 | 94 | 96 | 97 |
NameElements
Performance HTTP {#URI}springboot.uri[{#URI},requests_per_second]
springboot.uri[{#URI},average_responsetime]
95 |
98 |

Item Overview

99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
ZABBIX_ACTIVEPerformance HTTP {#URI} Dataspringboot.get[{$SPRINGBOOT_BASE_URI}/metrics/http.server.requests,tag=uri:{#URI}]3m2h0
CALCULATED{#URI} Average Request Timespringboot.uri[{#URI},average_responsetime]14d90d
DEPENDENT{#URI} Requestsspringboot.uri[{#URI},requests]07d90d
DEPENDENT{#URI} Requests/secspringboot.uri[{#URI},requests_per_second]07d90d
DEPENDENT{#URI} Timespringboot.uri[{#URI},time]07d90d
119 | 120 | 121 | -------------------------------------------------------------------------------- /zabbix_templates/5.2-outdated/documentation/custom-service-springboot.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 |

Macro Overview

35 | 36 | The following macros can be overloaded on host level. 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |
NameDefault
{$SPRINGBOOT_BASE_URI}http://127.0.0.1:6001/actuator
45 |

Static Elements

46 |

Trigger Overview

47 | 48 | 49 | 50 | 51 |
NameDescriptionPriorityExpressionDependencies
52 |

Graph Overview

53 | 54 | 55 | 56 | 57 |
NameElements
58 |

Item Overview

59 | 60 | 61 | 62 | 63 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
64 |

Discovery rule "Metric http.server.requests by uri"

65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 |
NameValue
NameMetric http.server.requests by uri
Keyspringboot.discovery[{$SPRINGBOOT_BASE_URI}/metrics/http.server.requests,uri]
TypeZABBIX_ACTIVE
Delay10m
82 |

Trigger Overview

83 | 84 | 85 | 86 | 87 |
NameDescriptionPriorityExpressionDependencies
88 |

Graph Overview

89 | 90 | 91 | 92 | 93 | 94 | 96 | 97 |
NameElements
Performance HTTP {#URI}springboot.uri[{#URI},requests_per_second]
springboot.uri[{#URI},average_responsetime]
95 |
98 |

Item Overview

99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
ZABBIX_ACTIVEPerformance HTTP {#URI} Dataspringboot.get[{$SPRINGBOOT_BASE_URI}/metrics/http.server.requests,tag=uri:{#URI}]3m2h0
CALCULATED{#URI} Average Request Timespringboot.uri[{#URI},average_responsetime]14d90d
DEPENDENT{#URI} Requestsspringboot.uri[{#URI},requests]07d90d
DEPENDENT{#URI} Requests/secspringboot.uri[{#URI},requests_per_second]07d90d
DEPENDENT{#URI} Timespringboot.uri[{#URI},time]07d90d
119 | 120 | 121 | -------------------------------------------------------------------------------- /zabbix_templates/6.4/documentation/custom-service-elasticsearch-cluster.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 |

Macro Overview

35 | 36 | The following macros can be overloaded on host level. 37 | 38 | 39 | 40 | 41 |
NameDefault
42 |

Static Elements

43 |

Trigger Overview

44 | 45 | 46 | 47 | 48 |
NameDescriptionPriorityExpressionDependencies
49 |

Graph Overview

50 | 51 | 52 | 53 | 54 | 55 | 57 | 58 | 59 | 61 | 62 |
NameElements
ELK Shardselasticsearch[cluster,active_primary_shards]
elasticsearch[cluster,active_shards]
elasticsearch[cluster,initializing_shards]
elasticsearch[cluster,relocating_shards]
elasticsearch[cluster,unassigned_shards]
56 |
ELK Usageelasticsearch[cluster,size_in_bytes]
elasticsearch[cluster,count]
60 |
63 |

Item Overview

64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
Number of active primary shardselasticsearch[cluster,active_primary_shards]60014d90d
Number of active shardselasticsearch[cluster,active_shards]60014d90d
ZABBIX_ACTIVETotal number of recordselasticsearch[cluster,count]30014d90d
ZABBIX_ACTIVECluster-wide records indexed per secondelasticsearch[cluster,index_total]30014d90d
ZABBIX_ACTIVENumber of initializing shardselasticsearch[cluster,initializing_shards]30014d90d
Number of data nodeselasticsearch[cluster,number_of_data_nodes]60014d90d
Number of nodeselasticsearch[cluster,number_of_nodes]60014d90d
ZABBIX_ACTIVENumber of relocating shardselasticsearch[cluster,relocating_shards]30014d90d
ZABBIX_ACTIVECluster-wide storage sizeelasticsearch[cluster,size_in_bytes]30014d90d
ZABBIX_ACTIVEElasticSearch Cluster Statuselasticsearch[cluster,status]30014d90d
ZABBIX_ACTIVENumber of unassigned shardselasticsearch[cluster,unassigned_shards]30014d90d
102 | 103 | 104 | -------------------------------------------------------------------------------- /zabbix_templates/4.4-outdated/documentation/custom-service-elasticsearch-cluster.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 |

Macro Overview

35 | 36 | The following macros can be overloaded on host level. 37 | 38 | 39 | 40 | 41 |
NameDefault
42 |

Static Elements

43 |

Trigger Overview

44 | 45 | 46 | 47 | 48 |
NameDescriptionPriorityExpressionDependencies
49 |

Graph Overview

50 | 51 | 52 | 53 | 54 | 55 | 57 | 58 | 59 | 61 | 62 |
NameElements
ELK Shardselasticsearch[cluster,active_primary_shards]
elasticsearch[cluster,active_shards]
elasticsearch[cluster,initializing_shards]
elasticsearch[cluster,relocating_shards]
elasticsearch[cluster,unassigned_shards]
56 |
ELK Usageelasticsearch[cluster,size_in_bytes]
elasticsearch[cluster,count]
60 |
63 |

Item Overview

64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
Number of active primary shardselasticsearch[cluster,active_primary_shards]60014d90d
Number of active shardselasticsearch[cluster,active_shards]60014d90d
ZABBIX_ACTIVETotal number of recordselasticsearch[cluster,count]30014d90d
ZABBIX_ACTIVECluster-wide records indexed per secondelasticsearch[cluster,index_total]30014d90d
ZABBIX_ACTIVENumber of initializing shardselasticsearch[cluster,initializing_shards]30014d90d
Number of data nodeselasticsearch[cluster,number_of_data_nodes]60014d90d
Number of nodeselasticsearch[cluster,number_of_nodes]60014d90d
ZABBIX_ACTIVENumber of relocating shardselasticsearch[cluster,relocating_shards]30014d90d
ZABBIX_ACTIVECluster-wide storage sizeelasticsearch[cluster,size_in_bytes]30014d90d
ZABBIX_ACTIVEElasticSearch Cluster Statuselasticsearch[cluster,status]30014d90d
ZABBIX_ACTIVENumber of unassigned shardselasticsearch[cluster,unassigned_shards]30014d90d
102 | 103 | 104 | -------------------------------------------------------------------------------- /zabbix_templates/5.2-outdated/documentation/custom-service-elasticsearch-cluster.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 |

Macro Overview

35 | 36 | The following macros can be overloaded on host level. 37 | 38 | 39 | 40 | 41 |
NameDefault
42 |

Static Elements

43 |

Trigger Overview

44 | 45 | 46 | 47 | 48 |
NameDescriptionPriorityExpressionDependencies
49 |

Graph Overview

50 | 51 | 52 | 53 | 54 | 55 | 57 | 58 | 59 | 61 | 62 |
NameElements
ELK Shardselasticsearch[cluster,active_primary_shards]
elasticsearch[cluster,active_shards]
elasticsearch[cluster,initializing_shards]
elasticsearch[cluster,relocating_shards]
elasticsearch[cluster,unassigned_shards]
56 |
ELK Usageelasticsearch[cluster,size_in_bytes]
elasticsearch[cluster,count]
60 |
63 |

Item Overview

64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
Number of active primary shardselasticsearch[cluster,active_primary_shards]60014d90d
Number of active shardselasticsearch[cluster,active_shards]60014d90d
ZABBIX_ACTIVETotal number of recordselasticsearch[cluster,count]30014d90d
ZABBIX_ACTIVECluster-wide records indexed per secondelasticsearch[cluster,index_total]30014d90d
ZABBIX_ACTIVENumber of initializing shardselasticsearch[cluster,initializing_shards]30014d90d
Number of data nodeselasticsearch[cluster,number_of_data_nodes]60014d90d
Number of nodeselasticsearch[cluster,number_of_nodes]60014d90d
ZABBIX_ACTIVENumber of relocating shardselasticsearch[cluster,relocating_shards]30014d90d
ZABBIX_ACTIVECluster-wide storage sizeelasticsearch[cluster,size_in_bytes]30014d90d
ZABBIX_ACTIVEElasticSearch Cluster Statuselasticsearch[cluster,status]30014d90d
ZABBIX_ACTIVENumber of unassigned shardselasticsearch[cluster,unassigned_shards]30014d90d
102 | 103 | 104 | -------------------------------------------------------------------------------- /zabbix_templates/3.4-outdated/documentation/custom-service-springboot.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 |

Macro Overview

35 | 36 | The following macros can be overloaded on host level. 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |
NameDefault
{$SPRINGBOOT_BASE_URI}http://127.0.0.1:1234/actuator
45 |

Static Elements

46 |

Trigger Overview

47 | 48 | 49 | 50 | 51 |
NameDescriptionPriorityExpressionDependencies
52 |

Graph Overview

53 | 54 | 55 | 56 | 57 |
NameElements
58 |

Item Overview

59 | 60 | 61 | 62 | 63 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
64 |

Discovery rule "Metric http.server.requests by uri"

65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 79 | 80 | 81 | 82 | 83 |
NameValue
NameMetric http.server.requests by uri
Keyspringboot.discovery[{$SPRINGBOOT_BASE_URI}/metrics/http.server.requests,uri]
Type 77 |

Zabbix Agent (active)

78 |
Delay10m
84 |

Trigger Overview

85 | 86 | 87 | 88 | 89 |
NameDescriptionPriorityExpressionDependencies
90 |

Graph Overview

91 | 92 | 93 | 94 | 95 | 96 | 98 | 99 |
NameElements
Performance HTTP {#URI}springboot.uri[{#URI},requests_per_second]
springboot.uri[{#URI},average_responsetime]
97 |
100 |

Item Overview

101 | 102 | 103 | 104 | 105 | 106 | 109 | 110 | 111 | 114 | 115 | 116 | 119 | 120 | 121 | 124 | 125 | 126 | 129 | 130 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
107 |

Zabbix Agent (active)

108 |
Performance HTTP {#URI} Dataspringboot.get[{$SPRINGBOOT_BASE_URI}/metrics/http.server.requests,tag=uri:{#URI}]3m2h0
112 |

Calculated

113 |
{#URI} Average Request Timespringboot.uri[{#URI},average_responsetime]1m14d90d
117 |

ERROR - Unknown

118 |
{#URI} Requestsspringboot.uri[{#URI},requests]07d90d
122 |

ERROR - Unknown

123 |
{#URI} Requests/secspringboot.uri[{#URI},requests_per_second]07d90d
127 |

ERROR - Unknown

128 |
{#URI} Timespringboot.uri[{#URI},time]07d90d
131 | 132 | 133 | -------------------------------------------------------------------------------- /zabbix_templates/6.4/documentation/custom-service-nginx-logstats.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 |

Macro Overview

35 | 36 | The following macros can be overloaded on host level. 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 |
NameDefault
{$NGINX_HTTP_PORT}80
{$NGINX_LOADBALANCER_CHECK}/e/lbstatus.html
{$NGINX_MAX_CLIENTS}1280
51 |

Static Elements

52 |

Trigger Overview

53 | 54 | 55 | 56 | 57 |
NameDescriptionPriorityExpressionDependencies
58 |

Graph Overview

59 | 60 | 61 | 62 | 63 |
NameElements
64 |

Item Overview

65 | 66 | 67 | 68 | 69 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
70 |

Discovery rule "Configured Logstat VHost"

71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 |
NameValue
NameConfigured Logstat VHost
Keygeneric.discovery[nginx]
Type
Delay3600
88 |

Trigger Overview

89 | 90 | 91 | 92 | 93 |
NameDescriptionPriorityExpressionDependencies
94 |

Graph Overview

95 | 96 | 97 | 98 | 99 |
NameElements
100 |

Item Overview

101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
TRAPNGINX Cache Bypass {#NAME}nginx.cache.bypass[{#NAME}]014d0
TRAPNGINX Cache Expires {#NAME}nginx.cache.expires[{#NAME}]014d0
TRAPNGINX Cache Hit {#NAME}nginx.cache.hit[{#NAME}]014d0
TRAPNGINX Cache Misses {#NAME}nginx.cache.misses[{#NAME}]014d0
TRAPNGINX Cache Revalidates {#NAME}nginx.cache.revalidates[{#NAME}]014d0
TRAPNGINX Cache Stales {#NAME}nginx.cache.stales[{#NAME}]014d0
TRAPNGINX Cache Updates {#NAME}nginx.cache.updates[{#NAME}]014d0
TRAPNGINX Cache Without_Cache {#NAME}nginx.cache.without_cache[{#NAME}]014d0
130 | 131 | 132 | -------------------------------------------------------------------------------- /zabbix_templates/4.4-outdated/documentation/custom-service-nginx-logstats.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 |

Macro Overview

35 | 36 | The following macros can be overloaded on host level. 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 |
NameDefault
{$NGINX_HTTP_PORT}80
{$NGINX_LOADBALANCER_CHECK}/e/lbstatus.html
{$NGINX_MAX_CLIENTS}1280
51 |

Static Elements

52 |

Trigger Overview

53 | 54 | 55 | 56 | 57 |
NameDescriptionPriorityExpressionDependencies
58 |

Graph Overview

59 | 60 | 61 | 62 | 63 |
NameElements
64 |

Item Overview

65 | 66 | 67 | 68 | 69 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
70 |

Discovery rule "Configured Logstat VHost"

71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 |
NameValue
NameConfigured Logstat VHost
Keygeneric.discovery[nginx]
Type
Delay3600
88 |

Trigger Overview

89 | 90 | 91 | 92 | 93 |
NameDescriptionPriorityExpressionDependencies
94 |

Graph Overview

95 | 96 | 97 | 98 | 99 |
NameElements
100 |

Item Overview

101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
TRAPNGINX Cache Bypass {#NAME}nginx.cache.bypass[{#NAME}]014d0
TRAPNGINX Cache Expires {#NAME}nginx.cache.expires[{#NAME}]014d0
TRAPNGINX Cache Hit {#NAME}nginx.cache.hit[{#NAME}]014d0
TRAPNGINX Cache Misses {#NAME}nginx.cache.misses[{#NAME}]014d0
TRAPNGINX Cache Revalidates {#NAME}nginx.cache.revalidates[{#NAME}]014d0
TRAPNGINX Cache Stales {#NAME}nginx.cache.stales[{#NAME}]014d0
TRAPNGINX Cache Updates {#NAME}nginx.cache.updates[{#NAME}]014d0
TRAPNGINX Cache Without_Cache {#NAME}nginx.cache.without_cache[{#NAME}]014d0
130 | 131 | 132 | -------------------------------------------------------------------------------- /zabbix_templates/5.2-outdated/documentation/custom-service-nginx-logstats.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 |

Macro Overview

35 | 36 | The following macros can be overloaded on host level. 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 |
NameDefault
{$NGINX_HTTP_PORT}80
{$NGINX_LOADBALANCER_CHECK}/e/lbstatus.html
{$NGINX_MAX_CLIENTS}1280
51 |

Static Elements

52 |

Trigger Overview

53 | 54 | 55 | 56 | 57 |
NameDescriptionPriorityExpressionDependencies
58 |

Graph Overview

59 | 60 | 61 | 62 | 63 |
NameElements
64 |

Item Overview

65 | 66 | 67 | 68 | 69 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
70 |

Discovery rule "Configured Logstat VHost"

71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 |
NameValue
NameConfigured Logstat VHost
Keygeneric.discovery[nginx]
Type
Delay3600
88 |

Trigger Overview

89 | 90 | 91 | 92 | 93 |
NameDescriptionPriorityExpressionDependencies
94 |

Graph Overview

95 | 96 | 97 | 98 | 99 |
NameElements
100 |

Item Overview

101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
TRAPNGINX Cache Bypass {#NAME}nginx.cache.bypass[{#NAME}]014d0
TRAPNGINX Cache Expires {#NAME}nginx.cache.expires[{#NAME}]014d0
TRAPNGINX Cache Hit {#NAME}nginx.cache.hit[{#NAME}]014d0
TRAPNGINX Cache Misses {#NAME}nginx.cache.misses[{#NAME}]014d0
TRAPNGINX Cache Revalidates {#NAME}nginx.cache.revalidates[{#NAME}]014d0
TRAPNGINX Cache Stales {#NAME}nginx.cache.stales[{#NAME}]014d0
TRAPNGINX Cache Updates {#NAME}nginx.cache.updates[{#NAME}]014d0
TRAPNGINX Cache Without_Cache {#NAME}nginx.cache.without_cache[{#NAME}]014d0
130 | 131 | 132 | -------------------------------------------------------------------------------- /zabbix_templates/3.4-outdated/documentation/custom-service-nginx-logstats.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 |

Macro Overview

35 | 36 | The following macros can be overloaded on host level. 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 |
NameDefault
{$NGINX_HTTP_PORT}80
{$NGINX_LOADBALANCER_CHECK}/e/lbstatus.html
{$NGINX_MAX_CLIENTS}1280
51 |

Static Elements

52 |

Trigger Overview

53 | 54 | 55 | 56 | 57 |
NameDescriptionPriorityExpressionDependencies
58 |

Graph Overview

59 | 60 | 61 | 62 | 63 |
NameElements
64 |

Item Overview

65 | 66 | 67 | 68 | 69 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
70 |

Discovery rule "Configured Logstat VHost"

71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 85 | 86 | 87 | 88 | 89 |
NameValue
NameConfigured Logstat VHost
Keygeneric.discovery[nginx]
Type 83 |

Zabbix Agent

84 |
Delay3600
90 |

Trigger Overview

91 | 92 | 93 | 94 | 95 |
NameDescriptionPriorityExpressionDependencies
96 |

Graph Overview

97 | 98 | 99 | 100 | 101 |
NameElements
102 |

Item Overview

103 | 104 | 105 | 106 | 107 | 108 | 111 | 112 | 113 | 116 | 117 | 118 | 121 | 122 | 123 | 126 | 127 | 128 | 131 | 132 | 133 | 136 | 137 | 138 | 141 | 142 | 143 | 146 | 147 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
109 |

Zabbix Trapper

110 |
NGINX Cache Bypass {#NAME}nginx.cache.bypass[{#NAME}]0140
114 |

Zabbix Trapper

115 |
NGINX Cache Expires {#NAME}nginx.cache.expires[{#NAME}]0140
119 |

Zabbix Trapper

120 |
NGINX Cache Hit {#NAME}nginx.cache.hit[{#NAME}]0140
124 |

Zabbix Trapper

125 |
NGINX Cache Misses {#NAME}nginx.cache.misses[{#NAME}]0140
129 |

Zabbix Trapper

130 |
NGINX Cache Revalidates {#NAME}nginx.cache.revalidates[{#NAME}]0140
134 |

Zabbix Trapper

135 |
NGINX Cache Stales {#NAME}nginx.cache.stales[{#NAME}]0140
139 |

Zabbix Trapper

140 |
NGINX Cache Updates {#NAME}nginx.cache.updates[{#NAME}]0140
144 |

Zabbix Trapper

145 |
NGINX Cache Without_Cache {#NAME}nginx.cache.without_cache[{#NAME}]0140
148 | 149 | 150 | -------------------------------------------------------------------------------- /zabbix_templates/3.2-outdated/documentation/custom-service-nginx-logstats.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 |

Macro Overview

35 | 36 | The following macros can be overloaded on host level. 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 |
NameDefault
{$NGINX_HTTP_PORT}80
{$NGINX_LOADBALANCER_CHECK}/e/lbstatus.html
{$NGINX_MAX_CLIENTS}1280
51 |

Static Elements

52 |

Trigger Overview

53 | 54 | 55 | 56 | 57 |
NameDescriptionPriorityExpressionDependencies
58 |

Graph Overview

59 | 60 | 61 | 62 | 63 |
NameElements
64 |

Item Overview

65 | 66 | 67 | 68 | 69 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
70 |

Discovery rule "Configured Logstat VHost"

71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 85 | 86 | 87 | 88 | 89 |
NameValue
NameConfigured Logstat VHost
Keygeneric.discovery[nginx]
Type 83 |

Zabbix Agent

84 |
Delay3600
90 |

Trigger Overview

91 | 92 | 93 | 94 | 95 |
NameDescriptionPriorityExpressionDependencies
96 |

Graph Overview

97 | 98 | 99 | 100 | 101 |
NameElements
102 |

Item Overview

103 | 104 | 105 | 106 | 107 | 108 | 111 | 112 | 113 | 116 | 117 | 118 | 121 | 122 | 123 | 126 | 127 | 128 | 131 | 132 | 133 | 136 | 137 | 138 | 141 | 142 | 143 | 146 | 147 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
109 |

ERROR - Unknown

110 |
NGINX Cache Bypass {#NAME}nginx.cache.bypass[{#NAME}]0140
114 |

ERROR - Unknown

115 |
NGINX Cache Expires {#NAME}nginx.cache.expires[{#NAME}]0140
119 |

ERROR - Unknown

120 |
NGINX Cache Hit {#NAME}nginx.cache.hit[{#NAME}]0140
124 |

ERROR - Unknown

125 |
NGINX Cache Misses {#NAME}nginx.cache.misses[{#NAME}]0140
129 |

ERROR - Unknown

130 |
NGINX Cache Revalidates {#NAME}nginx.cache.revalidates[{#NAME}]0140
134 |

ERROR - Unknown

135 |
NGINX Cache Stales {#NAME}nginx.cache.stales[{#NAME}]0140
139 |

ERROR - Unknown

140 |
NGINX Cache Updates {#NAME}nginx.cache.updates[{#NAME}]0140
144 |

ERROR - Unknown

145 |
NGINX Cache Without_Cache {#NAME}nginx.cache.without_cache[{#NAME}]0140
148 | 149 | 150 | -------------------------------------------------------------------------------- /create_packages: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | ###################################################################### 5 | 6 | VERSION="$(git describe --abbrev=0 --tags)" 7 | if [ -z "$VERSION" ];then 8 | echo "ERROR: unable to find a tag" 9 | exit 100 10 | fi 11 | 12 | ###################################################################### 13 | ### HELPERS 14 | 15 | prepare(){ 16 | 17 | PY="$1" 18 | 19 | echo "***************************************************************************************************************************************" 20 | echo "PREPARE" 21 | set -e 22 | set -x 23 | umask 0002 24 | mkdir -p -m 755 ${TMPDIR}/usr/bin/ 25 | cp -av ${SDIR}/tools/zabbix_* ${TMPDIR}/usr/bin/ 26 | chmod 755 ${TMPDIR}/usr/bin/* 27 | 28 | if [ "$PY" = "2" ];then 29 | sed -i '~s,#!/usr/bin/env python3,#!/usr/bin/env python,' ${TMPDIR}/usr/bin/* 30 | fi 31 | 32 | mkdir -p -m 755 ${TMPDIR}/usr/share/zabbix-agent-extensions/include.d/ 33 | cp -av ${SDIR}/agent-config/zabbix_* ${TMPDIR}/usr/share/zabbix-agent-extensions/include.d/ 34 | sed -i "~s,VERSION TO BE REPLACED,${VERSION}," ${TMPDIR}/usr/share/zabbix-agent-extensions/include.d/zabbix_agent_extensions.conf 35 | chmod 644 ${TMPDIR}/usr/share/zabbix-agent-extensions/include.d/* 36 | 37 | mkdir -p -m 755 ${TMPDIR}/usr/share/zabbix/ 38 | cp -av ${SDIR}/check_payloads/* ${TMPDIR}/usr/share/zabbix/ 39 | chmod 644 ${TMPDIR}/usr/share/zabbix/* 40 | 41 | mkdir -p -m 755 ${TMPDIR}/usr/share/man/man8/ 42 | gzip ${SDIR}/man/httpjson-queryagent.8 -c > ${TMPDIR}/usr/share/man/man8/httpjson-queryagent.8.gz 43 | chmod 644 ${TMPDIR}/usr/share/man/man8/* 44 | 45 | mkdir -p -m 755 ${TMPDIR}/etc/sudoers.d 46 | cp ${SDIR}/sudoers ${TMPDIR}/etc/sudoers.d/zabbix 47 | chmod 0440 ${TMPDIR}/etc/sudoers.d/* 48 | 49 | mkdir -p -m 755 ${TMPDIR}/etc/pam.d 50 | cp ${SDIR}/pam-config ${TMPDIR}/etc/pam.d/zabbix-agent-extensions 51 | chmod 0440 ${TMPDIR}/etc/pam.d/* 52 | 53 | mkdir -p -m 755 ${TMPDIR}/var/cache/zabbix 54 | set +x 55 | set +e 56 | 57 | } 58 | 59 | create_package(){ 60 | TYPE="$1" 61 | PY="$2" 62 | 63 | if [ "$PY" = "3" ];then 64 | SUFFIX="" 65 | else 66 | SUFFIX="-python2" 67 | fi 68 | echo "***************************************************************************************************************************************" 69 | echo "PACKAGE TYPE: $TYPE" 70 | echo 71 | set -x 72 | fpm -s dir -t $TYPE \ 73 | -n "zabbix-agent-extensions$SUFFIX" \ 74 | --license GPLv2 \ 75 | --verbose \ 76 | -a all \ 77 | --deb-no-default-config-files \ 78 | --deb-group root \ 79 | --rpm-group root \ 80 | --deb-user root \ 81 | --rpm-user root \ 82 | --deb-user root \ 83 | -m "Marc Schoechlin " \ 84 | --url "https://github.com/scoopex/zabbix-agent-extensions" \ 85 | --after-install ${SDIR}/postinstall \ 86 | -v $VERSION -C $TMPDIR 87 | set +x 88 | 89 | if [ "$TYPE" = "deb" ];then 90 | dpkg -c zabbix-agent-extensions${SUFFIX}_${VERSION}_all.deb 91 | RET="$?" 92 | elif [ "$TYPE" = "rpm" ];then 93 | rpm -qlp zabbix-agent-extensions${SUFFIX}-${VERSION}-1.noarch.rpm 94 | RET="$?" 95 | fi 96 | if [ "$RET" != "0" ];then 97 | echo "ERROR: error on creation of $TYPE package" 98 | exit 1 99 | fi 100 | } 101 | 102 | create_docu(){ 103 | cd $SDIR/../zabbix_templates/3.2-outdated 104 | ./create_template_documentation 105 | cd $SDIR/../zabbix_templates/3.4-outdated 106 | ./create_template_documentation 107 | cd $SDIR/../zabbix_templates/4.4-outdated 108 | ./create_template_documentation 109 | 110 | } 111 | 112 | ###################################################################### 113 | ### MAIN 114 | if [ -z "$1" ];then 115 | echo "$0 " 116 | fi 117 | 118 | SDIR="$(dirname $(readlink -f $0))/extension-files" 119 | 120 | for P in $HOME/.gem/ruby/*/bin/fpm;do 121 | P="$(dirname $P)" 122 | export PATH="$P:$PATH" 123 | done 124 | 125 | if ( ! (type -a fpm >/dev/null 2>&1 ) );then 126 | echo "Unable to find 'fpm'" 127 | exit 100 128 | fi 129 | 130 | echo "CREATING VERSION: $VERSION" 131 | rm -rf zabbix-agent-extensions_*.deb zabbix-agent-extensions*.rpm 132 | 133 | TMPDIR="$(mktemp -d)" 134 | trap "rm -rf $TMPDIR" EXIT TERM INT 135 | 136 | prepare 3 137 | create_package deb 3 138 | create_package rpm 3 139 | rm -rf $TMPDIR 140 | trap "" EXIT TERM INT 141 | 142 | TMPDIR="$(mktemp -d)" 143 | trap "rm -rf $TMPDIR" EXIT TERM INT 144 | prepare 2 145 | create_package deb 2 146 | create_package rpm 2 147 | create_docu 148 | 149 | exit 0 150 | -------------------------------------------------------------------------------- /zabbix_templates/6.4/documentation/custom-service-nginx.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 |

Macro Overview

35 | 36 | The following macros can be overloaded on host level. 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 |
NameDefault
{$NGINX_HTTP_PORT}80
{$NGINX_LOADBALANCER_CHECK}/e/lbstatus.html
{$NGINX_MAX_CLIENTS}1280
51 |

Static Elements

52 |

Trigger Overview

53 | 54 | 55 | 56 | 57 | 58 | 64 | 65 | 66 | 67 | 68 |
NameDescriptionPriorityExpressionDependencies
NGINX accepts > handledhttp://nginx.org/en/docs/http/ngx_http_stub_status_module.html 59 | 60 | accepts 61 | The total number of accepted client connections. 62 | handled 63 | The total number of handled connections. Generally, the parameter value is the same as accepts unless some resource limits have been reached (for example, the worker_connections limit).Warningmin(/Custom - Service - NGINX/nginx.accepts[{$NGINX_HTTP_PORT}],360s) - min(/Custom - Service - NGINX/nginx.handled[{$NGINX_HTTP_PORT}],360s) > 10
NGINX Maxclient Usage > 80%The available maxclient slots are consumed by 80% by reader/writer processes.Warning({$NGINX_MAX_CLIENTS} * 0.80) < (last(/Custom - Service - NGINX/nginx.reader[{$NGINX_HTTP_PORT}]) + last(/Custom - Service - NGINX/nginx.writer[{$NGINX_HTTP_PORT}]) + last(/Custom - Service - NGINX/nginx.keepalive[{$NGINX_HTTP_PORT}]))
69 |

Graph Overview

70 | 71 | 72 | 73 | 74 | 75 | 77 | 78 | 79 | 81 | 82 |
NameElements
NGINX Maxclient Usagenginx.reader[{$NGINX_HTTP_PORT}]
nginx.writer[{$NGINX_HTTP_PORT}]
nginx.keepalive[{$NGINX_HTTP_PORT}]
76 |
NGINX Requestsnginx.accepts[{$NGINX_HTTP_PORT}]
nginx.handled[{$NGINX_HTTP_PORT}]
nginx.requests[{$NGINX_HTTP_PORT}]
80 |
83 |

Item Overview

84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
TCP Connect Localnet.tcp.port[127.0.0.1,{$NGINX_HTTP_PORT}]12014d30d
NGINX Acceptsnginx.accepts[{$NGINX_HTTP_PORT}]12014d
NGINX Handlednginx.handled[{$NGINX_HTTP_PORT}]12014d
NGINX Clients Keepalivenginx.keepalive[{$NGINX_HTTP_PORT}]Apache workers which are currently in keepalive state12014d30d
NGINX Clients Readernginx.reader[{$NGINX_HTTP_PORT}]NGINX workers which are currently reading a request.12014d30d
NGINX Requestsnginx.requests[{$NGINX_HTTP_PORT}]12014d
NGINX Clients Writernginx.writer[{$NGINX_HTTP_PORT}]NGINX workers which are currently a request result writing to a client.12014d30d
Get /e/lbstatus.html response timeweb.page.perf[127.0.0.1,{$NGINX_LOADBALANCER_CHECK},{$NGINX_HTTP_PORT}]12014d30d
113 | 114 | 115 | -------------------------------------------------------------------------------- /zabbix_templates/5.2-outdated/documentation/custom-service-nginx.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 |

Macro Overview

35 | 36 | The following macros can be overloaded on host level. 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 |
NameDefault
{$NGINX_HTTP_PORT}80
{$NGINX_LOADBALANCER_CHECK}/e/lbstatus.html
{$NGINX_MAX_CLIENTS}1280
51 |

Static Elements

52 |

Trigger Overview

53 | 54 | 55 | 56 | 57 | 58 | 64 | 65 | 66 | 67 | 68 |
NameDescriptionPriorityExpressionDependencies
NGINX accepts > handledhttp://nginx.org/en/docs/http/ngx_http_stub_status_module.html 59 | 60 | accepts 61 | The total number of accepted client connections. 62 | handled 63 | The total number of handled connections. Generally, the parameter value is the same as accepts unless some resource limits have been reached (for example, the worker_connections limit).Warning{Custom - Service - NGINX:nginx.accepts[{$NGINX_HTTP_PORT}].min(360)} - {Custom - Service - NGINX:nginx.handled[{$NGINX_HTTP_PORT}].min(360)} > 10
NGINX Maxclient Usage > 80%The available maxclient slots are consumed by 80% by reader/writer processes.Warning({$NGINX_MAX_CLIENTS} * 0.80) < ({Custom - Service - NGINX:nginx.reader[{$NGINX_HTTP_PORT}].last(0)} + {Custom - Service - NGINX:nginx.writer[{$NGINX_HTTP_PORT}].last(0)} + {Custom - Service - NGINX:nginx.keepalive[{$NGINX_HTTP_PORT}].last(0)})
69 |

Graph Overview

70 | 71 | 72 | 73 | 74 | 75 | 77 | 78 | 79 | 81 | 82 |
NameElements
NGINX Maxclient Usagenginx.reader[{$NGINX_HTTP_PORT}]
nginx.writer[{$NGINX_HTTP_PORT}]
nginx.keepalive[{$NGINX_HTTP_PORT}]
76 |
NGINX Requestsnginx.accepts[{$NGINX_HTTP_PORT}]
nginx.handled[{$NGINX_HTTP_PORT}]
nginx.requests[{$NGINX_HTTP_PORT}]
80 |
83 |

Item Overview

84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
TCP Connect Localnet.tcp.port[127.0.0.1,{$NGINX_HTTP_PORT}]12014d30d
NGINX Acceptsnginx.accepts[{$NGINX_HTTP_PORT}]12014d
NGINX Handlednginx.handled[{$NGINX_HTTP_PORT}]12014d
NGINX Clients Keepalivenginx.keepalive[{$NGINX_HTTP_PORT}]Apache workers which are currently in keepalive state12014d30d
NGINX Clients Readernginx.reader[{$NGINX_HTTP_PORT}]NGINX workers which are currently reading a request.12014d30d
NGINX Requestsnginx.requests[{$NGINX_HTTP_PORT}]12014d
NGINX Clients Writernginx.writer[{$NGINX_HTTP_PORT}]NGINX workers which are currently a request result writing to a client.12014d30d
Get /e/lbstatus.html response timeweb.page.perf[127.0.0.1,{$NGINX_LOADBALANCER_CHECK},{$NGINX_HTTP_PORT}]12014d30d
113 | 114 | 115 | -------------------------------------------------------------------------------- /ci_test: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | FAILED_TESTS="" 4 | 5 | assertSuccess(){ 6 | local STRATEGY="$1" 7 | local CMD="$2" 8 | echo "****************************************************************************" 9 | echo "** EXECUTE: $CMD"; 10 | eval "$CMD 2>&1" 11 | local RET="$?" 12 | echo "**" 13 | 14 | if [ "$RET" != "0" ];then 15 | echo "** ERROR: execution failed (returncode $RET)" 16 | FAILED_TESTS="$FAILED_TESTS#assertSuccess => $CMD" 17 | echo "****************************************************************************" 18 | if [ "$STRATEGY" = "STOP_ON_ERROR" ];then 19 | exit 100 20 | else 21 | return 100 22 | fi 23 | fi 24 | echo "****************************************************************************" 25 | return 0 26 | } 27 | 28 | 29 | echo "*** CLEANUP" 30 | 31 | set -x 32 | set -e 33 | sudo dpkg -P zabbix-agent-extensions zabbix-agent 34 | sudo rm -rf /etc/zabbix_* /var/log/zabbix /var/run/zabbix zabbix-agent_*.deb zabbix-get_*.deb 35 | wget -c "https://repo.zabbix.com/zabbix/7.2/release/ubuntu/pool/main/z/zabbix-release/zabbix-release_latest_7.2+ubuntu24.04_all.deb" 36 | sudo dpkg -i zabbix-release_latest_7.2+ubuntu24.04_all.deb 37 | sudo apt-get update -y 38 | sudo apt-get install zabbix-agent zabbix-get -y 39 | sudo sed -i '~s,# DebugLevel.*,DebugLevel=2,' /etc/zabbix/zabbix_agentd.conf 40 | sudo sed -i '~s,^Server=.*,Server=127.0.0.1,' /etc/zabbix/zabbix_agentd.conf 41 | set +e 42 | set +x 43 | 44 | echo "*** VALIDATIONS" 45 | COMPILEDIR="$(mktemp -d /tmp/pycompile-XXXXXX)" 46 | for SCRIPT in $(grep -l "#!/usr/bin/env python3" extension-files/tools/zabbix_*|sort -u|xargs); 47 | do 48 | cp $SCRIPT $COMPILEDIR/ 49 | assertSuccess STOP_ON_ERROR "python3 -m py_compile ${COMPILEDIR}/$(basename $SCRIPT)" 50 | done 51 | 52 | echo "*** TESTS" 53 | assertSuccess STOP_ON_ERROR "sudo dpkg -i zabbix-agent-extensions_*.deb" 54 | sleep 3 55 | sudo tail -f /var/log/zabbix/zabbix_agentd.log & 56 | for i in `seq 1 30`;do 57 | nc -vvv -w 1 127.0.0.1 10050 58 | if [ "$?" = "0" ];then 59 | break 60 | fi 61 | echo -n "." 62 | sleep 1 63 | done 64 | echo 65 | pkill tail 66 | 67 | echo '{ "{#FOO}" : "BAR" }' | sudo tee /etc/zabbix/zabbix-discovery-generic/foo-bar.json 68 | assertSuccess STOP_ON_ERROR "ls -l /etc/zabbix/zabbix-discovery-generic/foo-bar.json" 69 | assertSuccess STOP_ON_ERROR "zabbix_get -s 127.0.0.1 -k 'generic.discovery[foo,json]' | tee /dev/stderr | grep -q -P 'BAR'" # Without sudo 70 | 71 | assertSuccess STOP_ON_ERROR "zabbix_get -s 127.0.0.1 -k linux.dmesg | tee /dev/stderr | grep -q -P 'OK: ALL OK|ERROR:'" # Without sudo 72 | assertSuccess STOP_ON_ERROR "zabbix_get -s 127.0.0.1 -k linux.dmesg | tee /dev/stderr | grep -q -P 'OK: ALL OK|ERROR:'" # Without sudo 73 | assertSuccess STOP_ON_ERROR "zabbix_get -s 127.0.0.1 -k linux.multipath | tee /dev/stderr | grep -q 'OK:'" # With sudo 74 | 75 | assertSuccess STOP_ON_ERROR "zabbix_get -s 127.0.0.1 -k 'custom.process[zabbix_agentd,minage]'|tee /dev/stderr | grep -q -P '^\d+$'" 76 | assertSuccess STOP_ON_ERROR "zabbix_get -s 127.0.0.1 -k 'custom.process[zabbix_agentd,maxage]'|tee /dev/stderr | grep -q -P '^\d+$'" 77 | assertSuccess STOP_ON_ERROR "zabbix_get -s 127.0.0.1 -k 'custom.process[nosuchprocess,maxage]'|tee /dev/stderr | grep -q -P '^\d+$'" 78 | assertSuccess STOP_ON_ERROR "zabbix_get -s 127.0.0.1 -k 'zabbix.agent_extensions.version'|tee /dev/stderr | grep -q -P '^\d+'" 79 | 80 | sudo mkdir -m 755 -p /opt/puppetlabs/puppet/cache/state/ 81 | sudo cp extension-files/test/last_run_summary.yaml /opt/puppetlabs/puppet/cache/state/last_run_summary.yaml 82 | sudo cp extension-files/test/last_run_report.yaml /opt/puppetlabs/puppet/cache/state/last_run_report.yaml 83 | 84 | assertSuccess STOP_ON_ERROR "zabbix_get -s 127.0.0.1 -k 'puppet[state]'|tee /dev/stderr | grep -q -P '^OK: puppetrun successful, no changes$'" 85 | assertSuccess STOP_ON_ERROR "zabbix_get -s 127.0.0.1 -k 'puppet[changes,total]'|tee /dev/stderr | grep -q -P '^\d+$'" 86 | assertSuccess STOP_ON_ERROR "zabbix_get -s 127.0.0.1 -k 'puppet[environment]'|tee /dev/stderr | grep -q -P '^production_master$'" 87 | 88 | assertSuccess STOP_ON_ERROR "zabbix_get -s 127.0.0.1 -k vfs.dev.discovery | tee /dev/stderr | grep -q '#BLOCKDEVICE'" 89 | assertSuccess STOP_ON_ERROR "zabbix_get -s 127.0.0.1 -k vfs.fs.discovery | grep -v /proc" 90 | assertSuccess STOP_ON_ERROR "zabbix_get -s 127.0.0.1 -k nfs.rpc.calls|grep -P '^0$'" 91 | assertSuccess STOP_ON_ERROR 'sudo dpkg -P zabbix-agent-extensions' 92 | 93 | echo 94 | echo 95 | echo "*** SUMMARY" 96 | if [ -z "$FAILED_TESTS" ];then 97 | echo "ALL TESTS PASSED" 98 | exit 0 99 | else 100 | echo "THE FOLLOWING TESTS FAILED" 101 | echo "$FAILED_TESTS"|tr '#' '\n'|sed '~s,^, ,' 102 | exit 1 103 | fi 104 | 105 | -------------------------------------------------------------------------------- /extension-files/tools/zabbix_check_dmesg: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 3 | # This program is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; either version 2 of the License, or 6 | # (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License along 14 | # with this program; if not, write to the Free Software Foundation, Inc., 15 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | 17 | 18 | import os 19 | import re 20 | import sys 21 | 22 | try: 23 | import cPickle as pickle 24 | except ImportError: 25 | import pickle 26 | 27 | ###################################################################################################### 28 | # HELPERS 29 | ###################################################################################################### 30 | 31 | def get_status_data(statusfile): 32 | data = {} 33 | data["timestamp"] = -1 34 | if os.path.exists(statusfile): 35 | mtime_statusfile = os.stat(statusfile).st_mtime 36 | mtime_kmsg = os.stat("/dev/kmsg").st_mtime 37 | if not mtime_statusfile < mtime_kmsg: 38 | try: 39 | data = pickle.load(open(statusfile, "rb")) 40 | except: 41 | sys.stderr.write("ERROR: unable to read statusfile %s" % statusfile) 42 | return data 43 | 44 | 45 | ###################################################################################################### 46 | # MAIN 47 | ###################################################################################################### 48 | 49 | EXECUTABLE = os.path.basename(__file__) 50 | 51 | dmesg = os.popen('dmesg') 52 | 53 | # kernel problems 54 | kernel_problems = {} 55 | kernel_problems["general protection fault"] = re.compile(r"^.*general protection fault.*$") 56 | kernel_problems["bug"] = re.compile(r".*(kernel BUG at|double fault:|Badness at|[Uu]nable to handle kernel|" + 57 | r"sysctl table check failed|------------[ cut here ]------------|Oops:).*$") 58 | kernel_problems["oom"] = re.compile(r".*(Out of memory: Kill process).*") 59 | kernel_problems["userland_kill"] = re.compile(r".*killed by.*") 60 | kernel_problems["ioerror"] = re.compile(r".*(print_req_error: I/O error, dev ..*|end_request: I/O error, dev ..*, sector ..*|error on device ..*, logical block ..*|Buffer I/O error on dev).*") 61 | 62 | # [80508.690871] kauditd_printk_skb: 2 callbacks suppressed 63 | parse_dmesg = re.compile(r"\[\s*(?P\d+\.\d+)\] (?P.*)$") 64 | 65 | if os.path.exists('/var/run/zabbix'): 66 | status_file = "/var/run/zabbix/%s_%s.pickle" % (EXECUTABLE, os.getuid()) 67 | else: 68 | status_file = "/tmp/%s_%s.pickle" % (EXECUTABLE, os.getuid()) 69 | 70 | status_data = get_status_data(status_file) 71 | 72 | latest_time_stamp = status_data["timestamp"] 73 | 74 | status = "OK" 75 | matched = [] 76 | 77 | total_lines = 0 78 | valid_lines = 0 79 | while True: 80 | line_str = dmesg.readline() 81 | if not (line_str): 82 | break 83 | 84 | total_lines += 1 85 | m = parse_dmesg.match(line_str) 86 | if not m: 87 | continue 88 | 89 | valid_lines += 1 90 | current_time_stamp = float(m.group("timestamp")) 91 | msg = m.group("msg") 92 | 93 | if current_time_stamp > latest_time_stamp: 94 | latest_time_stamp = current_time_stamp 95 | for ident, regex in kernel_problems.items(): 96 | if regex.match(msg): 97 | status = "ERROR" 98 | #sys.stderr.write("%s : %s : %s\n" % (EXECUTABLE, ident, line_str)) 99 | matched.append("%s/%s" % (ident, current_time_stamp)) 100 | 101 | status_data["timestamp"] = latest_time_stamp 102 | 103 | if len(matched) == 0 and valid_lines > 0: 104 | matched.append("ALL OK (%s)" % latest_time_stamp) 105 | 106 | if total_lines == 0: 107 | status = "OK" 108 | matched = [] 109 | matched.append("dmesg was cleared / it is completely empty") 110 | elif valid_lines <= 0: 111 | status = "ERROR" 112 | matched = [] 113 | matched.append("parsing failed") 114 | 115 | try: 116 | pickle.dump(status_data, open(status_file, "wb")) 117 | except: 118 | status="ERROR" 119 | matched.append("but storing status to %s failed" % status_file) 120 | 121 | sys.stdout.write("%s: %s\n" % (status, ", ".join(matched))) 122 | -------------------------------------------------------------------------------- /extension-files/tools/zabbix_check_smartmontools: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Marc Schoechlin 4 | 5 | import re 6 | import os 7 | import sys 8 | import argparse 9 | import subprocess 10 | import stat 11 | 12 | #################################################################################### 13 | #### HELPERS 14 | 15 | 16 | def is_device(dev): 17 | 18 | m = re.match(r"^([a-zA-Z0-9]+)([\sa-zA-Z0-9,-_\/]+)?$", dev) 19 | if m: 20 | dev = "/dev/%s" % m.group(1) 21 | try: 22 | mode = os.stat(dev).st_mode 23 | except: 24 | return False 25 | return stat.S_ISBLK(mode) 26 | else: 27 | sys.stderr.write("%s :: get_health :: FAILED - device >>%s<< parameter is not valid\n" % (__file__, device)) 28 | return False 29 | 30 | def get_health(device): 31 | 32 | if not is_device(device): 33 | sys.stderr.write("%s :: get_health :: FAILED - device >>%s<< does not exist\n" % (__file__, device)) 34 | return 35 | 36 | cmd = "smartctl -H /dev/%s" % device 37 | print(cmd) 38 | process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) 39 | out, err = process.communicate() 40 | 41 | result = None 42 | for line in out.decode('utf8').splitlines(): 43 | m = re.match(r"^.*(test result:|Health Status:)\s*(.*)$", line) 44 | if not m: 45 | continue 46 | result = m.group(2) 47 | 48 | if result is None: 49 | result = "FAILED: no health result" 50 | sys.stderr.write("%s :: get_health :: %s:\n--\n%s\n%s\n--\n" % (__file__, cmd, out.decode('utf8'), err.decode('utf8'))) 51 | 52 | print(result) 53 | 54 | def get_attribute(device, attribute): 55 | 56 | if not is_device(device): 57 | sys.stderr.write("%s :: get_health :: FAILED - device >>%s<< does not exist\n" % (__file__, device)) 58 | return 59 | 60 | cmd = "smartctl -A /dev/%s" % device 61 | process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) 62 | out, err = process.communicate() 63 | result = None 64 | # 1 Raw_Read_Error_Rate 0x000a 100 100 000 Old_age Always - 0 65 | for line in out.decode('utf8').splitlines(): 66 | if attribute == "Temperature_Celsius": 67 | line = re.sub(r"\(Min\/Max \d+\/\d+\)", "", line) 68 | 69 | m = re.match(r"^\s*\d+\s+([^\s]+?)\s+0x.*\s+(([^\s]+))\s*$", line) 70 | if not m: 71 | continue 72 | c_attrib = m.group(1) 73 | c_value = m.group(2) 74 | if attribute == c_attrib: 75 | result = c_value 76 | print(result) 77 | 78 | def get_info(device, info): 79 | 80 | if not is_device(device): 81 | sys.stderr.write("%s :: get_health :: FAILED - device >>%s<< does not exist\n" % (__file__, device)) 82 | return 83 | 84 | cmd = "smartctl -i /dev/%s" % device 85 | process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) 86 | out, err = process.communicate() 87 | result = None 88 | for line in out.decode('utf8').splitlines(): 89 | m = re.match(r"^%s:\s+(.*)$" % info, line) 90 | if not m: 91 | continue 92 | result = m.group(1) 93 | print(result) 94 | 95 | #################################################################################### 96 | #### MAIN 97 | 98 | parser = argparse.ArgumentParser( 99 | description='gather smart data' 100 | ) 101 | 102 | parser.add_argument( 103 | '--debug', 104 | help='Output debug information', 105 | action='store_true', 106 | ) 107 | 108 | 109 | parser_group = parser.add_mutually_exclusive_group(required=True) 110 | 111 | parser.add_argument( 112 | '--device', 113 | nargs='?', 114 | type=str, 115 | help='the hardware device', 116 | default=None, 117 | required=True, 118 | ) 119 | 120 | parser_group.add_argument( 121 | '--health', 122 | help='Health information', 123 | action='store_true', 124 | ) 125 | 126 | parser_group.add_argument( 127 | '--attribute', 128 | nargs='?', 129 | type=str, 130 | help='the device attribute (smartctl -A )', 131 | default=None, 132 | ) 133 | parser_group.add_argument( 134 | '--info', 135 | nargs='?', 136 | type=str, 137 | help='the device info (smartctl -i )', 138 | ) 139 | 140 | 141 | args = parser.parse_args() 142 | args.device = re.sub(r"/dev/+", "", args.device) 143 | 144 | if args.health: 145 | get_health(args.device) 146 | 147 | if args.attribute: 148 | get_attribute(args.device, args.attribute) 149 | 150 | if args.info: 151 | get_info(args.device, args.info) 152 | 153 | # vim: ai et ts=2 shiftwidth=2 expandtab 154 | -------------------------------------------------------------------------------- /extension-files/tools/zabbix_check_puppetstate: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 3 | # This program is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; either version 2 of the License, or 6 | # (at your option) any later version. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License along 14 | # with this program; if not, write to the Free Software Foundation, Inc., 15 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | 17 | import json 18 | import os 19 | import sys 20 | import re 21 | 22 | possible_state_files = [ 23 | "/opt/puppetlabs/puppet/public/last_run_summary.yaml", 24 | "/opt/puppetlabs/puppet/cache/state/last_run_summary.yaml", 25 | "/var/lib/puppet/state/last_run_summary.yaml" 26 | ] 27 | 28 | possible_run_report = [ 29 | "/opt/puppetlabs/puppet/cache/state/last_run_report.yaml", 30 | "/var/lib/puppet/state/last_run_report.yaml" 31 | ] 32 | possible_disable_check_files = [ 33 | "/opt/puppetlabs/puppet/cache/state/agent_disabled.lock", 34 | "/var/lib/puppet/state/agent_disabled.lock" 35 | ] 36 | 37 | 38 | # Workaround for antique puppet releases 39 | def identifiy_trim_spaces(file_name): 40 | spaces_o_trim = 0 41 | with open(file_name, 'r') as stream: 42 | for line in stream: 43 | if not line.startswith("---"): 44 | m = re.match(r"^(\s*)[^ ]", line) 45 | if m: 46 | return m.group(1) 47 | 48 | 49 | # Q: Why the not the "yaml" module? 50 | # A: We do not want to install extra module only because of a simple file read on all monitored systems 51 | 52 | def read_puppet_yaml(file_name): 53 | read_dict = {} 54 | key = None 55 | 56 | spaces_to_trim = identifiy_trim_spaces(file_name) 57 | 58 | with open(file_name, 'r') as stream: 59 | for line in stream: 60 | 61 | # Workaround for antique puppet releases 62 | line = re.sub(r"^" + spaces_to_trim, '', line) 63 | 64 | m = re.match(r"^([^ ]+):", line) 65 | if m: 66 | key = m.group(1) 67 | read_dict[key] = {} 68 | continue 69 | m = re.match(r"^[ ]+([^ ]+): (.+)$", line) 70 | if m: 71 | read_dict[key][m.group(1)] = m.group(2) 72 | 73 | if key is None: 74 | raise Exception("broken yaml puppet format") 75 | return read_dict 76 | 77 | 78 | dict_state = {} 79 | dict_state["state"] = "ERROR: no puppet here" 80 | 81 | for state_file in possible_state_files: 82 | if os.path.exists(state_file): 83 | try: 84 | dict_state = read_puppet_yaml(state_file) 85 | except Exception as e: 86 | dict_state["state_file"] = "ERROR: unable to load : %s / %s " % (str(e), state_file) 87 | break 88 | 89 | dict_state["disabled"] = "NOT DISABLED" 90 | 91 | for disable_file in possible_disable_check_files: 92 | if os.path.exists(disable_file): 93 | try: 94 | with open(disable_file) as json_data: 95 | dict_state["disabled"] = "YES: " + json.load(json_data)["disabled_message"] 96 | except Exception as e: 97 | dict_state["disabled"] = "ERROR: unable to load %s / %s " % (str(e), disable_file) 98 | pass 99 | break 100 | 101 | if "resources" in dict_state: 102 | if int(dict_state["resources"]["failed"]) > 0: 103 | dict_state["state"] = "ERROR: puppetrun failed" 104 | elif int(dict_state["resources"]["changed"]) > 0: 105 | dict_state["state"] = "OK: puppetrun successful, %s changes" % dict_state["resources"]["changed"] 106 | else: 107 | dict_state["state"] = "OK: puppetrun successful, no changes" 108 | 109 | for run_report_file in possible_run_report: 110 | if os.path.exists(run_report_file): 111 | try: 112 | with open(run_report_file) as report_data: 113 | for line in report_data: 114 | m = re.match(r"^environment: (.+)$", line) 115 | if m: 116 | dict_state["environment"] = m.group(1) 117 | break 118 | except Exception as e: 119 | dict_state["environment"] = "unknown" 120 | pass 121 | break 122 | 123 | if len(sys.argv) == 2: 124 | print(dict_state[sys.argv[1]]) 125 | elif len(sys.argv) == 3: 126 | print(dict_state[sys.argv[1]][sys.argv[2]]) 127 | else: 128 | print(json.dumps(dict_state, ensure_ascii=False, indent=4)) 129 | -------------------------------------------------------------------------------- /zabbix_templates/6.4/documentation/custom-os-puppet.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 |

Macro Overview

35 | 36 | The following macros can be overloaded on host level. 37 | 38 | 39 | 40 | 41 |
NameDefault
42 |

Static Elements

43 |

Trigger Overview

44 | 45 | 46 | 47 | 48 |
NameDescriptionPriorityExpressionDependencies
49 |

Graph Overview

50 | 51 | 52 | 53 | 54 | 55 | 57 | 58 | 59 | 61 | 62 | 63 | 65 | 66 |
NameElements
Puppet Eventspuppet[events,failure]
puppet[events,success]
puppet[events,total]
56 |
Puppet Execution Timepuppet[time,config_retrieval]
puppet[time,total]
60 |
Puppet Resourcespuppet[resources,total]
puppet[resources,changed]
puppet[resources,failed_to_restart]
puppet[resources,out_of_sync]
puppet[resources,restarted]
puppet[resources,scheduled]
puppet[resources,skipped]
64 |
67 |

Item Overview

68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
ZABBIX_ACTIVEPuppet Agent Processproc.num[,root,,.*ruby.*puppet agent.*$]300
DEPENDENTPuppet Changes Totalpuppet[changes,total]030d
DEPENDENTPuppet Disabledpuppet[disabled]030d0
DEPENDENTPuppet Environmentpuppet[environment]030d0
DEPENDENTPuppet Events Failurepuppet[events,failure]030d
DEPENDENTPuppet Events Successpuppet[events,success]030d
DEPENDENTPuppet Events Totalpuppet[events,total]030d
DEPENDENTPuppet resources changedpuppet[resources,changed]030d
DEPENDENTPuppet resources failed_to_restartpuppet[resources,failed_to_restart]030d
DEPENDENTPuppet resources out_of_syncpuppet[resources,out_of_sync]030d
DEPENDENTPuppet resources restartedpuppet[resources,restarted]030d
DEPENDENTPuppet resources scheduledpuppet[resources,scheduled]030d
DEPENDENTPuppet resources skippedpuppet[resources,skipped]030d
DEPENDENTPuppet resources totalpuppet[resources,total]030d
DEPENDENTPuppet Statepuppet[state]030d0
DEPENDENTPuppet time config_retrievalpuppet[time,config_retrieval]014d90d
DEPENDENTPuppet time last_runpuppet[time,last_run]030d
DEPENDENTPuppet time totalpuppet[time,total]014d90d
ZABBIX_ACTIVEPuppet Global JSON Statepuppet[]30m3d0
130 | 131 | 132 | -------------------------------------------------------------------------------- /zabbix_templates/4.4-outdated/documentation/custom-os-puppet.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 |

Macro Overview

35 | 36 | The following macros can be overloaded on host level. 37 | 38 | 39 | 40 | 41 |
NameDefault
42 |

Static Elements

43 |

Trigger Overview

44 | 45 | 46 | 47 | 48 |
NameDescriptionPriorityExpressionDependencies
49 |

Graph Overview

50 | 51 | 52 | 53 | 54 | 55 | 57 | 58 | 59 | 61 | 62 | 63 | 65 | 66 |
NameElements
Puppet Eventspuppet[events,failure]
puppet[events,success]
puppet[events,total]
56 |
Puppet Execution Timepuppet[time,config_retrieval]
puppet[time,total]
60 |
Puppet Resourcespuppet[resources,total]
puppet[resources,changed]
puppet[resources,failed_to_restart]
puppet[resources,out_of_sync]
puppet[resources,restarted]
puppet[resources,scheduled]
puppet[resources,skipped]
64 |
67 |

Item Overview

68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
ZABBIX_ACTIVEPuppet Agent Processproc.num[,root,,.*ruby.*puppet agent.*$]300
DEPENDENTPuppet Changes Totalpuppet[changes,total]030d
DEPENDENTPuppet Disabledpuppet[disabled]030d0
DEPENDENTPuppet Environmentpuppet[environment]030d0
DEPENDENTPuppet Events Failurepuppet[events,failure]030d
DEPENDENTPuppet Events Successpuppet[events,success]030d
DEPENDENTPuppet Events Totalpuppet[events,total]030d
DEPENDENTPuppet resources changedpuppet[resources,changed]030d
DEPENDENTPuppet resources failed_to_restartpuppet[resources,failed_to_restart]030d
DEPENDENTPuppet resources out_of_syncpuppet[resources,out_of_sync]030d
DEPENDENTPuppet resources restartedpuppet[resources,restarted]030d
DEPENDENTPuppet resources scheduledpuppet[resources,scheduled]030d
DEPENDENTPuppet resources skippedpuppet[resources,skipped]030d
DEPENDENTPuppet resources totalpuppet[resources,total]030d
DEPENDENTPuppet Statepuppet[state]030d0
DEPENDENTPuppet time config_retrievalpuppet[time,config_retrieval]014d90d
DEPENDENTPuppet time last_runpuppet[time,last_run]030d
DEPENDENTPuppet time totalpuppet[time,total]014d90d
ZABBIX_ACTIVEPuppet Global JSON Statepuppet[]30m3d0
130 | 131 | 132 | -------------------------------------------------------------------------------- /zabbix_templates/5.2-outdated/documentation/custom-os-puppet.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 |

Macro Overview

35 | 36 | The following macros can be overloaded on host level. 37 | 38 | 39 | 40 | 41 |
NameDefault
42 |

Static Elements

43 |

Trigger Overview

44 | 45 | 46 | 47 | 48 |
NameDescriptionPriorityExpressionDependencies
49 |

Graph Overview

50 | 51 | 52 | 53 | 54 | 55 | 57 | 58 | 59 | 61 | 62 | 63 | 65 | 66 |
NameElements
Puppet Eventspuppet[events,failure]
puppet[events,success]
puppet[events,total]
56 |
Puppet Execution Timepuppet[time,config_retrieval]
puppet[time,total]
60 |
Puppet Resourcespuppet[resources,total]
puppet[resources,changed]
puppet[resources,failed_to_restart]
puppet[resources,out_of_sync]
puppet[resources,restarted]
puppet[resources,scheduled]
puppet[resources,skipped]
64 |
67 |

Item Overview

68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
ZABBIX_ACTIVEPuppet Agent Processproc.num[,root,,.*ruby.*puppet agent.*$]300
DEPENDENTPuppet Changes Totalpuppet[changes,total]030d
DEPENDENTPuppet Disabledpuppet[disabled]030d0
DEPENDENTPuppet Environmentpuppet[environment]030d0
DEPENDENTPuppet Events Failurepuppet[events,failure]030d
DEPENDENTPuppet Events Successpuppet[events,success]030d
DEPENDENTPuppet Events Totalpuppet[events,total]030d
DEPENDENTPuppet resources changedpuppet[resources,changed]030d
DEPENDENTPuppet resources failed_to_restartpuppet[resources,failed_to_restart]030d
DEPENDENTPuppet resources out_of_syncpuppet[resources,out_of_sync]030d
DEPENDENTPuppet resources restartedpuppet[resources,restarted]030d
DEPENDENTPuppet resources scheduledpuppet[resources,scheduled]030d
DEPENDENTPuppet resources skippedpuppet[resources,skipped]030d
DEPENDENTPuppet resources totalpuppet[resources,total]030d
DEPENDENTPuppet Statepuppet[state]030d0
DEPENDENTPuppet time config_retrievalpuppet[time,config_retrieval]014d90d
DEPENDENTPuppet time last_runpuppet[time,last_run]030d
DEPENDENTPuppet time totalpuppet[time,total]014d90d
ZABBIX_ACTIVEPuppet Global JSON Statepuppet[]30m3d0
130 | 131 | 132 | -------------------------------------------------------------------------------- /extension-files/tools/zabbix_check_elasticsearch: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Created by Aaron Mildenstein on 19 SEP 2012 4 | # Switchted from pyes to Elasticsearch for better Health Monitoring by Marcel Alburg on 17 JUN 2014 5 | 6 | from elasticsearch import Elasticsearch 7 | 8 | import sys 9 | import json 10 | import socket 11 | 12 | 13 | # Define the fail message 14 | def zbx_fail(): 15 | print("ZBX_NOTSUPPORTED") 16 | sys.exit(2) 17 | 18 | 19 | searchkeys = ['query_total', 'fetch_time_in_millis', 'fetch_total', 'fetch_time', 'query_current', 'fetch_current', 20 | 'query_time_in_millis'] 21 | getkeys = ['missing_total', 'exists_total', 'current', 'time_in_millis', 'missing_time_in_millis', 22 | 'exists_time_in_millis', 'total'] 23 | docskeys = ['count', 'deleted'] 24 | indexingkeys = ['delete_time_in_millis', 'index_total', 'index_current', 'delete_total', 'index_time_in_millis', 25 | 'delete_current'] 26 | storekeys = ['size_in_bytes', 'throttle_time_in_millis'] 27 | cachekeys = ['filter_size_in_bytes', 'field_size_in_bytes', 'field_evictions'] 28 | clusterkeys = searchkeys + getkeys + docskeys + indexingkeys + storekeys 29 | returnval = None 30 | 31 | # __main__ 32 | 33 | # We need to have two command-line args: 34 | # sys.argv[1]: The node name or "cluster" 35 | # sys.argv[2]: The "key" (status, filter_size_in_bytes, etc) 36 | 37 | if len(sys.argv) < 3: 38 | zbx_fail() 39 | 40 | # Try to establish a connection to elasticsearch 41 | try: 42 | conn = Elasticsearch(socket.gethostname() + ':9200', sniff_on_start=False) 43 | except: 44 | zbx_fail() 45 | 46 | if sys.argv[1] == 'cluster': 47 | if sys.argv[2] in clusterkeys: 48 | nodestats = conn.cluster.stats() 49 | subtotal = 0 50 | for nodename in nodestats['nodes']: 51 | try: 52 | if sys.argv[2] in indexingkeys: 53 | indexstats = nodestats['nodes'][nodename]['indices']['indexing'] 54 | elif sys.argv[2] in storekeys: 55 | indexstats = nodestats['nodes'][nodename]['indices']['store'] 56 | elif sys.argv[2] in getkeys: 57 | indexstats = nodestats['nodes'][nodename]['indices']['get'] 58 | elif sys.argv[2] in docskeys: 59 | indexstats = nodestats['nodes'][nodename]['indices']['docs'] 60 | elif sys.argv[2] in searchkeys: 61 | indexstats = nodestats['nodes'][nodename]['indices']['search'] 62 | except: 63 | pass 64 | try: 65 | if sys.argv[2] in indexstats: 66 | subtotal += indexstats[sys.argv[2]] 67 | except: 68 | pass 69 | returnval = subtotal 70 | 71 | 72 | else: 73 | # Try to pull the managers object data 74 | try: 75 | escluster = conn.cluster 76 | except: 77 | zbx_fail() 78 | # Try to get a value to match the key provided 79 | try: 80 | returnval = escluster.health()[sys.argv[2]] 81 | except: 82 | zbx_fail() 83 | # If the key is "status" then we need to map that to an integer 84 | if sys.argv[2] == 'status': 85 | if returnval == 'green': 86 | returnval = 0 87 | elif returnval == 'yellow': 88 | returnval = 1 89 | elif returnval == 'red': 90 | returnval = 2 91 | else: 92 | zbx_fail() 93 | 94 | # Mod to check if ES service is up 95 | elif sys.argv[1] == 'service': 96 | if sys.argv[2] == 'status': 97 | try: 98 | conn.cluster.stats() 99 | returnval = 1 100 | except: 101 | returnval = 0 102 | 103 | else: # Not clusterwide, check the next arg 104 | nodestats = conn.nodes.stats() 105 | for nodename in nodestats['nodes']: 106 | if sys.argv[1] in nodestats['nodes'][nodename]['name']: 107 | if sys.argv[2] in indexingkeys: 108 | stats = nodestats['nodes'][nodename]['indices']['indexing'] 109 | elif sys.argv[2] in storekeys: 110 | stats = nodestats['nodes'][nodename]['indices']['store'] 111 | elif sys.argv[2] in getkeys: 112 | stats = nodestats['nodes'][nodename]['indices']['get'] 113 | elif sys.argv[2] in docskeys: 114 | stats = nodestats['nodes'][nodename]['indices']['docs'] 115 | elif sys.argv[2] in searchkeys: 116 | stats = nodestats['nodes'][nodename]['indices']['search'] 117 | elif sys.argv[2] in cachekeys: 118 | stats = nodestats['nodes'][nodename]['indices']['cache'] 119 | try: 120 | returnval = stats[sys.argv[2]] 121 | except: 122 | pass 123 | 124 | # If we somehow did not get a value here, that's a problem. Send back the standard 125 | # ZBX_NOTSUPPORTED 126 | if returnval is None: 127 | zbx_fail() 128 | else: 129 | print(returnval) 130 | 131 | # End 132 | -------------------------------------------------------------------------------- /zabbix_templates/3.2-outdated/documentation/custom-service-elasticsearch-cluster.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 |

Macro Overview

35 | 36 | The following macros can be overloaded on host level. 37 | 38 | 39 | 40 | 41 |
NameDefault
42 |

Static Elements

43 |

Trigger Overview

44 | 45 | 46 | 47 | 48 | 49 | 51 | 52 | 53 | 54 | 55 |
NameDescriptionPriorityExpressionDependencies
Elasticsearch Cluster in {ITEM.LASTVALUE} stateThe cluster health status is: green, yellow or red. On the shard level, a red status indicates that the specific shard is not allocated in the cluster, yellow means that the primary shard is allocated but replicas are not, and green means that all shards are allocated. The index level status is controlled by the worst shard status. The cluster status is controlled by the worst index status.Average{Custom - Service - Elasticsearch Cluster:elasticsearch[cluster,status].last(0)}=1Elasticsearch Cluster in {ITEM.LASTVALUE} state
50 |
Elasticsearch Cluster in {ITEM.LASTVALUE} stateThe cluster health status is: green, yellow or red. On the shard level, a red status indicates that the specific shard is not allocated in the cluster, yellow means that the primary shard is allocated but replicas are not, and green means that all shards are allocated. The index level status is controlled by the worst shard status. The cluster status is controlled by the worst index status.High{Custom - Service - Elasticsearch Cluster:elasticsearch[cluster,status].last(0)}=2
56 |

Graph Overview

57 | 58 | 59 | 60 | 61 | 62 | 64 | 65 | 66 | 68 | 69 |
NameElements
ELK Shardselasticsearch[cluster,active_primary_shards]
elasticsearch[cluster,active_shards]
elasticsearch[cluster,initializing_shards]
elasticsearch[cluster,relocating_shards]
elasticsearch[cluster,unassigned_shards]
63 |
ELK Usageelasticsearch[cluster,size_in_bytes]
elasticsearch[cluster,count]
67 |
70 |

Item Overview

71 | 72 | 73 | 74 | 75 | 76 | 79 | 80 | 81 | 84 | 85 | 86 | 89 | 90 | 91 | 94 | 95 | 96 | 99 | 100 | 101 | 104 | 105 | 106 | 109 | 110 | 111 | 114 | 115 | 116 | 119 | 120 | 121 | 124 | 125 | 126 | 129 | 130 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
77 |

Zabbix Agent

78 |
Number of active primary shardselasticsearch[cluster,active_primary_shards]6001490
82 |

Zabbix Agent

83 |
Number of active shardselasticsearch[cluster,active_shards]6001490
87 |

ERROR - Unknown

88 |
Total number of recordselasticsearch[cluster,count]3001490
92 |

ERROR - Unknown

93 |
Cluster-wide records indexed per secondelasticsearch[cluster,index_total]3001490
97 |

ERROR - Unknown

98 |
Number of initializing shardselasticsearch[cluster,initializing_shards]3001490
102 |

Zabbix Agent

103 |
Number of data nodeselasticsearch[cluster,number_of_data_nodes]6001490
107 |

Zabbix Agent

108 |
Number of nodeselasticsearch[cluster,number_of_nodes]6001490
112 |

ERROR - Unknown

113 |
Number of relocating shardselasticsearch[cluster,relocating_shards]3001490
117 |

ERROR - Unknown

118 |
Cluster-wide storage sizeelasticsearch[cluster,size_in_bytes]3001490
122 |

ERROR - Unknown

123 |
ElasticSearch Cluster Statuselasticsearch[cluster,status]3001490
127 |

ERROR - Unknown

128 |
Number of unassigned shardselasticsearch[cluster,unassigned_shards]3001490
131 | 132 | 133 | -------------------------------------------------------------------------------- /zabbix_templates/6.4/documentation/custom-os-linux-hardware.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 |

Macro Overview

35 | 36 | The following macros can be overloaded on host level. 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |
NameDefault
{$DISK_USAGE_PERCENT_ALARM}97
{$MAXIMUM_NUMBER_RETRANSMISSIONS}1
{$MAX_NTP_OFFSET_MS}100
{$MIN_NTP_SERVER_COUNT}2
{$MONITOR_LOAD_WARNING_MULT}5
{$MONITOR_TIMEOUT}14400
60 |

Static Elements

61 |

Trigger Overview

62 | 63 | 64 | 65 | 66 |
NameDescriptionPriorityExpressionDependencies
67 |

Graph Overview

68 | 69 | 70 | 71 | 72 |
NameElements
73 |

Item Overview

74 | 75 | 76 | 77 | 78 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
79 |

Discovery rule "Hard Disk discovery"

80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 |
NameValue
NameHard Disk discovery
Keyvfs.dev.discovery.smart
TypeZABBIX_ACTIVE
Delay15m
97 |

Trigger Overview

98 | 99 | 100 | 101 | 102 |
NameDescriptionPriorityExpressionDependencies
103 |

Graph Overview

104 | 105 | 106 | 107 | 108 | 109 | 111 | 112 | 113 | 115 | 116 |
NameElements
Disk {#BLOCKDEVICE} - Errorshardware.disk.smart.attributes[{#BLOCKDEVICE},Reallocated_Sector_Ct]
hardware.disk.smart.attributes[{#BLOCKDEVICE},Spin_Retry_Count]
hardware.disk.smart.attributes[{#BLOCKDEVICE},Current_Pending_Sector]
hardware.disk.smart.attributes[{#BLOCKDEVICE},Offline_Uncorrectable]
hardware.disk.smart.attributes[{#BLOCKDEVICE},UDMA_CRC_Error_Count]
110 |
Disk {#BLOCKDEVICE} - Lifetimehardware.disk.smart.attributes[{#BLOCKDEVICE},Power_On_Hours]
hardware.disk.smart.attributes[{#BLOCKDEVICE},Temperature_Celsius]
114 |
117 |

Item Overview

118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
ZABBIX_ACTIVE{#BLOCKDEVICE} Smart Health Statushardware.disk.health[{#BLOCKDEVICE}]10m60d0
ZABBIX_ACTIVE{#BLOCKDEVICE}: ID 197 Current_Pending_Sectorhardware.disk.smart.attributes[{#BLOCKDEVICE},Current_Pending_Sector]2h1w0
ZABBIX_ACTIVE{#BLOCKDEVICE}: ID 198 Offline_Uncorrectablehardware.disk.smart.attributes[{#BLOCKDEVICE},Offline_Uncorrectable]2h1w0
ZABBIX_ACTIVE{#BLOCKDEVICE}: ID 9 Power On Hourshardware.disk.smart.attributes[{#BLOCKDEVICE},Power_On_Hours]2h1w0
ZABBIX_ACTIVE{#BLOCKDEVICE}: ID 5 Reallocated Sectors Counthardware.disk.smart.attributes[{#BLOCKDEVICE},Reallocated_Sector_Ct]2h1w0
ZABBIX_ACTIVE{#BLOCKDEVICE}: ID 10 Spin_Retry_Counthardware.disk.smart.attributes[{#BLOCKDEVICE},Spin_Retry_Count]2h1w0
ZABBIX_ACTIVE{#BLOCKDEVICE}: ID 194 Temperaturehardware.disk.smart.attributes[{#BLOCKDEVICE},Temperature_Celsius]10m1w90d
ZABBIX_ACTIVE{#BLOCKDEVICE}: ID 199 UDMA_CRC_Errorhardware.disk.smart.attributes[{#BLOCKDEVICE},UDMA_CRC_Error_Count]2h1w
ZABBIX_ACTIVE{#BLOCKDEVICE} Device modelhardware.disk.smart.info[{#BLOCKDEVICE},Device Model]1d0
ZABBIX_ACTIVE{#BLOCKDEVICE} Serial Numberhardware.disk.smart.info[{#BLOCKDEVICE},Serial Number]1d0
153 | 154 | 155 | -------------------------------------------------------------------------------- /zabbix_templates/4.4-outdated/documentation/custom-os-linux-hardware.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 |

Macro Overview

35 | 36 | The following macros can be overloaded on host level. 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |
NameDefault
{$DISK_USAGE_PERCENT_ALARM}97
{$MAXIMUM_NUMBER_RETRANSMISSIONS}1
{$MAX_NTP_OFFSET_MS}100
{$MIN_NTP_SERVER_COUNT}2
{$MONITOR_LOAD_WARNING_MULT}5
{$MONITOR_TIMEOUT}14400
60 |

Static Elements

61 |

Trigger Overview

62 | 63 | 64 | 65 | 66 |
NameDescriptionPriorityExpressionDependencies
67 |

Graph Overview

68 | 69 | 70 | 71 | 72 |
NameElements
73 |

Item Overview

74 | 75 | 76 | 77 | 78 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
79 |

Discovery rule "Hard Disk discovery"

80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 |
NameValue
NameHard Disk discovery
Keyvfs.dev.discovery.rawdisks
TypeZABBIX_ACTIVE
Delay15m
97 |

Trigger Overview

98 | 99 | 100 | 101 | 102 |
NameDescriptionPriorityExpressionDependencies
103 |

Graph Overview

104 | 105 | 106 | 107 | 108 | 109 | 111 | 112 | 113 | 115 | 116 |
NameElements
Disk {#BLOCKDEVICE} - Errorshardware.disk.smart.attributes[{#BLOCKDEVICE},Reallocated_Sector_Ct]
hardware.disk.smart.attributes[{#BLOCKDEVICE},Spin_Retry_Count]
hardware.disk.smart.attributes[{#BLOCKDEVICE},Current_Pending_Sector]
hardware.disk.smart.attributes[{#BLOCKDEVICE},Offline_Uncorrectable]
hardware.disk.smart.attributes[{#BLOCKDEVICE},UDMA_CRC_Error_Count]
110 |
Disk {#BLOCKDEVICE} - Lifetimehardware.disk.smart.attributes[{#BLOCKDEVICE},Power_On_Hours]
hardware.disk.smart.attributes[{#BLOCKDEVICE},Temperature_Celsius]
114 |
117 |

Item Overview

118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
ZABBIX_ACTIVE{#BLOCKDEVICE} Smart Health Statushardware.disk.health[{#BLOCKDEVICE}]10m60d0
ZABBIX_ACTIVE{#BLOCKDEVICE}: ID 197 Current_Pending_Sectorhardware.disk.smart.attributes[{#BLOCKDEVICE},Current_Pending_Sector]2h1w0
ZABBIX_ACTIVE{#BLOCKDEVICE}: ID 198 Offline_Uncorrectablehardware.disk.smart.attributes[{#BLOCKDEVICE},Offline_Uncorrectable]2h1w0
ZABBIX_ACTIVE{#BLOCKDEVICE}: ID 9 Power On Hourshardware.disk.smart.attributes[{#BLOCKDEVICE},Power_On_Hours]2h1w0
ZABBIX_ACTIVE{#BLOCKDEVICE}: ID 5 Reallocated Sectors Counthardware.disk.smart.attributes[{#BLOCKDEVICE},Reallocated_Sector_Ct]2h1w0
ZABBIX_ACTIVE{#BLOCKDEVICE}: ID 10 Spin_Retry_Counthardware.disk.smart.attributes[{#BLOCKDEVICE},Spin_Retry_Count]2h1w0
ZABBIX_ACTIVE{#BLOCKDEVICE}: ID 194 Temperaturehardware.disk.smart.attributes[{#BLOCKDEVICE},Temperature_Celsius]10m1w90d
ZABBIX_ACTIVE{#BLOCKDEVICE}: ID 199 UDMA_CRC_Errorhardware.disk.smart.attributes[{#BLOCKDEVICE},UDMA_CRC_Error_Count]2h1w
ZABBIX_ACTIVE{#BLOCKDEVICE} Device modelhardware.disk.smart.info[{#BLOCKDEVICE},Device Model]1d0
ZABBIX_ACTIVE{#BLOCKDEVICE} Serial Numberhardware.disk.smart.info[{#BLOCKDEVICE},Serial Number]1d0
153 | 154 | 155 | -------------------------------------------------------------------------------- /zabbix_templates/5.2-outdated/documentation/custom-os-linux-hardware.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 |

Macro Overview

35 | 36 | The following macros can be overloaded on host level. 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |
NameDefault
{$DISK_USAGE_PERCENT_ALARM}97
{$MAXIMUM_NUMBER_RETRANSMISSIONS}1
{$MAX_NTP_OFFSET_MS}100
{$MIN_NTP_SERVER_COUNT}2
{$MONITOR_LOAD_WARNING_MULT}5
{$MONITOR_TIMEOUT}14400
60 |

Static Elements

61 |

Trigger Overview

62 | 63 | 64 | 65 | 66 |
NameDescriptionPriorityExpressionDependencies
67 |

Graph Overview

68 | 69 | 70 | 71 | 72 |
NameElements
73 |

Item Overview

74 | 75 | 76 | 77 | 78 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
79 |

Discovery rule "Hard Disk discovery"

80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 |
NameValue
NameHard Disk discovery
Keyvfs.dev.discovery.rawdisks
TypeZABBIX_ACTIVE
Delay15m
97 |

Trigger Overview

98 | 99 | 100 | 101 | 102 |
NameDescriptionPriorityExpressionDependencies
103 |

Graph Overview

104 | 105 | 106 | 107 | 108 | 109 | 111 | 112 | 113 | 115 | 116 |
NameElements
Disk {#BLOCKDEVICE} - Errorshardware.disk.smart.attributes[{#BLOCKDEVICE},Reallocated_Sector_Ct]
hardware.disk.smart.attributes[{#BLOCKDEVICE},Spin_Retry_Count]
hardware.disk.smart.attributes[{#BLOCKDEVICE},Current_Pending_Sector]
hardware.disk.smart.attributes[{#BLOCKDEVICE},Offline_Uncorrectable]
hardware.disk.smart.attributes[{#BLOCKDEVICE},UDMA_CRC_Error_Count]
110 |
Disk {#BLOCKDEVICE} - Lifetimehardware.disk.smart.attributes[{#BLOCKDEVICE},Power_On_Hours]
hardware.disk.smart.attributes[{#BLOCKDEVICE},Temperature_Celsius]
114 |
117 |

Item Overview

118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
ZABBIX_ACTIVE{#BLOCKDEVICE} Smart Health Statushardware.disk.health[{#BLOCKDEVICE}]10m60d0
ZABBIX_ACTIVE{#BLOCKDEVICE}: ID 197 Current_Pending_Sectorhardware.disk.smart.attributes[{#BLOCKDEVICE},Current_Pending_Sector]2h1w0
ZABBIX_ACTIVE{#BLOCKDEVICE}: ID 198 Offline_Uncorrectablehardware.disk.smart.attributes[{#BLOCKDEVICE},Offline_Uncorrectable]2h1w0
ZABBIX_ACTIVE{#BLOCKDEVICE}: ID 9 Power On Hourshardware.disk.smart.attributes[{#BLOCKDEVICE},Power_On_Hours]2h1w0
ZABBIX_ACTIVE{#BLOCKDEVICE}: ID 5 Reallocated Sectors Counthardware.disk.smart.attributes[{#BLOCKDEVICE},Reallocated_Sector_Ct]2h1w0
ZABBIX_ACTIVE{#BLOCKDEVICE}: ID 10 Spin_Retry_Counthardware.disk.smart.attributes[{#BLOCKDEVICE},Spin_Retry_Count]2h1w0
ZABBIX_ACTIVE{#BLOCKDEVICE}: ID 194 Temperaturehardware.disk.smart.attributes[{#BLOCKDEVICE},Temperature_Celsius]10m1w90d
ZABBIX_ACTIVE{#BLOCKDEVICE}: ID 199 UDMA_CRC_Errorhardware.disk.smart.attributes[{#BLOCKDEVICE},UDMA_CRC_Error_Count]2h1w
ZABBIX_ACTIVE{#BLOCKDEVICE} Device modelhardware.disk.smart.info[{#BLOCKDEVICE},Device Model]1d0
ZABBIX_ACTIVE{#BLOCKDEVICE} Serial Numberhardware.disk.smart.info[{#BLOCKDEVICE},Serial Number]1d0
153 | 154 | 155 | -------------------------------------------------------------------------------- /zabbix_templates/3.4-outdated/documentation/custom-service-elasticsearch-cluster.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 |

Macro Overview

35 | 36 | The following macros can be overloaded on host level. 37 | 38 | 39 | 40 | 41 |
NameDefault
42 |

Static Elements

43 |

Trigger Overview

44 | 45 | 46 | 47 | 48 | 49 | 51 | 52 | 53 | 54 | 55 |
NameDescriptionPriorityExpressionDependencies
Elasticsearch Cluster in {ITEM.LASTVALUE} stateThe cluster health status is: green, yellow or red. On the shard level, a red status indicates that the specific shard is not allocated in the cluster, yellow means that the primary shard is allocated but replicas are not, and green means that all shards are allocated. The index level status is controlled by the worst shard status. The cluster status is controlled by the worst index status.Average{Custom - Service - Elasticsearch Cluster:elasticsearch[cluster,status].last(0)}=1Elasticsearch Cluster in {ITEM.LASTVALUE} state
50 |
Elasticsearch Cluster in {ITEM.LASTVALUE} stateThe cluster health status is: green, yellow or red. On the shard level, a red status indicates that the specific shard is not allocated in the cluster, yellow means that the primary shard is allocated but replicas are not, and green means that all shards are allocated. The index level status is controlled by the worst shard status. The cluster status is controlled by the worst index status.High{Custom - Service - Elasticsearch Cluster:elasticsearch[cluster,status].last(0)}=2
56 |

Graph Overview

57 | 58 | 59 | 60 | 61 | 62 | 64 | 65 | 66 | 68 | 69 |
NameElements
ELK Shardselasticsearch[cluster,active_primary_shards]
elasticsearch[cluster,active_shards]
elasticsearch[cluster,initializing_shards]
elasticsearch[cluster,relocating_shards]
elasticsearch[cluster,unassigned_shards]
63 |
ELK Usageelasticsearch[cluster,size_in_bytes]
elasticsearch[cluster,count]
67 |
70 |

Item Overview

71 | 72 | 73 | 74 | 75 | 76 | 79 | 80 | 81 | 84 | 85 | 86 | 89 | 90 | 91 | 94 | 95 | 96 | 99 | 100 | 101 | 104 | 105 | 106 | 109 | 110 | 111 | 114 | 115 | 116 | 119 | 120 | 121 | 124 | 125 | 126 | 129 | 130 |
TypeNameKeyDescriptionInterval (sec)History DaysTrend Days
77 |

Zabbix Agent

78 |
Number of active primary shardselasticsearch[cluster,active_primary_shards]6001490
82 |

Zabbix Agent

83 |
Number of active shardselasticsearch[cluster,active_shards]6001490
87 |

Zabbix Agent (active)

88 |
Total number of recordselasticsearch[cluster,count]3001490
92 |

Zabbix Agent (active)

93 |
Cluster-wide records indexed per secondelasticsearch[cluster,index_total]3001490
97 |

Zabbix Agent (active)

98 |
Number of initializing shardselasticsearch[cluster,initializing_shards]3001490
102 |

Zabbix Agent

103 |
Number of data nodeselasticsearch[cluster,number_of_data_nodes]6001490
107 |

Zabbix Agent

108 |
Number of nodeselasticsearch[cluster,number_of_nodes]6001490
112 |

Zabbix Agent (active)

113 |
Number of relocating shardselasticsearch[cluster,relocating_shards]3001490
117 |

Zabbix Agent (active)

118 |
Cluster-wide storage sizeelasticsearch[cluster,size_in_bytes]3001490
122 |

Zabbix Agent (active)

123 |
ElasticSearch Cluster Statuselasticsearch[cluster,status]3001490
127 |

Zabbix Agent (active)

128 |
Number of unassigned shardselasticsearch[cluster,unassigned_shards]3001490
131 | 132 | 133 | --------------------------------------------------------------------------------