2026-03-12 21:01:38
This commit is contained in:
103
zabbix/draft.txt
Normal file
103
zabbix/draft.txt
Normal file
@@ -0,0 +1,103 @@
|
||||
docker run -d \
|
||||
--name postgres \
|
||||
-e POSTGRES_PASSWORD=secret \
|
||||
-e PGDATA=/var/lib/postgresql/data/pgdata \
|
||||
-v /app/persistent_docker/postgres/data:/var/lib/postgresql/data \
|
||||
postgres
|
||||
|
||||
docker run -it --rm --network some-network postgres psql -h postgres -U postgres
|
||||
|
||||
select pid as process_id,
|
||||
usename as username,
|
||||
datname as database_name,
|
||||
client_addr as client_address,
|
||||
application_name,
|
||||
backend_start,
|
||||
state,
|
||||
state_change
|
||||
from pg_stat_activity;
|
||||
|
||||
|
||||
docker update --restart unless-stopped $(docker ps -q)
|
||||
|
||||
create database zabbix;
|
||||
CREATE ROLE zabbix LOGIN PASSWORD 'secret';
|
||||
ALTER DATABASE zabbix OWNER TO zabbix;
|
||||
|
||||
|
||||
docker run --name zabbix-server -p 10051:10051 -e DB_SERVER_HOST="socorro" -e DB_SERVER_PORT="5500" -e POSTGRES_USER="zabbix" -e POSTGRES_PASSWORD="secret" --init -d zabbix/zabbix-server-pgsql:latest
|
||||
|
||||
docker exec -ti zabbix-server /bin/bash
|
||||
docker exec -ti zabbix-agent /bin/bash
|
||||
|
||||
docker run --name zabbix-web-service -p 10053:10053 -e ZBX_ALLOWEDIP="socorro" --cap-add=SYS_ADMIN -d zabbix/zabbix-web-service:latest
|
||||
|
||||
docker run --name zabbix-web-nginx-pgsql -p 8080:8080 -p 8443:8443 -e DB_SERVER_HOST="socorro" -e DB_SERVER_PORT="5500" -e POSTGRES_USER="zabbix" -e POSTGRES_PASSWORD="secret" -e ZBX_SERVER_HOST="socorro" -d zabbix/zabbix-web-nginx-pgsql:latest
|
||||
|
||||
Default username/password is Admin/zabbix. It will pop up a wizard window which will guide you through the final configuration of the server.
|
||||
|
||||
docker run --name zabbix-agent -p 10050:10050 -e ZBX_HOSTNAME="socorro" -e ZBX_SERVER_HOST="socorro" --init -d zabbix/zabbix-agent:latest
|
||||
|
||||
|
||||
alias cclean='docker stop $(docker ps -a -q); docker rm $(docker ps -a -q)'
|
||||
alias listen='lsof -w -i -P | grep -i "listen"'
|
||||
|
||||
----------------------------------
|
||||
docker-compose.yaml
|
||||
|
||||
|
||||
version: '3.1'
|
||||
|
||||
services:
|
||||
|
||||
db:
|
||||
image: postgres:15.4
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_PASSWORD: secret
|
||||
PGDATA: /var/lib/postgresql/data/pgdata
|
||||
volumes:
|
||||
- /app/persistent_docker/postgres15/data:/var/lib/postgresql/data
|
||||
network_mode: "host"
|
||||
|
||||
|
||||
docker run --name zabbix-server -p 10051:10051 -e DB_SERVER_HOST="socorro" -e DB_SERVER_PORT="5500" -e POSTGRES_USER="zabbix" -e POSTGRES_PASSWORD="secret" --init -d zabbix/zabbix-server-pgsql:latest
|
||||
|
||||
docker run --name zabbix-server --network host -e DB_SERVER_HOST="socorro" -e DB_SERVER_PORT="5500" -e POSTGRES_USER="zabbix" -e POSTGRES_PASSWORD="secret" --init -d zabbix/zabbix-server-pgsql:latest
|
||||
|
||||
|
||||
docker run --name zabbix-agent -p 10050:10050 -e ZBX_HOSTNAME="socorro" -e ZBX_SERVER_HOST="socorro" --init -d zabbix/zabbix-agent:latest
|
||||
docker run --name zabbix-agent --network host -e ZBX_PASSIVESERVERS="0.0.0.0/0" -e ZBX_HOSTNAME="socorro" -e ZBX_SERVER_HOST="socorro" --init -d zabbix/zabbix-agent:latest
|
||||
|
||||
|
||||
docker run --name some-zabbix-agent -e ZBX_HOSTNAME="some-hostname" -e ZBX_SERVER_HOST="some-zabbix-server" --init -d zabbix/zabbix-agent2:tag
|
||||
docker run --name zabbix-agent -p 10050:10050 -e ZBX_HOSTNAME="socorro" -e ZBX_SERVER_HOST="socorro" --init -d zabbix/zabbix-agent2:latest
|
||||
docker run --name zabbix-agent --network host -e ZBX_PASSIVESERVERS="0.0.0.0/0" -e ZBX_HOSTNAME="socorro" -e ZBX_SERVER_HOST="socorro" --init -d zabbix/zabbix-agent2:latest
|
||||
|
||||
|
||||
docker run --name zabbix-web-nginx-pgsql -p 8080:8080 -p 8443:8443 -e DB_SERVER_HOST="socorro" -e DB_SERVER_PORT="5500" -e POSTGRES_USER="zabbix" -e POSTGRES_PASSWORD="secret" -e ZBX_SERVER_HOST="socorro" -d zabbix/zabbix-web-nginx-pgsql:latest
|
||||
|
||||
docker run --name zabbix-web-nginx-pgsql --network host -e DB_SERVER_HOST="socorro" -e DB_SERVER_PORT="5500" -e POSTGRES_USER="zabbix" -e POSTGRES_PASSWORD="secret" -e ZBX_SERVER_HOST="socorro" -d zabbix/zabbix-web-nginx-pgsql:latest
|
||||
|
||||
|
||||
|
||||
CREATE USER zbx_monitor WITH PASSWORD 'secret' INHERIT;
|
||||
GRANT pg_monitor TO zbx_monitor;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Plugins.Oracle.Sessions.ANDOPRD.Uri=tcp://togoria:1521
|
||||
Plugins.Oracle.Sessions.ANDOPRD.User=zabbix_mon
|
||||
Plugins.Oracle.Sessions.ANDOPRD.Password=secret
|
||||
Plugins.Oracle.Sessions.ANDOPRD.Service=ANDOPRD
|
||||
|
||||
|
||||
https://www.zabbix.com/download?zabbix=6.4&os_distribution=rocky_linux&os_version=8&components=agent_2&db=&ws=
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user