Ad Widget

Collapse

Monitoring public IPs using remote server with agent

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • aseques
    Member
    • May 2019
    • 40

    #1

    Monitoring public IPs using remote server with agent

    I just implemented a solution to monitor the various gateways I have using a linux server I have in a remote location. It works but I'd like some tips for improvement. Basically the idea came from this page that uses the agent to ping a host and parse the output of fping. Instead of using his script directly I tried to mimic the results of ICMP template.


    This is the content I placed in /etc/zabbix/zabbix_agentd.conf.d/icmp.conf

    Code:
    Timeout=30
    UserParameter=icmploss[*],fping -q -c 5 $1 2>&1 | cut -d'/' -f5 | cut -d'%' -f1
    UserParameter=icmpping[*],fping -q -c 5 $1 2>&1 ; echo $?
    UserParameter=icmptime[*],fping -q -c 5 $1 2>&1 | cut -d'/' -f8
    Now, I still have to manually create 3 items per host to monitor and specify a different key for each host I want to monitor.

    Is there any recommendation for this case?


    Last edited by aseques; 03-03-2020, 18:34. Reason: Fixed copy paste errors
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    I guess I'm a little confused why you're defining custom UserParameter settings for these 3 ICMP measurements. The "Simple Check" type already has several defined ICMP item keys, and Zabbix will already using 'fping' if it's installed on your Zabbix server (or presumably, proxy, but I don't currently have any proxies so I can't verify that).

    The network infrastructure team where I work makes significant use of the existing items for icmpping/icmppingloss. Putting those in a template, perhaps with appropriate use of user macros, and then applying the template to each device you want to check via ping should be all you need to do.

    If I've misunderstood your question, sorry! Please feel free to follow-up and explain further, if my suggestions are not on the right track.

    Comment

    • Hamardaban
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • May 2019
      • 2713

      #3
      This is done because it needs to monitor the availability of network nodes by sending ICMP packets not from the server \ proxy, but directly from the network node with the agent.
      Theoretically, it can install a zabbix_proxy on this node ...

      Comment

      • tim.mooney
        Senior Member
        • Dec 2012
        • 1427

        #4
        Ah yes, Hamardaban is correct as always!

        If aseques has several hosts to monitor this way, I also agree that the zabbix_proxy would be the easiest way.

        Comment

        Working...