Ad Widget

Collapse

PATCH: zabbix-1.1beta10_20060521_2243.patch

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fipu
    Junior Member
    • Apr 2006
    • 9

    #1

    PATCH: zabbix-1.1beta10_20060521_2243.patch

    hi

    this patch solves some problems i had with zabbix-1.1beta11.
    - email showed allways trigger ON, even if it was OFF
    - simple-check "tcp,192.168.1.140,4662" did not work

    added features:
    - added message substitutions {STATUS.EMOTICON} ON=:-( OFF=:-) and {STATUS.EMOTWORD} ON=OOPS OFF=Smile
    - added simple-check feature "script"

    sample script for "script,zabbix.contentcheck":
    Code:
    #! /bin/bash
    #--- /apps/zabbix/scripts/poller/zabbix.contentcheck / 27.5.2006 / fipu
    #--- Description: content check
    #--- Type: Simple Check
    #--- key: script,zabbix.contentcheck
    #--- Type of information: numeric (float)
    #--- units: s
    webpage="http://www.zabbix.com"
    content="Homepage of ZABBIX"
    t1=`date +%s%N`
    ret=`wget -t 0 --timeout=9 -q -O - "${webpage}"|grep -q "${content}" && echo 1 || echo 0`
    t2=`date +%s%N`
    perfseconds="`echo "${t1}:${t2}"|awk 'BEGIN { FS = ":" }{print sprintf("%.6f", (($2-$1)/1000000000))}'`"
    [ 0 -eq ${ret} ] && echo ${ret} || echo ${perfseconds}
    there is absolutely no warranty. you install the patch on your own risk.
    i hope, some of this work will be seen in the next release

    btw: apply the patch with the command:
    patch -p0 <zabbix-1.1beta11_20060525_1959.patch
    Attached Files
    Last edited by fipu; 27-05-2006, 11:22.
Working...