linux  projekt  zabbix

zabbix agent

Was Doku wegen PKS.

Encryption

openssl rand -hex 128

Linux by Zabbix agent

install zabbix-agent2

sudo sed -i 's/Server=127.0.0.1/Server=192.168.5.49/g' /etc/zabbix/zabbix_agent2.conf
sudo sed -i 's/Hostname=Zabbix server/Hostname=/g' /etc/zabbix/zabbix_agent2.conf
sudo sed -i 's/# TLSConnect=unencrypted/TLSConnect=psk/g' /etc/zabbix/zabbix_agent2.conf
sudo sed -i 's/# TLSAccept=unencrypted/TLSAccept=psk/g' /etc/zabbix/zabbix_agent2.conf
sudo sed -i 's/# TLSPSKIdentity=/TLSPSKIdentity=♯crypt♯/g' /etc/zabbix/zabbix_agent2.conf
sudo sed -i 's/# TLSPSKFile=/TLSPSKFile=\/etc\/zabbix\/psk/g' /etc/zabbix/zabbix_agent2.conf

sudo tee /etc/zabbix/psk <<'EOF'
♯crypt♯
EOF
sudo chown zabbix:zabbix /etc/zabbix/psk
sudo chmod 440 /etc/zabbix/psk

sudo systemctl restart zabbix-agent2

sudo ufw allow from 192.168.5.49 to any port 10050

Apache by Zabbix agent

Doku

sudo nano /etc/apache2/sites-available/000-default.conf
#oben einfügen

<VirtualHost 127.0.0.1:80>

    ServerName localhost
    ServerAdmin webmaster@localhost

    <Location /server-status>
        SetHandler server-status
        Require local
        Require ip 127.0.0.1
    </Location>

    ErrorLog ${APACHE_LOG_DIR}/localhost-status-error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/localhost-status-access.log combined

</VirtualHost>
sudo service apache2 restart

Falls in der htaccess eine Weiterleitung auf https ist, müsste /server-status ausgenommen werden. Dazu diese zweite Condition unter der https-Condition einfügen.

RewriteCond %{REQUEST_URI} !^/server-status

Docker by Zabbix agent 2

Doku

sudo usermod -aG docker zabbix
sudo systemctl restart zabbix-agent2
 linux   projekt   zabbix