Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/AkuLink1/zabbix-template-apt-upgrade-monitoring
Zabbix template that monitors a host for package upgrades available in Debian / Ubuntu / "apt" package manager distros using apt-get upgrade -s (simulation mode).
https://github.com/AkuLink1/zabbix-template-apt-upgrade-monitoring
apt apt-get debian-linux ubuntu zabbix zabbix-agent zabbix-frontend zabbix-server zabbix-templates
Last synced: about 1 month ago
JSON representation
Zabbix template that monitors a host for package upgrades available in Debian / Ubuntu / "apt" package manager distros using apt-get upgrade -s (simulation mode).
- Host: GitHub
- URL: https://github.com/AkuLink1/zabbix-template-apt-upgrade-monitoring
- Owner: AkuLink1
- License: mit
- Created: 2022-05-23T16:21:20.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-19T13:50:29.000Z (8 months ago)
- Last Synced: 2024-10-30T18:42:37.455Z (about 1 month ago)
- Topics: apt, apt-get, debian-linux, ubuntu, zabbix, zabbix-agent, zabbix-frontend, zabbix-server, zabbix-templates
- Language: Shell
- Homepage:
- Size: 8.79 KB
- Stars: 9
- Watchers: 1
- Forks: 6
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-zabbix - zabbix-template-apt-upgrade-monitoring - Monitor available package upgrades on Debian & Ubuntu and other apt-based hosts. (Templates / Terraform)
README
# Zabbix Template to monitor available package upgrades in hosts
Zabbix template that monitors hosts for available package upgrades in Debian / Ubuntu / "apt" package manager distros.The script runs `apt-get update` to update source lists and then runs `apt-get upgrade -s` in simulation mode (no upgrade is executed). Data is then send to Zabbix server in various formats. A problem will be shown in the dashboard in case there is > 1 packages to update.
## Overview
Zabbix Server version: 6.0Sample output of `apt-get upgrade -s` from which we extract the info for the template:
The following packages have been kept back:
zabbix-frontend-php
The following packages will be upgraded:
zabbix-agent zabbix-apache-conf zabbix-server-mysql zabbix-sql-scripts
4 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.# Versions
This template was tested on:- Zabbix Server 6.0 (LTS)
- Zabbix Agent (daemon) 5.0.21
- Debian 11# Setup
## On Zabbix frontend server:
- Download and import either `server_template_check_apt_updates_templates.xml`, `server_template_check_apt_updates_templates.json` or `server_template_check_apt_updates_templates.yml` to Zabbix frontend.- Assign the Template Debian APT Updates to the host(s) you want to monitor
## On all hosts you want to monitor:
- Install packages zabbix-agent and zabbix-sender:`apt-get install zabbix-agent zabbix-sender`
- Copy content or download `apt_upgrade_agent_script.sh` script and move into host folder (Example): /etc/zabbix/custom_scripts
`wget https://github.com/Moluss/zabbix-template-apt-upgrade-monitoring/tree/main/agent_scripts`
- Grant exec permissions`sudo chmod +x /etc/zabbix/custom_scripts/apt_upgrade_agent_script`
- Add entry to crontab (`sudo crontab -e`) to execute the script periodically to check for updates and then check for possible upgrades and send data to Zabbix Server. This cron will run every 12 hours:
`0 */12 * * * sh /etc/zabbix/custom_scripts/apt_upgrade_agent_script.sh