- ajout la modif de l adresse de zabbix
This commit is contained in:
parent
e3fb332cfa
commit
4777ce4f7b
|
|
@ -48,5 +48,6 @@ CONFIG_DEB_INSTALL_JSON='[
|
|||
{"id": "apparmor", "label": "Configurer AppArmor (Kernel)", "type": "sys", "params": "apparmor"},
|
||||
{"id": "fail2ban", "label": "Configurer Fail2Ban", "type": "sys", "params": "fail2ban"},
|
||||
{"id": "ufw", "label": "Configurer Firewall (UFW)", "type": "sys", "params": "ufw"},
|
||||
{"id": "zabbix_update", "label": "Configurer le client ZABBIX", "type": "sys", "params": "zabbix_update"},
|
||||
{"id": "ntp", "label": "Configurer Heure Française", "type": "sys", "params": "ntp"}
|
||||
]'
|
||||
|
|
|
|||
|
|
@ -58,6 +58,14 @@ check_deb_sys_zabbix(){
|
|||
fi
|
||||
}
|
||||
|
||||
check_deb_sys_zabbix_update(){
|
||||
if dpkg -s zabbix-agent >/dev/null 2>&1; then
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
check_deb_sys_msmtp(){
|
||||
return 1
|
||||
}
|
||||
|
|
@ -402,7 +410,18 @@ do_deb_sys_zabbix(){
|
|||
read -rp "IP Zabbix [${CONFIG_DEB_INSTALL_ZABBIX_SERVER_IP}]: " ip;
|
||||
ip=${ip:-${CONFIG_DEB_INSTALL_ZABBIX_SERVER_IP}}
|
||||
$SUDO apt-get install -y zabbix-agent;
|
||||
$SUDO sed -i "s/^Server=127.0.0.1/Server=$ip/" /etc/zabbix/zabbix_agentd.conf;
|
||||
$SUDO sed -i "s/^Server=.*/Server=$ip/" /etc/zabbix/zabbix_agentd.conf
|
||||
$SUDO sed -i "s/^ServerActive=.*/ServerActive=$ip/" /etc/zabbix/zabbix_agentd.conf
|
||||
$SUDO systemctl restart zabbix-agent
|
||||
msg_success "Zabbix agent configuré."
|
||||
}
|
||||
|
||||
check_deb_sys_zabbix_update(){
|
||||
local ip
|
||||
read -rp "IP Zabbix [${CONFIG_DEB_INSTALL_ZABBIX_SERVER_IP}]: " ip;
|
||||
ip=${ip:-${CONFIG_DEB_INSTALL_ZABBIX_SERVER_IP}}
|
||||
$SUDO sed -i "s/^Server=.*/Server=$ip/" /etc/zabbix/zabbix_agentd.conf
|
||||
$SUDO sed -i "s/^ServerActive=.*/ServerActive=$ip/" /etc/zabbix/zabbix_agentd.conf
|
||||
$SUDO systemctl restart zabbix-agent
|
||||
msg_success "Zabbix agent configuré."
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue