Ad Widget

Collapse

ICMP-Ping Check through Agent

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • T-One
    Junior Member
    • Jan 2011
    • 12

    #1

    ICMP-Ping Check through Agent

    Hello,

    is it possible to set up an item with an active ICMP Check through the Agent?
    I Have a cluster setup with a special interconnect line between two cluster nodes, those ips are just available through those two nodes and not pingable from the zabbix server but i should know if the connection between cluster1 and cluster2 over this interconnect-cable is available.

    Thanks in advance
  • dima_dm
    Senior Member
    • Dec 2009
    • 2697

    #2
    Yes. I use fping util.
    chown root.zabbix /etc/zabbix/fping
    chmod 6710 fping
    permissions:
    -rws--s--- 1 root zabbix 54759 Jul 9 14:59 fping

    In /etc/zabbix/zabbix_agentd.conf
    #fping
    UserParameter=myping[*],/etc/zabbix/fping -q $1;echo $?

    Comment

    • T-One
      Junior Member
      • Jan 2011
      • 12

      #3
      Whats the type of those UserParameters in the Zabbix Item frontend, are those active zabbix agent checks?
      I'm not sure how to utilize those UserParameter-Commands via the webfrontend...

      Comment

      • dima_dm
        Senior Member
        • Dec 2009
        • 2697

        #4
        You can use zabbix agent or zabbix agent active.
        Type: Numeric.
        key: myping[172.16.36.76]

        Comment

        • T-One
          Junior Member
          • Jan 2011
          • 12

          #5
          The ping works perfect, thank you.

          i assumed your discription to a simple script that checks the state of a service and want to run it the same way as the fping bin.

          The content of the script:

          Code:
          #!/bin/bash
          
          CHECK=`cat /proc/drbd | grep UpToDate/UpToDate | cut -d: -f5 | cut -c1-17`
          STRING_OK="UpToDate/UpToDate"
          
          
          if [ "$CHECK" == "$STRING_OK" ] ; then
          	# Is ok, returning 1
          	echo 1;
          else
          	# Not ok, returning 0
          	echo 0;
          fi
          It returns 1 if everything in DRBD is ok and 2 if there is a failure.

          I Just added this script in the zabbix_agentd.conf as following:

          Code:
          UserParameter=monitor.drbd,/etc/zabbix/monitor_drbd.sh
          But if i setup a item with key: "monitor.drbd" as type: "zabbix agent" and the information type to "Numeric" i just get a "Not Supported" error in the trigger overview of the running host.


          EDIT: Got it it was a user privilege error
          Last edited by T-One; 19-01-2011, 14:54.

          Comment

          • dima_dm
            Senior Member
            • Dec 2009
            • 2697

            #6
            Check Timeout for zabbix_agentd and zabbix_server
            /etc/zabbix/zabbix_agentd.conf
            Timeout=30
            /etc/zabbix/zabbix_server.conf
            Code:
            ### Option: Timeout
            #       Specifies how long we wait for agent, SNMP device or external check (in seconds).
            #
            # Mandatory: no
            # Range: 1-30
            # Default:
            Timeout=30
            restart zabbix_agentd and zabbix_server.
            You can see zabbix_agentd.log for detatil
            /etc/zabbix/zabbix_agentd.conf
            Code:
            # Specifies debug level
            # 0 - debug is not created
            # 1 - critical information
            # 2 - error information
            # 3 - warnings (default)
            # 4 - for debugging (produces lots of information)
            DebugLevel=4
            LogFile=/tmp/zabbix_agentd.log

            Comment

            • sahil_sethi
              Junior Member
              • Jul 2016
              • 1

              #7
              Graph of ping between two zabbix agents

              Hi, I need graphical output of ping b/w 2 zabbix hosts, I tried UserParameter=myping[*],/etc/zabbix/fping -q $1;echo $? with proper file permissions and created Item as attached in screenshot but my Item is going not supported

              Please help
              Attached Files

              Comment

              Working...