首页 > 数据库 >zabbix-server-pgsql docker镜像说明

zabbix-server-pgsql docker镜像说明

时间:2024-03-13 22:45:46浏览次数:16  
标签:Available POSTGRES since server pgsql zabbix ZBX

0 说明

zabbix-server-pgsql在docker hub的官方说明,供查阅

1 Environment Variables

1.1 基本变量

When you start the zabbix-server-pgsql image, you can adjust the configuration of the Zabbix server by passing one or more environment variables on the docker run command line.

DB_SERVER_HOST
This variable is IP or DNS name of PostgreSQL server. By default, value is 'postgres-server'

DB_SERVER_PORT
This variable is port of PostgreSQL server. By default, value is '5432'.

POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_USER_FILE, POSTGRES_PASSWORD_FILE
These variables are used by Zabbix server to connect to Zabbix database. With the _FILE variables you can instead provide the path to a file which contains the user / the password instead. Without Docker Swarm or Kubernetes you also have to map the files. Those are exclusive so you can just provide one type - either POSTGRES_USER or POSTGRES_USER_FILE!

docker run --name some-zabbix-server-pgsql -e DB_SERVER_HOST="some-postgres-server" -v ./.POSTGRES_USER:/run/secrets/POSTGRES_USER -e POSTGRES_USER_FILE=/run/secrets/POSTGRES_USER -v ./.POSTGRES_PASSWORD:/run/secrets/POSTGRES_PASSWORD -e POSTGRES_PASSWORD_FILE=/var/run/secrets/POSTGRES_PASSWORD --init -d zabbix/zabbix-server-pgsql:tag
With Docker Swarm or Kubernetes this works with secrets. That way it is replicated in your cluster!

printf "zabbix" | docker secret create POSTGRES_USER -
printf "zabbix" | docker secret create POSTGRES_PASSWORD -
docker run --name some-zabbix-server-pgsql -e DB_SERVER_HOST="some-postgres-server" -e POSTGRES_USER_FILE=/run/secrets/POSTGRES_USER -e POSTGRES_PASSWORD_FILE=/run/secrets/POSTGRES_PASSWORD --init -d zabbix/zabbix-server-pgsql:tag
By default, values for POSTGRES_USER and POSTGRES_PASSWORD are zabbix, zabbix.

POSTGRES_DB
The variable is Zabbix database name. By default, value is zabbix.

POSTGRES_USE_IMPLICIT_SEARCH_PATH
In some setups, for example including PgBouncer, setting the search_path via connection parameters fails. If this variable is set to "true", the image skips setting the search_path and trusts that the search_path of the Zabbix user is setup correctly in PostgreSQL database.

ZBX_LOADMODULE
The variable is list of comma separated loadable Zabbix modules. It works with volume /var/lib/zabbix/modules. The syntax of the variable is dummy1.so,dummy2.so.

ZBX_DEBUGLEVEL
The variable is used to specify debug level. By default, value is 3. It is DebugLevel parameter in zabbix_server.conf. Allowed values are listed below:
0 - basic information about starting and stopping of Zabbix processes;
1 - critical information
2 - error information
3 - warnings
4 - for debugging (produces lots of information)
5 - extended debugging (produces even more information)

ZBX_TIMEOUT
The variable is used to specify timeout for processing checks. By default, value is 4.

ZBX_JAVAGATEWAY_ENABLE
The variable enable communication with Zabbix Java Gateway to collect Java related checks. By default, value is false.

1.2 其他变量

Additionally the image allows to specify many other environment variables listed below:

ZBX_ALLOWUNSUPPORTEDDBVERSIONS=0 # Available since 6.0.0
ZBX_DBTLSCONNECT= # Available since 5.0.0
ZBX_DBTLSCAFILE= # Available since 5.0.0
ZBX_DBTLSCERTFILE= # Available since 5.0.0
ZBX_DBTLSKEYFILE= # Available since 5.0.0
ZBX_DBTLSCIPHER= # Available since 5.0.0
ZBX_DBTLSCIPHER13= # Available since 5.0.0
ZBX_VAULTDBPATH= # Available since 5.2.0
ZBX_VAULTURL=https://127.0.0.1:8200 # Available since 5.2.0
VAULT_TOKEN= # Available since 5.2.0
ZBX_LISTENIP=
ZBX_LISTENPORT=10051
ZBX_LISTENBACKLOG=
ZBX_STARTREPORTWRITERS=0 # Available since 5.4.0
ZBX_WEBSERVICEURL=http://zabbix-web-service:10053/report # Available since 5.4.0
ZBX_SERVICEMANAGERSYNCFREQUENCY=60 # Available since 6.0.0
ZBX_HISTORYSTORAGEURL= # Available since 3.4.0
ZBX_HISTORYSTORAGETYPES=uint,dbl,str,log,text # Available since 3.4.0
ZBX_STARTPOLLERS=5
ZBX_IPMIPOLLERS=0
ZBX_STARTCONNECTORS=0 # Available since 6.4.0
ZBX_STARTPREPROCESSORS=3 # Available since 3.4.0
ZBX_STARTPOLLERSUNREACHABLE=1
ZBX_STARTTRAPPERS=5
ZBX_STARTPINGERS=1
ZBX_STARTDISCOVERERS=1
ZBX_STARTHISTORYPOLLERS=5 # Available since 5.4.0
ZBX_STARTHTTPPOLLERS=1
ZBX_STARTODBCPOLLERS=1 # Available since 6.0.0
ZBX_STARTTIMERS=1
ZBX_STARTESCALATORS=1
ZBX_STARTALERTERS=3 # Available since 3.4.0
ZBX_JAVAGATEWAY=zabbix-java-gateway
ZBX_JAVAGATEWAYPORT=10052
ZBX_STARTJAVAPOLLERS=5
ZBX_STARTLLDPROCESSORS=2 # Available since 4.2.0
ZBX_STATSALLOWEDIP= # Available since 4.0.5
ZBX_STARTVMWARECOLLECTORS=0
ZBX_VMWAREFREQUENCY=60
ZBX_VMWAREPERFFREQUENCY=60
ZBX_VMWARECACHESIZE=8M
ZBX_VMWARETIMEOUT=10
ZBX_ENABLE_SNMP_TRAPS=false
ZBX_SOURCEIP=
ZBX_HOUSEKEEPINGFREQUENCY=1
ZBX_MAXHOUSEKEEPERDELETE=5000
ZBX_PROBLEMHOUSEKEEPINGFREQUENCY=60 # Available since 6.0.0
ZBX_SENDERFREQUENCY=30 # Depcrecated since 3.4.0
ZBX_CACHESIZE=8M
ZBX_CACHEUPDATEFREQUENCY=10
ZBX_STARTDBSYNCERS=4
ZBX_EXPORTFILESIZE=1G # Available since 4.0.0
ZBX_EXPORTTYPE= # Available since 5.0.10 and 5.2.6
ZBX_AUTOHANODENAME=fqdn # Allowed values: fqdn, hostname. Available since 6.0.0
ZBX_HANODENAME= # Available since 6.0.0
ZBX_AUTONODEADDRESS=fqdn # Allowed values: fqdn, hostname. Available since 6.0.0
ZBX_NODEADDRESSPORT=10051 # Allowed to use with ZBX_AUTONODEADDRESS variable only. Available since 6.0.0
ZBX_NODEADDRESS=localhost # Available since 6.0.0
ZBX_HISTORYCACHESIZE=16M
ZBX_HISTORYINDEXCACHESIZE=4M
ZBX_HISTORYSTORAGEDATEINDEX=0 # Available since 4.0.0
ZBX_TRENDCACHESIZE=4M
ZBX_TRENDFUNCTIONCACHESIZE=4M
ZBX_VALUECACHESIZE=8M
ZBX_TRAPPERTIMEOUT=300
ZBX_UNREACHABLEPERIOD=45
ZBX_UNAVAILABLEDELAY=60
ZBX_UNREACHABLEDELAY=15
ZBX_LOGSLOWQUERIES=3000
ZBX_STARTPROXYPOLLERS=1
ZBX_PROXYCONFIGFREQUENCY=10
ZBX_PROXYDATAFREQUENCY=1
ZBX_TLSCAFILE=
ZBX_TLSCRLFILE=
ZBX_TLSCERTFILE=
ZBX_TLSKEYFILE=
ZBX_TLSCIPHERALL= # Available since 4.4.7
ZBX_TLSCIPHERALL13= # Available since 4.4.7
ZBX_TLSCIPHERCERT= # Available since 4.4.7
ZBX_TLSCIPHERCERT13= # Available since 4.4.7
ZBX_TLSCIPHERPSK= # Available since 4.4.7
ZBX_TLSCIPHERPSK13= # Available since 4.4.7

Default values of these variables are specified after equal sign.

The allowed variables are identical of parameters in official zabbix_server.conf. For example, ZBX_LOGSLOWQUERIES = LogSlowQueries.

Please use official documentation for zabbix_server.conf to get more information about the variables.

2 Allowed volumes for the Zabbix server container

/usr/lib/zabbix/alertscripts
The volume is used for custom alert scripts. It is AlertScriptsPath parameter in zabbix_server.conf.
/usr/lib/zabbix/externalscripts
The volume is used by External checks (type of items). It is ExternalScripts parameter in zabbix_server.conf.
/var/lib/zabbix/modules
The volume allows load additional modules and extend Zabbix server using LoadModule feature.
/var/lib/zabbix/enc
The volume is used to store TLS related files. These file names are specified using ZBX_TLSCAFILE, ZBX_TLSCRLFILE, ZBX_TLSKEY_FILE and ZBX_TLSPSKFILE variables.
/var/lib/zabbix/ssh_keys
The volume is used as location of public and private keys for SSH checks and actions. It is SSHKeyLocation parameter in zabbix_server.conf.
/var/lib/zabbix/ssl/certs
The volume is used as location of of SSL client certificate files for client authentication. It is SSLCertLocation parameter in zabbix_server.conf.
/var/lib/zabbix/ssl/keys
The volume is used as location of SSL private key files for client authentication. It is SSLKeyLocation parameter in zabbix_server.conf.
/var/lib/zabbix/ssl/ssl_ca
The volume is used as location of certificate authority (CA) files for SSL server certificate verification. It is SSLCALocation parameter in zabbix_server.conf.
/var/lib/zabbix/snmptraps
The volume is used as location of snmptraps.log file. It could be shared by zabbix-snmptraps container and inherited using volumes_from Docker option while creating new instance of Zabbix server. SNMP traps processing feature could be enabled using shared volume and switched ZBX_ENABLE_SNMP_TRAPS environment variable to true.
/var/lib/zabbix/mibs
The volume allows to add new MIB files. It does not support subdirectories, all MIBs must be placed to /var/lib/zabbix/mibs.
/var/lib/zabbix/export
Directory for real-time export of events, history and trends in newline-delimited JSON format. Could be enabled using ZBX_EXPORTFILESIZE environment variable.

标签:Available,POSTGRES,since,server,pgsql,zabbix,ZBX
From: https://www.cnblogs.com/virtualzzf/p/18071730

相关文章

  • 【Azure Redis】部署在AKS中的应用连接Redis时候出现Unable to connect to Redis serv
    问题描述在AKSPod中连接AzureRedis服务,大概率出现连接不上的问题。大多数的错误为 RedisConnectionException:UnabletoconnecttoRedisserver:xxxxxxxxx.redis.cache.chinacloudapi.cn/52.xxx.xxx.xxx:6380,但是有时候的错误信息为: RedisConnectionException:Unable......
  • Zabbix监控nginx高可用是否脑裂
    Zabbix监控nginx高可用是否脑裂实验环境所有机关闭防火墙与selinux第一台机zabbix192.168.159.141lamp、zabbix_server、zabbix_agentd第二台机lb1192.168.159.139keepalived、nginx_master负载均衡rs1和rs2的网页测试页面第三台机lb2192.168.159.147keepalived......
  • docker 制作与使用 arcgisserver 镜像
    PS:有状态服务本身不适合部署到容器中,数据恢复比较困难,生产环境请直接安装到Linux服务器中1.准备内容在同级目录下,准备以下内容空的dockerfile文件:arcgisserver.dockerfilelinux版的ArcGISServer安装包:ArcGIS_Server_Linux_xxxxxx.tar.gzArcGISServer的许可文件:ArcGI......
  • 关于Sql server数据类型HierarchyID 数据类型用法和递归显示完整路径
    SQLServer2008版本之后的新类型HierarchyID不知道大家有没有了解,该类型作为取代id,parentid的一种解决方案,让人非常惊喜。官方给的案例浅显易懂,但是没有实现我想要的基本功能,树形结构中完整名称路径的展示。本文末尾是一个完整路径的样例,需要更多基本操作可以参考文末微软链......
  • SQL Server 因设置最大内存过小导致无法启动
    首先是    在服务器上发现SQLServer占用内存过大,128G服务器内存它占用高达100多G。于是就去找解决方案,找了几篇文章发现都是通过修改SQLServer服务器最大内存让其释放占用内存,如图所示,我把最大内存修改为128MB发现问题    然后我就发现我的SQLServer服务无......
  • 爆款游戏如何借助 RocketMQ Serverless,打造流畅体验并节省 98% 成本?
    作者:鼎岳、稚柳、勇猛、家泽一款游戏作品之所以能在市场上引爆热潮,铸就爆款传奇,除了独树一帜的创新设计理念、引人入胜的故事情节和丰富多样的玩法机制之外,最核心的要素就是为玩家提供极致流畅且无与伦比的游戏体验。这种体验涵盖了从游戏载入速度、画面帧率稳定性、操作响应灵敏......
  • Windows Server 各版本搭建终端服务器实现远程访问(03~19)
    一、WindowsServer2003左下角开始➡管理工具➡管理您的服务器,点击添加或删除角色点击下一步 勾选自定义,点击下一步蒂埃涅吉终端服务器,点击下一步 点击确定重新登录后点击确定点击开始➡管理工具➡计算机管理,展开本地用户和组,点击组可以发现有个组关门用来远程......
  • SqlServer函数大全三十八:DATEPART函数
    在SQLServer中,DATEPART 函数用于返回日期/时间值的指定部分的整数。与 DATENAME 函数不同,DATEPART 返回的是一个数字,而不是一个字符串。这对于需要进行数学计算或比较的场合特别有用。函数的语法如下:sql复制代码DATEPART(datepart,date)其中:datepart 是你想......
  • SqlServer函数大全三十九:CONVERT函数
    在SQLServer中,CONVERT 函数用于将一种数据类型转换为另一种数据类型。这在处理日期、时间、数字和其他数据类型时非常有用,尤其是当你需要确保数据以特定的格式或类型进行存储或显示时。函数的语法如下:sql复制代码CONVERT(data_type[(length)],expression[,style])......
  • SqlServer函数大全三十五:DATEDIFF(返回日期和时间的边界数)函数
    在SQLServer中,DATEDIFF 函数用于返回两个日期之间的边界数差异。这个函数可以计算两个日期之间的年、月、日、小时、分钟、秒或周数差异。DATEDIFF 函数的语法如下:sql复制代码DATEDIFF(datepart,startdate,enddate)datepart 是指定要返回日期部分的参数,比如......