Ad Widget

Collapse

Edit built in checks

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • damacneil
    Junior Member
    • Sep 2019
    • 1

    #1

    Edit built in checks

    We make use of the zabbix check for 'int.if.status[eth0]' which runs the following command on the zabbix_agent host (according to the logs):

    Code:
    EXECUTE_STR() command:'/sbin/ifconfig eth0 | /bin/grep -c " UP "' len:1 cmd_result:'0'
    This seems to be incompatible with the version of ifconfig on some recent distros including Amazon Linux 2 where the ouput of ifconfig would not be matched by the grep pattern:

    Code:
    ifconfig eth0
    eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9001
            inet 10.37.3.119  netmask 255.255.255.128  broadcast 10.37.3.127
            inet6 fe80::4f7:aeff:feaa:bfd4  prefixlen 64  scopeid 0x20<link>
            ether 06:f7:ae:aa:bf:d4  txqueuelen 1000  (Ethernet)
            RX packets 4932372  bytes 5383757478 (5.0 GiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 4869380  bytes 3945431884 (3.6 GiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    Is there some way by which I can modify this command so that it is compliant with the relevant ifconfig version that I have available on this distro?

    Many thanks
    David
Working...