Ad Widget

Collapse

the last know public IP (active agent)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gazambuja
    Junior Member
    • Oct 2008
    • 9

    #1

    the last know public IP (active agent)

    How I can know the las know IP of a remote host (active agent)?
    I want to send this info in the notifications messages.

    I try {HOST.IP} but this is the register IP and not the IP of host (dynamic public IP/ADSL)

    Thanks
  • gleo77
    Junior Member
    • Dec 2014
    • 2

    #2
    You don't mention what OS the host is in this scenario so I'm going to work off the assumption it's some flavor of Linux.

    One way to solve this problem (and perhaps there are better ways) is to use a UserParameter in the agent's config file.

    I've used something like this for example:

    Code:
    UserParameter=net.ip,hostname -I
    You can lookup the docs on UserParameter but basically it allows you to pass the result of a command back to Zabbix. Once you add this value to your configuration and restart the agent you can add an item to your host or template with the same key (net.ip). Be sure to set the type to Zabbix agent (active) of course.

    The example above assumes "hostname -I" returns the value you're looking for, otherwise you'll need to tweak the command accordingly.

    Comment

    Working...