GithubHelp home page GithubHelp logo

danielabelski / zabbix-whois-expiry Goto Github PK

View Code? Open in Web Editor NEW

This project forked from okand/zabbix-whois-expiry

0.0 0.0 0.0 9 KB

Monitor expiration dates for domains and get notified when they're about to expire

License: Other

Python 100.00%

zabbix-whois-expiry's Introduction

Zabbix whois expiry auto-discovery and check

Requirements

  • Python 3
  • pip3 install py-zabbix python-whois

Known issues

.no domains are broken since python-whois just returns a bunch of nulls.

Description

This Zabbix template and associated scripts will automatically create and monitor items and triggers for domain expiry.

It uses trapper items so the scheduling is handled entirely independently from Zabbix Server and can run from anywhere as long as it is able to send values to Zabbix Server.

If zabbix_sender works for a host then this script should too. The py-zabbix module uses the configuration file for zabbix_agent to figure out where to send the trapper items to and such. That means the ServerActive=-parameter in zabbix_agentd.conf is used to figure out where to send the item.

The default is ServerActive=127.0.0.1 so this should work without any config changes needed if you run it directly on your zabbix server.

zabbix_sender manpage: https://www.zabbix.com/documentation/3.4/manpages/zabbix_sender

Installation

Put the scripts on the host you want to perform the whois-checks from. Remember that you need Python 3 and to install the modules mentioned further up the readme.

In the same folder as the scripts, create a folder called whois and create a json-file containing the domains you want to check. There's an example included in this repo. Make sure you name the file the same as the hostname in Zabbix because it is used as an argument by the scripts both to pick which json-file to read domains from and which host the data belongs to when sent to the Zabbix server.

Add the Zabbix template to the host and schedule both the discovery and check scripts to run every day or however often you think is approperiate.

Example with cron:


20 12 * * * zabbix-whois-discovery.py example.host.name
30 12 * * * zabbix-whois-check.py example.host.name

Adding domains to existing host

Just add more domains to the approperiate json-files and either run the scripts manually or wait for the cronjob.

zabbix-whois-expiry's People

Contributors

0fca avatar okand avatar

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.