Giter Club home page Giter Club logo

zabbix-template-yum-update-monitoring's Introduction

Zabbix Template to monitor available package updates from yum in hosts

Zabbix template that monitors a host for package upgrades available in RHEL / CentOS / yum package manager distros using yum check-update command

Overview

Zabbix Server version: 6.0

Agent must be running active mode, ServerActive must have a value.

Sample output of yum check-update from which we extract the info for the template:

ImageMagick6-libs.x86_64                                                            6.9.12.50-1.el7.remi                                                        remi-safe
grub2.x86_64                                                                        1:2.02-0.87.el7.9                                                           updates
gzip.x86_64                                                                         1.5-11.el7_9                                                                updates
kernel.x86_64                                                                       3.10.0-1160.66.1.el7                                                        updates
kernel-headers.x86_64                                                               3.10.0-1160.66.1.el7                                                        updates
zlib.x86_64                                                                         1.2.7-20.el7_9                                                              updates

Versions

This template was tested on:

  • Zabbix Server 6.0 (LTS)
  • Zabbix Agent (daemon) 5.0.21
  • CentOS 7

Setup

On Zabbix frontend server:

  • Download and import one of these files (only difference between files is format): server_template_check_yum_updates_template.xml, server_template_check_yum_updates_template.json, server_template_check_yum_updates_template.yml to Zabbix frontend.

  • Assign the Template Yum Check-Update Monitor to the host(s) you want to monitor

On all hosts you want to monitor:

  • Install packages zabbix-agent and zabbix-sender (if not installed):

    apt-get install zabbix-agent zabbix-sender

  • Copy or wget agent_scripts/apt_upgrade_agent_script.sh from this repo into host folder (example): /etc/zabbix/custom_scripts

  • Grant exec permissions (sudo chmod +x)

  • Add entry to crontab (sudo crontab -e) to execute the script periodically, check for possible upgrades and send to Zabbix Server. This cron will run every 12 hours:

    0 */12 * * * sh /etc/zabbix/custom_scripts/yum_update_agent_script.sh

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.