Ad Widget

Collapse

Zabbify project on github

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • alledm
    Member
    • May 2012
    • 84

    #1

    Zabbify project on github

    Hello,

    I have developed a little script to integrate (mainly) crontab scripts into Zabbix.
    It basically helps detecting scripts that fail silently and could potentially allow you to remove hundreds of emails from your mailbox

    This is an example of how it can be used.


    Code:
    crontab -l
    00 05 * * * zabbify "/usr/bin/mysqldump --databases zabbix --single-transaction | /bin/gzip > /opt/backups/mysql/zabbix/zabbix.sql.gz"
    The script will report on the exit status and output back to Zabbix, and raise a trigger if the exit is non 0.

    Obviuosly you can add more triggers attached to exit status and output.


    You will find the script here



    It is written in python and uses zabbix_api and zbxsend.
    Should work in Python > 2.6

    Please feel free to give me your feedback/suggestions.
    Last edited by alledm; 03-01-2013, 09:35.
  • alledm
    Member
    • May 2012
    • 84

    #2
    Hi,

    although nobody seems to be using it , I wanted to let you know that I have improved the zabbify script.

    It now allows you to set a timeout (in seconds) for a process, and will trigger a notification if the timeout is breached.

    Example:
    Code:
    0 * * * * zabbify --timeout 60 /usr/bin/script_that_might_hang.sh
    Hope this helps. Please let me know if you use it or if you can think of any other way to improve it.

    Regards

    Comment

    • crashdump
      Junior Member
      • Jun 2013
      • 2

      #3
      Nice idea, thank you for sharing !

      Comment

      Working...