Ajout role Zabbix-cli + ajout des agents dans les srv
This commit is contained in:
parent
92c6b3eb89
commit
fb900be1e4
14
roles/zabbix-cli/README.md
Normal file
14
roles/zabbix-cli/README.md
Normal file
@ -0,0 +1,14 @@
|
||||
# Rôle nagios
|
||||
***
|
||||
Rôle Nagios pour la supervision des différentes machines
|
||||
|
||||
## Tables des matières
|
||||
1. [Que fait le rôle Zabbix ?]
|
||||
|
||||
|
||||
## Que fait le rôle Nagios ?
|
||||
Il permet de configurer les agents zabbix en active.
|
||||
|
||||
### Installation et configuration de Zabbix-agent
|
||||
|
||||
Le rôle Zabbix-cli va installer zabbix-agent pour les serveurs, zabbix-agent pour superviser, zabbix-agent sera notre outil de supervision côté serveurs.
|
12
roles/zabbix-cli/handlers/main.yml
Normal file
12
roles/zabbix-cli/handlers/main.yml
Normal file
@ -0,0 +1,12 @@
|
||||
- name: config
|
||||
template:
|
||||
src: zabbix_agentd.conf.temp
|
||||
dest: /etc/zabbix/zabbix_agentd.conf
|
||||
vars:
|
||||
PidFile: /run/zabbix/zabbix_agentd.pid
|
||||
LogFile: /var/log/zabbix/zabbix_agentd.log
|
||||
LogFileSize: 0
|
||||
Server: 127.0.0.1
|
||||
ServerActive: 192.168.99.106
|
||||
Hostname: "{{ ansible_hostname }}"
|
||||
Include: /etc/zabbix/zabbix_agentd.d/*.conf
|
29
roles/zabbix-cli/tasks/main.yml
Normal file
29
roles/zabbix-cli/tasks/main.yml
Normal file
@ -0,0 +1,29 @@
|
||||
- name: Intallation paquet zabbix agent
|
||||
get_url:
|
||||
url: "https://repo.zabbix.com/zabbix/6.4/debian/pool/main/z/zabbix-release/zabbix-release_6.4-1+debian12_all.deb"
|
||||
dest: "/tmp/zabbix-release_6.4-1+debian12_all.deb"
|
||||
|
||||
- name: Intallation paquet zabbix agent suite
|
||||
apt:
|
||||
deb: "/tmp/zabbix-release_6.4-1+debian12_all.deb"
|
||||
state: present
|
||||
|
||||
- name: Update apt
|
||||
apt:
|
||||
update_cache: yes
|
||||
|
||||
- name: Intallation Zabbix agent
|
||||
apt:
|
||||
name: zabbix-agent
|
||||
state: present
|
||||
|
||||
- name: Enable Zabbix agent service
|
||||
systemd:
|
||||
name: zabbix-agent
|
||||
enabled: yes
|
||||
|
||||
- name: Rm package
|
||||
file:
|
||||
path: "/tmp/zabbix-release_6.4-1+debian12_all.deb"
|
||||
state: absent
|
||||
|
7
roles/zabbix-cli/templates/zabbix_agentd.conf.temp
Normal file
7
roles/zabbix-cli/templates/zabbix_agentd.conf.temp
Normal file
@ -0,0 +1,7 @@
|
||||
PidFile={{ PidFile }}
|
||||
LogFile={{ LogFile }}
|
||||
LogFileSize={{ LogFileSize }}
|
||||
Server={{ Server }}
|
||||
ServerActive={{ ServerActive }}
|
||||
Hostname={{ Hostname }}
|
||||
Include={{ Include }}
|
@ -8,7 +8,7 @@
|
||||
- dnsmasq
|
||||
- squid
|
||||
# - local-store
|
||||
- snmp-agent
|
||||
- zabbix-cli
|
||||
## - syslog-cli
|
||||
- post
|
||||
# - goss
|
||||
|
@ -8,7 +8,7 @@
|
||||
- appli
|
||||
- ssh-cli
|
||||
# - syslog-cli
|
||||
- snmp-agent
|
||||
- zabbix-cli
|
||||
- ssl-apache
|
||||
- post
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
- base
|
||||
- goss
|
||||
# - proxy3
|
||||
- snmp-agent
|
||||
- zabbix-cli
|
||||
# - ssh-cli
|
||||
# - syslog-cli
|
||||
- smb-backup
|
||||
|
@ -7,7 +7,7 @@
|
||||
- goss
|
||||
- dns-master
|
||||
- webautoconf
|
||||
- snmp-agent
|
||||
- zabbix-cli
|
||||
- journald-snd
|
||||
- ssh-cli
|
||||
- post
|
||||
|
@ -13,7 +13,7 @@
|
||||
roles:
|
||||
- base
|
||||
- goss
|
||||
- snmp-agent
|
||||
- zabbix-cli
|
||||
- glpi
|
||||
- ssh-cli
|
||||
# - syslog-cli
|
||||
|
@ -6,7 +6,7 @@
|
||||
- base
|
||||
- goss
|
||||
- squid
|
||||
- snmp-agent
|
||||
- zabbix-cli
|
||||
- ssh-cli
|
||||
# - syslog-cli
|
||||
- post
|
||||
|
Loading…
x
Reference in New Issue
Block a user