zabbix_server: update zabbix_server configuration

Update zabbix-agentd.conf
Update vars
Disable cron

Signed-off-by: David Kirwan <dkirwan@redhat.com>
This commit is contained in:
David Kirwan 2023-07-04 11:22:09 +01:00
parent 10e6a1d2e9
commit 91c1a8cafc
8 changed files with 37 additions and 28 deletions

View file

@ -1,8 +1,10 @@
# Defaults variables for role zabbix-agent
zabbix_server: zabbix01.stg.iad2.fedoraproject.org
zabbix_server: "zabbix01{{env_suffix}}.iad2.fedoraproject.org"
zabbix_agent_hostname: "{{ ansible_hostname }}"
# TLS/PSK settings to encrypt between agent and proxy/server
zabbix_agent_tls: False
zabbix_agent_tls_psk: # gen with `openssl rand -hex 32` and also known by zabbix server
zabbix_agent_tls_psk_identity: # Whatever makes sense to you and known by zabbix server
zabbix_tls_connect: "psk"
zabbix_tls_accept: "psk"
zabbix_tls_psk_identity: "Fedora" # OVERRIDEME
zabbix_tls_psk_file: "/etc/zabbix/fedora.psk" # `openssl rand -hex 32` Overridden in ansible private repo

View file

@ -16,6 +16,7 @@
minute: "*/30"
job: "/usr/lib/zabbix/{{ item }}"
user: root
state: absent
with_items:
- zabbix-hw-raid-check.sh
- zabbix-mdstat-check.sh

View file

@ -1,19 +1,13 @@
PidFile=/var/run/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix/zabbix_agentd.log
LogFileSize=1
Hostname={{ inventory_hostname }}
Server={{ zabbix_server }}
ServerActive={{ zabbix_server }}
PidFile=/var/run/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix/zabbix_agentd.log
LogFileSize=10
EnableRemoteCommands=0
Include=/etc/zabbix/zabbix_agentd.d/
RefreshActiveChecks=180
BufferSend=5
BufferSize=100
{% if zabbix_agent_tls %}
# Settings for TLS/PSK between agent and proxy/server
TLSAccept=psk
TLSConnect=psk
TLSPSKIdentity={{ zabbix_agent_tls_psk_identity }}
TLSPSKFile=/etc/zabbix/zabbix_agent.psk
{% endif %}
ListenPort=10050
StartAgents=3
Include=/etc/zabbix/zabbix_agentd.d/*.conf
TLSConnect={{ zabbix_tls_connect }}
TLSAccept=psk{{ zabbix_tls_accept }}
TLSPSKIdentity={{ zabbix_tls_psk_identity }}
TLSPSKFile=/etc/zabbix/fedora.psk

View file

@ -0,0 +1,12 @@
pkgs_list:
- policycoreutils-python-utils
zabbix_pkgs_list:
- zabbix-agent
- zabbix-sender
- bc
- ncurses-compat-libs # Needed for some megacli tools and raid monitoring checks through zabbix_sender
zabbix_agentd: /etc/zabbix/zabbix_agentd.conf
zabbix_agentd_dir: /etc/zabbix/zabbix_agentd.d

View file

@ -8,6 +8,6 @@ zabbix_pkgs_list:
- bc
- ncurses-compat-libs # Needed for some megacli tools and raid monitoring checks through zabbix_sender
zabbix_agentd: /etc/zabbix/zabbix_agentd.conf
zabbix_agentd: /etc/zabbix_agentd.conf
zabbix_agentd_dir: /etc/zabbix/zabbix_agentd.d
zabbix_agentd_dir: /etc/zabbix/zabbix_agentd.d

View file

@ -0,0 +1 @@
CentOS-9.yml

View file

@ -511,8 +511,7 @@ SNMPTrapperFile=/var/log/snmptrap/snmptrap.log
# Range: 1-30
# Default:
# Timeout=3
Timeout=4
Timeout=30
### Option: TrapperTimeout
# Specifies how many seconds trapper may spend processing new data.
@ -520,7 +519,7 @@ Timeout=4
# Mandatory: no
# Range: 1-300
# Default:
# TrapperTimeout=300
TrapperTimeout=300
### Option: UnreachablePeriod
# After how many seconds of unreachability treat a host as unavailable.
@ -528,7 +527,7 @@ Timeout=4
# Mandatory: no
# Range: 1-3600
# Default:
# UnreachablePeriod=45
UnreachablePeriod=45
### Option: UnavailableDelay
# How often host is checked for availability during the unavailability period, in seconds.
@ -536,7 +535,7 @@ Timeout=4
# Mandatory: no
# Range: 1-3600
# Default:
# UnavailableDelay=60
UnavailableDelay=60
### Option: UnreachableDelay
# How often host is checked for availability during the unreachability period, in seconds.
@ -544,7 +543,7 @@ Timeout=4
# Mandatory: no
# Range: 1-3600
# Default:
# UnreachableDelay=15
UnreachableDelay=15
### Option: AlertScriptsPath
# Full path to location of custom alert scripts.