Ad Widget

Collapse

integrate new Checks

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pdtec
    Junior Member
    • Jul 2007
    • 11

    #1

    integrate new Checks

    hello,
    i wrote some shell scripts to check a few things on another client machine where i can't install the zabbix_agent(d) (because it's no windows/linux/unix OS). so how can i integrate those checks into my zabbix_server??

    greets
  • mozzi
    Junior Member
    • Aug 2007
    • 27

    #2
    Hi

    I am struggeling with the same thing :-)
    I found this in zabbix_agent.conf and zabbix_agentd.conf
    UserParameter

    Now I want to do this:
    UserParameter=barracuda.latency,curl -s http://192.168.69.25:8000/cgi-bin/stats.cgi | egrep -e "latency" | sed s/[^0-9]//g

    But I can't see the info, and dunno where to find it.
    If you perhaps figure this out let me know too!

    Mozzi

    Comment

    • gryphius
      Member
      • Aug 2007
      • 30

      #3
      @pdtec: I think you are talking about external checks - see the latest zabbix manual chapter "5.11.7. External checks" on how to set those up

      @mozzi: you're talking about a different thing, UserParameters are on the agent side, not on the server side. I answered this (hopefully ) in your other thread though

      Comment

      • pdtec
        Junior Member
        • Jul 2007
        • 11

        #4
        first i want to thank you, i will try this next week

        greetz

        Comment

        • mozzi
          Junior Member
          • Aug 2007
          • 27

          #5
          who?

          If it is for the Userparameter there is a better post where I solved the problem :-)

          Mozzi

          Comment

          • pdtec
            Junior Member
            • Jul 2007
            • 11

            #6
            ok now i integrated my external check but no data is beeing monitored. i think this is because of taking about 30 seconds to finish the script. is it declared somewhere to wait several time on external check data??

            Comment

            • Calimero
              Senior Member
              • Nov 2006
              • 481

              #7
              What kind of monitoring did you setup in the end ?

              Agent + UserParameter ?
              custom script with zabbix_sender in crontab ?

              Comment

              • pdtec
                Junior Member
                • Jul 2007
                • 11

                #8
                i wrote my own snmp scripts like this:
                ************************************************** ***********************
                #! /bin/sh
                tmp_file=/etc/zabbix/3comtraffic/tmp/OutNUcastPktsPort$1.tmp
                tmp=`cat $tmp_file`
                rm /etc/zabbix/3comtraffic/tmp/OutNUcastPktsPort$1.tmp

                actual=`snmpwalk -v 2c -c public an.ip.adress ifOutNUcastPkts.$1 | gawk '{print $4}'`

                echo $actual >> $tmp_file

                echo $(expr $actual - $tmp)
                ************************************************** ***********************

                and this script i want to add in the zabbix-server

                ************************************************** ***********************
                #! /bin/sh
                i=1
                packets=0
                while [ $i -le 50 ]
                do
                a=`./transmitNUPkts.sh $i`
                b=`./transmitUPkts.sh $i`
                c=`./transmitOctets.sh $i`
                packets=`expr $packets + $a + $b + $c`
                i=`expr $i + 1`
                done

                echo $packets
                ************************************************** ***********************

                this script returns a number if i run it in shell - but the zabbix zerver sais no data

                Comment

                • pdtec
                  Junior Member
                  • Jul 2007
                  • 11

                  #9
                  i found my own solution:
                  i think my script takes a long time and is timed out from zabbix-server.
                  i run this script via cron every 5 minutes and write the data into a file. another simple script reads the data and give it to the zabbix server.

                  greetz

                  Comment

                  Working...