[solved] query_ifIP + Dynamic IP

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Moderators, Developers

Post Reply
Author
Message
xdracco
Posts: 23
Joined: Fri Aug 17, 2012 10:19 am
Location: Long Beach, CA

[solved] query_ifIP + Dynamic IP

#1 Post by xdracco » Fri Sep 08, 2017 10:37 am

Hello forum,

I have a pfSense router with 3 interfaces: LAN, WAN, VPN. Both WAN and VPN are assigned dynamic IP addresses. WAN rarely changes but it recently has. VPN changes everyday via a cron task that restarts my VPN connection.

Anywho..... the issue here issue is query_ifIP is not displaying the correct IP addresses for WAN and VPN. Is there a simple fix for this that doesn't involve DNS?

Thanks

//edit: this issue has been addressed in version 1.2. This thread can be closed.
Last edited by xdracco on Tue Jan 22, 2019 11:38 am, edited 2 times in total.
The answer to life, the universe and everything is int main() {}

xdracco
Posts: 23
Joined: Fri Aug 17, 2012 10:19 am
Location: Long Beach, CA

Re: query_ifIP + Dynamic IP

#2 Post by xdracco » Wed Dec 26, 2018 6:12 pm

happy holidays!

bump
The answer to life, the universe and everything is int main() {}

netniV
Cacti Guru User
Posts: 2868
Joined: Sun Aug 27, 2017 12:05 am

Re: query_ifIP + Dynamic IP

#3 Post by netniV » Thu Dec 27, 2018 10:14 am

Can you give more specific examples on what you mean? What is the wrong IP ? What should it be? etc.

xdracco
Posts: 23
Joined: Fri Aug 17, 2012 10:19 am
Location: Long Beach, CA

Re: query_ifIP + Dynamic IP

#4 Post by xdracco » Thu Dec 27, 2018 11:39 am

My router has 3 interfaces: em0, em1, and ovpnc1. em0 is WAN, em1 is LAN, and ovpnc1 is VPN. Of the three interfaces, only one is static; em1. The other two dynamic. While my WAN interface is dynamic, it changes very infrequently. However, my VPN interface is restarted every morning, and, as such, the IP address assigned to ovpnc1 changes every morning.

My graph for ovpnc1 has been 10.200.0.162 since i set up cacti last year. Today, it's a different IP address but 10.200.0.162 continues to be displayed on the graph. Additionally, under "graph management" in console, graph name displays 10.200.0.162 as part of the name. Graph template has this for title:

Code: Select all

|host_description| - Traffic - |query_ifIP| (|query_ifName|)
When I do a verbose query on SNMP - Interface Statistics for the device, the Data Query Debug Information output shows 5 IP addresses:

Code: Select all

Found item [ifIP='0.0.0.0'] index: 1 [from regexp oid parse]
Found item [ifIP='VPN IP (hidden)'] index: 7 [from regexp oid parse]
Found item [ifIP='WAN IP (hidden)'] index: 1 [from regexp oid parse]
Found item [ifIP='127.0.0.1'] index: 4 [from regexp oid parse]
Found item [ifIP='192.168.4.254'] index: 2 [from regexp oid parse]
The current VPN IP address listed in the verbose output is my currently assigned IP address but that doesn't match the graph.

Is there something that I'm doing wrong? Any help appreciated.

Thanks
The answer to life, the universe and everything is int main() {}

netniV
Cacti Guru User
Posts: 2868
Joined: Sun Aug 27, 2017 12:05 am

Re: query_ifIP + Dynamic IP

#5 Post by netniV » Fri Dec 28, 2018 3:45 am

If you are running less than 1.2, that is now a known issue. 1.2 (almost released) has had a big review on the way it reindexes when it detects changes on a device. By default, as of issue #2064 it now uses the following order to ascertain if an index has moved:
  • ifName
  • ifDescr
  • ifHwAddr
  • ifIndex

xdracco
Posts: 23
Joined: Fri Aug 17, 2012 10:19 am
Location: Long Beach, CA

Re: query_ifIP + Dynamic IP

#6 Post by xdracco » Fri Dec 28, 2018 11:18 am

thank you for the explanation. i'll just sit tight and wait for v1.2 final is released.
The answer to life, the universe and everything is int main() {}

Post Reply