Hello everyone.
I picked up administering a huge Cacti installation. It has got nearly 1000 hosts. One of the problems I have noticed that some servers had DNS names in Hostname field instead of IP adresses. This sometimes resulted in unresolvable IPs (the DNS system is weak here) and no SNMP data. So I decided to write a script to find all the DNS hostnames, resolve them and replace with unique IP adresses for the corresponding hosts in the `host` table. All the info is now correct in Cacti-> Devices.
But...
I did some tcpdump'ing and I see that still much DNS names are trying to be resolved when the poller launches. I did some research and found that the old DNS hostnames are still residing in the `poller_item` table. Going to Cacti->Devices, picking particular host and just pressing the Save button seems to update the table and all is well. But I won't be doing that for each of the 1000 host manually with my mouse...
Is there any script, SQL setting or a tool to do that for all hosts, or at least by host ID?
Thanks!
Forcing a host recache?
Moderators: Developers, Moderators
Re: Forcing a host recache?
two options:
1) Cacti System Utilities -> Rebuild Poller Cache
2) \cacti\cli\rebuild_poller_cache.php
1) Cacti System Utilities -> Rebuild Poller Cache
2) \cacti\cli\rebuild_poller_cache.php
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Re: Forcing a host recache?
Thanks.
I've tried both, but the following problems:
1) from the GUI, the rebuilding cache never completes due to system load probably
2) I've tried the CLI version. It took forever to run. So I cancelled it and ran host by host. Unfortunately, this didn't clear the hostnames in the poller_item. Looks like only pressing the 'Save' button when editing host (even with no changes) seems to clear & regenerate that cache....
I've tried both, but the following problems:
1) from the GUI, the rebuilding cache never completes due to system load probably
2) I've tried the CLI version. It took forever to run. So I cancelled it and ran host by host. Unfortunately, this didn't clear the hostnames in the poller_item. Looks like only pressing the 'Save' button when editing host (even with no changes) seems to clear & regenerate that cache....
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Forcing a host recache?
This qualifies for a bug report, then
R.
R.
Who is online
Users browsing this forum: No registered users and 0 guests