Re-Indexing....

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

Moderators: Developers, Moderators

Post Reply
lavermil
Posts: 45
Joined: Thu Feb 15, 2007 2:25 pm
Location: Phoenix, Arizona

Re-Indexing....

Post by lavermil »

Hey Guru's,

I am curious how well Cacti will handle re-indexing on its own. This has always been a worry about mine but I have never followed up with a question on it. So here is the question. :D

What happens when re-indexing occurs?
If Cacti doesn't account re-indexing is there a way to automatically send an alert when the number of elements being has changed? Here are a few examples:

- I am checking a server for disk partitions for utilization and a new partition is added how could I be notified?

- I am monitoring a network switch/router. I have a virtual interface and I delete the virtual interface and reboot. At a later date I decide to create a new virtual interface and it happens to be assigned the same index number of a the previous index that was used for the virtual interface I deleted before reboot. Now I potentially could have an issue. How could I account for this within Cacti?

Thank you in advance.

-Lance
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Re-Indexing....

Post by gandalf »

lavermil wrote: - I am checking a server for disk partitions for utilization and a new partition is added how could I be notified?
Use re-index method "Index Count Changed"
- I am monitoring a network switch/router. I have a virtual interface and I delete the virtual interface and reboot. At a later date I decide to create a new virtual interface and it happens to be assigned the same index number of a the previous index that was used for the virtual interface I deleted before reboot. Now I potentially could have an issue. How could I account for this within Cacti?
Personally, I would not use re-index method "Uptime goes backwards" (this one will trigger on reboot), because index changes in general do not require a reboot. IMHO, in this very case "Index Count Change" should work, because each of those issues you've mentioned changes the index count. If in doubt "Verify All Fields" would be the last resort; it will even check the contents of index fields an will re-index if the contents (e.g. ifDescription) changes. This method works on "Index Fields" only.
This is, what I've learned from Larry (The Witness). Hopefully, he will check my words and correct me were I'm wrong :)
Reinhard
lavermil
Posts: 45
Joined: Thu Feb 15, 2007 2:25 pm
Location: Phoenix, Arizona

Re: Re-Indexing....

Post by lavermil »

gandalf wrote:
lavermil wrote: - I am checking a server for disk partitions for utilization and a new partition is added how could I be notified?
Use re-index method "Index Count Changed"
- I am monitoring a network switch/router. I have a virtual interface and I delete the virtual interface and reboot. At a later date I decide to create a new virtual interface and it happens to be assigned the same index number of a the previous index that was used for the virtual interface I deleted before reboot. Now I potentially could have an issue. How could I account for this within Cacti?
Personally, I would not use re-index method "Uptime goes backwards" (this one will trigger on reboot), because index changes in general do not require a reboot. IMHO, in this very case "Index Count Change" should work, because each of those issues you've mentioned changes the index count. If in doubt "Verify All Fields" would be the last resort; it will even check the contents of index fields an will re-index if the contents (e.g. ifDescription) changes. This method works on "Index Fields" only.
This is, what I've learned from Larry (The Witness). Hopefully, he will check my words and correct me were I'm wrong :)
Reinhard
What do you mean exactly when you say "Index Fields" only?

So for the most part "Uptime Goes Backwards" is not a good choice. Would it be best to use "Verify All Fields" instead of "Index Count Change"? Is there a performance hit for one method over the other? Another reason I ask is because I am monitor Cisco Content Switches and they get new ifindexes all the time (ex. when new content is added/changed). The main problem I have with monitoring that is when I add new services/owners/etc I have to go back and reload the query for the particular template.

Thank you in advance once again.

-Lance
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Re-Indexing....

Post by gandalf »

lavermil wrote:What do you mean exactly when you say "Index Fields" only?
The Index defined by the XML file: <oid_index>.
So for the most part "Uptime Goes Backwards" is not a good choice. Would it be best to use "Verify All Fields" instead of "Index Count Change"? Is there a performance hit for one method over the other?
Yes. Re-indexing takes quite some time to read the values and compare them to previous results to check, if there has been a change. Re-Indexing statistics may be graphe using my "Poller Statistics" Graph Templates
Reinhard
gunza
Posts: 7
Joined: Thu Jul 17, 2008 7:10 am
Location: Russian Federation
Contact:

Re-Indexing....

Post by gunza »

Hello Guys!

I'd like to join the discussion 'cos we've encountered the same problem with re-indexing interfaces (here we are monitoring hundreds of routers and switches)...

It seems "Index Count Changed" method resolves the problem of re-indexing described above (at least in case of adding a new virtual interface or deleting the existing one) in contrast of "Uptime Goes Backwards", but what I'd like to know:

- Is it possible to change Re-Index Method without removing and then re-adding the Associated Data Query?

- Is there any way to make the "Index Count Changed" re-indexing method to be the Default re-indexing method?


Thank you in advance,
Andrey
User avatar
Vins
Cacti User
Posts: 116
Joined: Tue Sep 12, 2006 3:06 am

Re: Re-Indexing....

Post by Vins »

lavermil wrote: - I am monitoring a network switch/router. I have a virtual interface and I delete the virtual interface and reboot. At a later date I decide to create a new virtual interface and it happens to be assigned the same index number of a the previous index that was used for the virtual interface I deleted before reboot. Now I potentially could have an issue. How could I account for this within Cacti?
On a Cisco device you can prevent the index overlap issuing this command:

snmp-server ifindex persist

This causes the switch/router to mantain the same interface index order even if you add another interface, so Cacti will find the same interface at the same index even if something else is changed on the device
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Re-Indexing....

Post by gandalf »

gunza wrote:Hello Guys!

I'd like to join the discussion 'cos we've encountered the same problem with re-indexing interfaces (here we are monitoring hundreds of routers and switches)...

It seems "Index Count Changed" method resolves the problem of re-indexing described above (at least in case of adding a new virtual interface or deleting the existing one) in contrast of "Uptime Goes Backwards", but what I'd like to know:

- Is it possible to change Re-Index Method without removing and then re-adding the Associated Data Query?
Not yet. Feature is added already to cacti 088.
- Is there any way to make the "Index Count Changed" re-indexing method to be the Default re-indexing method?
Not yet. Feature is added already to cacti 088. You will be able to define the re-index method per Host Template and per Data Query. CLI scripts will pay attention for this change.
Reinhard
User avatar
TFC
Cacti Pro User
Posts: 739
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Re: Re-Indexing....

Post by TFC »

Is there any way to follow interface based on ifindex?
Maybe description or IP address. Because my router's ifindex can change or router can be replaced.
And i draw graph wrong interface.
I wanna stick a graph interface Ip address or description.
If possible, how?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest