Ad Widget

Collapse

Monitoring Debian updates

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gertjan
    Junior Member
    • Sep 2022
    • 8

    #16
    Thanks Chaly !! i took the liberty of changing it a bit as we use unattended-upgrade to our Linux hosts and wanted to monitor this only if it fails. Also when you simulate the update request there is no need to install anything if you do a count (-c) on the available updates. The triggers in the template will alert if the unattended-upgrade process is longer present that the days configured, thats how you know the process is not working anymore. See below the details (change trigger accordingly):

    1. Activate the unattended-upgrade process and configure it with your needs (e.g. update security only and reboot at 02:00AM if needed)

    2. Install zabbix agent

    3. Create configuration file with the below UserParameters: sudo nano /etc/zabbix/zabbix_agent2.d/90-ubuntu-updates.conf

    UserParameter=ubuntu_updates.package,apt-get upgrade -s | grep -c ^Inst
    UserParameter=ubuntu_updates.security,apt-get upgrade -s | grep ^Inst | grep -c security

    4. Restart the zabbix agent: sudo systemctl restart zabbix-agent2

    Import template and assign to your server.
    Attached Files
    Last edited by Gertjan; 20-02-2023, 15:55.

    Comment


    • VolkerS
      VolkerS commented
      Editing a comment
      Thanks Gertjan, this works for me.
      Now I can see how many updates are missing. ooooops.

    • zab_zab
      zab_zab commented
      Editing a comment
      Do you have the template and user parameters I can use to get similar output for RPM Based systems? Centos, Alma, Rocky...etc
Working...