Ad Widget

Collapse

The right way to handle host with two IPs - one public and one private

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dlublink
    Junior Member
    • Jul 2015
    • 2

    #1

    The right way to handle host with two IPs - one public and one private

    Hello,

    Most of the hosts I wish to monitor have two interfaces. One public and one private ( rfc1918 ).

    The zabbix service always runs on the private interface. I check for basic things like CPU usage, etc... via the private interface.

    However I also need to test reachability (ping ) on the public interface, test if certain services are running and are answering ( example script that logs into FTP and returns the time it took to run ).

    What is the correct way to do this ? In Nagios I have two different hosts "mycoolhost" and "mycoolhost-public". Should I do the same with Zabbix or is there a better way to do it?

    Thanks.
  • martijnatlico
    Junior Member
    • May 2015
    • 5

    #2
    That is what we do for hosts with two SNMP interfaces (one for the OS and one for the management card), I think it's your only option.

    Comment

    • dlublink
      Junior Member
      • Jul 2015
      • 2

      #3
      solved

      Hello,

      After a lot of digging around, I found that a good way to do this is to use the macro feature of hosts.

      In the macro tab of a sample host, I have :

      {$PUBLICIP} => 8.8.8.8

      The public IP is never used for SNMP, Zabbix Agent, or anything else, therefore this solution works fine.

      When I write my templates, I simply type {$PUBLICIP} in place of the IP address in the command/key I wish to run.

      Hope this helps someone else in the future.


      relevant xkcd

      Comment

      Working...