feat: switch to zabbix-agent2
This commit is contained in:
parent
dfa2c96b6a
commit
4cefae2b7d
18
zabbix-debian-playground/Vagrantfile
vendored
18
zabbix-debian-playground/Vagrantfile
vendored
@ -24,7 +24,7 @@ Vagrant.configure("2") do |config|
|
|||||||
curl -o /tmp/zabbix_6.0.deb https://repo.zabbix.com/zabbix/6.0/debian/pool/main/z/zabbix-release/zabbix-release_6.0-4%2Bdebian11_all.deb
|
curl -o /tmp/zabbix_6.0.deb https://repo.zabbix.com/zabbix/6.0/debian/pool/main/z/zabbix-release/zabbix-release_6.0-4%2Bdebian11_all.deb
|
||||||
dpkg -i /tmp/zabbix_6.0.deb
|
dpkg -i /tmp/zabbix_6.0.deb
|
||||||
apt update -y
|
apt update -y
|
||||||
apt install -y zabbix-server-mysql zabbix-frontend-php zabbix-nginx-conf zabbix-sql-scripts zabbix-agent mariadb-server mariadb-client nginx
|
apt install -y zabbix-server-mysql zabbix-frontend-php zabbix-nginx-conf zabbix-sql-scripts zabbix-agent2 mariadb-server mariadb-client nginx
|
||||||
systemctl enable --now mysql
|
systemctl enable --now mysql
|
||||||
mysql -uroot -e 'create database zabbix character set utf8mb4 collate utf8mb4_bin'
|
mysql -uroot -e 'create database zabbix character set utf8mb4 collate utf8mb4_bin'
|
||||||
mysql -uroot -e 'create user zabbix@localhost identified by "eattherich"'
|
mysql -uroot -e 'create user zabbix@localhost identified by "eattherich"'
|
||||||
@ -35,8 +35,8 @@ Vagrant.configure("2") do |config|
|
|||||||
echo 'DBPassword=eattherich' >> /etc/zabbix/zabbix_server.conf
|
echo 'DBPassword=eattherich' >> /etc/zabbix/zabbix_server.conf
|
||||||
sed -i 's/#//g' /etc/zabbix/nginx.conf
|
sed -i 's/#//g' /etc/zabbix/nginx.conf
|
||||||
sed -i 's/example.com/zabbix.local/g' /etc/zabbix/nginx.conf
|
sed -i 's/example.com/zabbix.local/g' /etc/zabbix/nginx.conf
|
||||||
systemctl restart zabbix-server zabbix-agent nginx php7.4-fpm
|
systemctl restart zabbix-server zabbix-agent2 nginx php7.4-fpm
|
||||||
systemctl enable zabbix-server zabbix-agent nginx php7.4-fpm
|
systemctl enable zabbix-server zabbix-agent2 nginx php7.4-fpm
|
||||||
reboot
|
reboot
|
||||||
SHELL
|
SHELL
|
||||||
end
|
end
|
||||||
@ -56,7 +56,7 @@ Vagrant.configure("2") do |config|
|
|||||||
curl -o /tmp/zabbix_6.0.deb https://repo.zabbix.com/zabbix/6.0/debian/pool/main/z/zabbix-release/zabbix-release_6.0-4%2Bdebian11_all.deb
|
curl -o /tmp/zabbix_6.0.deb https://repo.zabbix.com/zabbix/6.0/debian/pool/main/z/zabbix-release/zabbix-release_6.0-4%2Bdebian11_all.deb
|
||||||
dpkg -i /tmp/zabbix_6.0.deb
|
dpkg -i /tmp/zabbix_6.0.deb
|
||||||
apt update -y
|
apt update -y
|
||||||
apt install -y zabbix-agent
|
apt install -y zabbix-agent2
|
||||||
apt install -y ca-certificates curl gnupg lsb-release
|
apt install -y ca-certificates curl gnupg lsb-release
|
||||||
mkdir -p /etc/apt/keyrings
|
mkdir -p /etc/apt/keyrings
|
||||||
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
||||||
@ -66,9 +66,9 @@ Vagrant.configure("2") do |config|
|
|||||||
apt update
|
apt update
|
||||||
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
|
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
|
||||||
systemctl enable --now containerd docker
|
systemctl enable --now containerd docker
|
||||||
sed -i 's/ServerActive=127.0.0.1/ServerActive=192.168.56.2/g' /etc/zabbix/zabbix_agentd.conf
|
sed -i 's/ServerActive=127.0.0.1/ServerActive=192.168.56.2/g' /etc/zabbix/zabbix_agent2.conf
|
||||||
sed -i 's/Hostname=Zabbix server/Hostname=docker/g' /etc/zabbix/zabbix_agentd.conf
|
sed -i 's/Hostname=Zabbix server/Hostname=docker/g' /etc/zabbix/zabbix_agent2.conf
|
||||||
systemctl restart zabbix-agent
|
systemctl restart zabbix-agent2
|
||||||
SHELL
|
SHELL
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -82,8 +82,8 @@ Vagrant.configure("2") do |config|
|
|||||||
end
|
end
|
||||||
windows.vm.provision "shell", inline: <<-SHELL
|
windows.vm.provision "shell", inline: <<-SHELL
|
||||||
$WebClient = New-Object System.Net.WebClient
|
$WebClient = New-Object System.Net.WebClient
|
||||||
$WebClient.DownloadFile("https://cdn.zabbix.com/zabbix/binaries/stable/6.0/6.0.9/zabbix_agent-6.0.9-windows-amd64-openssl.msi","C:\zabbix\zabbix-agent\zabbix-agent.msi")
|
$WebClient.DownloadFile("https://cdn.zabbix.com/zabbix/binaries/stable/6.0/6.0.9/zabbix_agent2-6.0.9-windows-amd64-openssl.msi","C:\zabbix\zabbix-agent\zabbix-agent2.msi")
|
||||||
Start-Process msiexec.exe -Wait -ArgumentList '/I C:\installers\SQLIO.msi\zabbix-agent.msi /quiet'
|
Start-Process msiexec.exe -Wait -ArgumentList '/I C:\installers\SQLIO.msi\zabbix-agent2.msi /quiet'
|
||||||
SHELL
|
SHELL
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user