mirror of
https://gitlab.sectorq.eu/home/docker-compose.git
synced 2025-12-14 18:34:53 +01:00
build
This commit is contained in:
2
__swarm/zabbix-server/.env
Executable file
2
__swarm/zabbix-server/.env
Executable file
@@ -0,0 +1,2 @@
|
||||
APPNAME=zabbix
|
||||
#RESTART=always
|
||||
98
__swarm/zabbix-server/docker-compose.yml
Executable file
98
__swarm/zabbix-server/docker-compose.yml
Executable file
@@ -0,0 +1,98 @@
|
||||
networks:
|
||||
zabbix:
|
||||
driver: bridge
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.89.0/28
|
||||
driver: default
|
||||
services:
|
||||
db-server:
|
||||
env_file:
|
||||
- stack.env
|
||||
image: ${DOCKER_REGISTRY:-}postgres:16-alpine
|
||||
labels:
|
||||
com.centurylinklabs.watchtower.enable: true
|
||||
networks:
|
||||
zabbix:
|
||||
ipv4_address: 192.168.89.4
|
||||
|
||||
ports:
|
||||
- 5432:5432
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /share/docker_data/zabbix-server/postgres-data:/var/lib/postgresql/data
|
||||
zabbix-frontend:
|
||||
depends_on:
|
||||
- db-server
|
||||
env_file:
|
||||
- stack.env
|
||||
image: ${DOCKER_REGISTRY:-}zabbix/zabbix-web-nginx-pgsql:alpine-latest
|
||||
labels:
|
||||
com.centurylinklabs.watchtower.enable: true
|
||||
wud.watch: true
|
||||
wud.watch.digest: true
|
||||
networks:
|
||||
zabbix:
|
||||
ipv4_address: 192.168.89.3
|
||||
ports:
|
||||
- 8051:8080
|
||||
- 4435:8443
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /share/docker_data/zabbix-server/frontend/certs:/usr/share/zabbix/conf/certs
|
||||
zabbix-server:
|
||||
depends_on:
|
||||
- db-server
|
||||
env_file:
|
||||
- stack.env
|
||||
extends:
|
||||
file: logging.yml
|
||||
service: ${LOGGING:-syslog}
|
||||
image: ${DOCKER_REGISTRY:-}zabbix/zabbix-server-pgsql:alpine-latest
|
||||
volumes:
|
||||
- /share/docker_data/zabbix-server/server/alertscripts:/usr/lib/zabbix/alertscripts
|
||||
labels:
|
||||
com.centurylinklabs.watchtower.enable: 'true'
|
||||
homepage.container: zabbix-server-zabbix-server-1
|
||||
homepage.description: Monitoring server
|
||||
homepage.group: Utilities
|
||||
homepage.href: https://${APPNAME}.sectorq.eu
|
||||
homepage.icon: ${APPNAME}.png
|
||||
homepage.name: Zabbix Server
|
||||
homepage.server: my-docker
|
||||
homepage.weight: '90'
|
||||
homepage.widget.key: 431bda3fbb45a9d603c1b74d57c3a61df1e07124c5c7119cb6379194d5555822
|
||||
homepage.widget.type: ${APPNAME}
|
||||
homepage.widget.url: https://${APPNAME}.sectorq.eu
|
||||
wud.watch: true
|
||||
wud.watch.digest: true
|
||||
networks:
|
||||
zabbix:
|
||||
ipv4_address: 192.168.89.2
|
||||
ports:
|
||||
- 10051:10051
|
||||
restart: unless-stopped
|
||||
webdriver:
|
||||
ports:
|
||||
- 4444:4444
|
||||
- 7900:7900
|
||||
shm_size: "2g"
|
||||
restart: always
|
||||
image: ${DOCKER_REGISTRY:-}docker.io/selenium/standalone-chrome:latest
|
||||
labels:
|
||||
wud.watch: true
|
||||
wud.watch.digest: true
|
||||
postinstall:
|
||||
image: debian:12-slim
|
||||
depends_on:
|
||||
zabbix-server:
|
||||
condition: service_started
|
||||
environment:
|
||||
- PUID=0
|
||||
- PGID=0
|
||||
volumes:
|
||||
- /usr/bin:/usr/bin # mount whole directory
|
||||
- /usr/lib:/usr/lib
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /share/docker_data/zabbix-server/scripts:/scripts
|
||||
entrypoint: ["/bin/sh", "/scripts/install-curl.sh"]
|
||||
14
__swarm/zabbix-server/logging.yml
Executable file
14
__swarm/zabbix-server/logging.yml
Executable file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
services:
|
||||
syslog:
|
||||
logging:
|
||||
driver: syslog
|
||||
options:
|
||||
tag: zabbix-server
|
||||
|
||||
loki:
|
||||
logging:
|
||||
driver: loki
|
||||
options:
|
||||
loki-url: "http://192.168.77.101:3100/loki/api/v1/push"
|
||||
|
||||
131
__swarm/zabbix-server/stack.env
Executable file
131
__swarm/zabbix-server/stack.env
Executable file
@@ -0,0 +1,131 @@
|
||||
# Zabbix global
|
||||
# ZBX_DEBUGLEVEL=3
|
||||
|
||||
# Database
|
||||
MYSQL_PASSWORD=zabbix
|
||||
MYSQL_USER=zabbix
|
||||
MYSQL_ROOT_PASSWORD=rootpwd
|
||||
|
||||
POSTGRES_PASSWORD=zabbix
|
||||
POSTGRES_USER=zabbix
|
||||
POSTGRES_DB=zabbix
|
||||
|
||||
# Zabbix server
|
||||
# all env variables https://hub.docker.com/r/zabbix/zabbix-server-mysql
|
||||
DB_SERVER_HOST=db-server
|
||||
ZBX_SERVER_HOST=zabbix-server
|
||||
ZBX_SERVER_VERSION=7.4
|
||||
# Zabbix frontend
|
||||
# all env variable https://hub.docker.com/r/zabbix/zabbix-web-nginx-mysql
|
||||
ZBX_SSO_SP_KEY=/usr/share/zabbix/conf/certs/sp.key
|
||||
ZBX_SSO_SP_CERT=/usr/share/zabbix/conf/certs/sp.crt
|
||||
ZBX_SSO_IDP_CERT=/usr/share/zabbix/conf/certs/idp.crt
|
||||
ZBX_SSO_SETTINGS={"strict":false, "baseurl":"https://zabbix.sectorq.eu/", "use_proxy_headers":true, "security":{"requestedAuthnContext":"false"}}
|
||||
### Zabbix agent ###
|
||||
# all env variable https://hub.docker.com/r/zabbix/zabbix-agent2
|
||||
ZBX_AGENT_VERSION=7.0
|
||||
ZBX_WEBSERVICEURL=https://zabbix.sectorq.eu
|
||||
ZBX_NODEADDRESS=zabbix-server
|
||||
ZBX_NODEADDRESSPORT=10051
|
||||
ZBX_STARTVMWARECOLLECTORS=2
|
||||
ZBX_STARTCONNECTORS=1
|
||||
|
||||
|
||||
|
||||
# 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_VAULTPREFIX= # Available since 7.0.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_ENABLEGLOBALSCRIPTS=0 # Available since 7.0.0
|
||||
# ZBX_STARTPOLLERS=5
|
||||
# ZBX_STARTIPMIPOLLERS=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_SMSDEVICES=
|
||||
# ZBX_HOUSEKEEPINGFREQUENCY=1
|
||||
# ZBX_MAXHOUSEKEEPERDELETE=5000
|
||||
# ZBX_PROBLEMHOUSEKEEPINGFREQUENCY=60 # Available since 6.0.0
|
||||
# ZBX_SENDERFREQUENCY=30 # Depcrecated since 3.4.0
|
||||
ZBX_CACHESIZE=64M
|
||||
# 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_TLSLISTEN= # Available since 7.4.0
|
||||
# ZBX_TLSCAFILE=
|
||||
# ZBX_TLSCA=
|
||||
# ZBX_TLSCRLFILE=
|
||||
# ZBX_TLSCRL=
|
||||
# ZBX_TLSCERTFILE=
|
||||
# ZBX_TLSCERT=
|
||||
# ZBX_TLSKEYFILE=
|
||||
# ZBX_TLSKEY=
|
||||
# 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
|
||||
# ZBX_TLS_FRONTENDACCEPT= # Available since 7.4.0
|
||||
# ZBX_FRONTENDALLOWEDIP= # Available since 7.4.0
|
||||
# ZBX_TLSFRONTENDCERTISSUER= # Available since 7.4.0
|
||||
# ZBX_TLSFRONTENDCERTSUBJECT= # Available since 7.4.0
|
||||
ZBX_WEBDRIVERURL=192.168.77.101:4444 # Available since 7.0.0
|
||||
ZBX_STARTBROWSERPOLLERS=5 # Available since 7.0.0
|
||||
# ZBX_STARTSNMPPOLLERS=1 # Available since 7.0.0
|
||||
27
__swarm/zabbix-server/webscenario.js
Normal file
27
__swarm/zabbix-server/webscenario.js
Normal file
@@ -0,0 +1,27 @@
|
||||
var browser, result;
|
||||
var opts = Browser.chromeOptions();
|
||||
opts.capabilities.alwaysMatch['goog:chromeOptions'].args = []
|
||||
browser = new Browser(opts);
|
||||
browser.setScreenSize(Number(1980), Number(1020));
|
||||
|
||||
screens = [];
|
||||
const screenshot = '';
|
||||
const res_value = '';
|
||||
try {
|
||||
var params = JSON.parse(value); // Parse the JSON string containing parameters passed from Zabbix.
|
||||
browser.navigate(params.url);
|
||||
browser.collectPerfEntries();
|
||||
result = browser.getResult();
|
||||
//result.screenshot = browser.getScreenshot();
|
||||
return JSON.stringify(result);
|
||||
}
|
||||
catch (err) {
|
||||
if (!(err instanceof BrowserError)) {
|
||||
browser.setError(err.message);
|
||||
}
|
||||
|
||||
browser.collectPerfEntries();
|
||||
result = browser.getResult();
|
||||
//result.screenshot = browser.getScreenshot();
|
||||
return JSON.stringify(result);
|
||||
}
|
||||
Reference in New Issue
Block a user