Ad Widget

Collapse

How to make net.tcp.port check host IP not 127.0.0.1 (without explicit IP as a param)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • urtho
    Junior Member
    • Jul 2007
    • 1

    #1

    How to make net.tcp.port check host IP not 127.0.0.1 (without explicit IP as a param)

    Hi,

    I have a large number of machines with the same app listening on host's IP only (not on 127.0.0.1!). Can I use templates to monitor this tcp service by local agents or do I really have to manually enter IP address as a first parameter for _each_ monitored host ?

    Urtho,
  • Tristan
    Senior Member
    • Feb 2008
    • 110

    #2
    i have the same problem.

    anyone?

    Comment

    • alixen
      Senior Member
      • Apr 2006
      • 474

      #3
      Hi,

      Originally posted by urtho
      I have a large number of machines with the same app listening on host's IP only (not on 127.0.0.1!). Can I use templates to monitor this tcp service by local agents or do I really have to manually enter IP address as a first parameter for _each_ monitored host ?
      According to Zabbix documentation (http://www.zabbix.com/documentation/.../config/macros), it is possible to use {IPADDRESS} macro in item key's parameter.

      So you can define your item key as:
      Code:
      net.tcp.port[{IPADDRESS}]
      in your template.

      Regards,
      Alixen
      http://www.alixen.fr/zabbix.html

      Comment

      • pdwalker
        Senior Member
        • Dec 2005
        • 166

        #4
        What if you have more than one network interface in the machine, and you want to target a particular ipaddress?

        Right now, the {IPADDRESS} macro returns 127.0.0.1 which isn't helping me.

        Comment

        • alixen
          Senior Member
          • Apr 2006
          • 474

          #5
          Hi,

          Originally posted by pdwalker
          What if you have more than one network interface in the machine, and you want to target a particular ipaddress?

          Right now, the {IPADDRESS} macro returns 127.0.0.1 which isn't helping me.
          You can define a macro in your template and redefine it for each host:

          In template:
          {$MY_IP} : 127.0.0.1
          Item key : net.tcp.port[{$MY_IP}]

          In host:
          {$MY_IP} : 192.168.1.1

          It doesn't solve the problem of multiple IPs per host but you can define an IP to check for a specific service.

          Regards,
          Alixen
          http://www.alixen.fr/zabbix.html

          Comment

          Working...