Auto query_reload for hosts ?

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
MadX
Posts: 31
Joined: Wed Apr 23, 2008 7:10 pm

Auto query_reload for hosts ?

Post by MadX »

Operating System: Windows XP Sp2
Webserver: Apache Http server 2.2.11
Cacti: Version 0.8.7e

Spine: Version 0.8.7c

Windows Installer v1.92

MySQL: version 5 that comes with the latest installer of cacti
PHP: 5.2 that comes with the latest installer of cacti
RRDTool (Cygwin or Win32 version): that comes with the latest installer of cacti
Net-SNMP: version 5.4.1.3 that comes with the latest installer of cacti
Cygwin (cygwin1.dll version): that comes with the latest installer of cacti
Plugin Architecture: none.





is there any way to do an automatic query_reload for monitored hosts.
i need this cuz i`m monitorig a cisco router that is connected with DSL with a dynamic ip and use's Dyndns to have a static DNS name so i can monitor it, so when the ip is changed the router update's it's own DNS name with the new ip so the host will be state as up in the cacti cuz cacti is configured to reach the host through that DNS name like hhhhh.gotdns.com.

the problem is when the ip is changed all the graphs for the host is fine but not the cisco port`s graph the port that is connected to the DSL the one that i`m monitoring, the graph start to fill a blank graph untill i make a manual query_reload for the monitored router so the cacti reread the monitored cisco router port`s new name witch include the new ip then it start's graphing again, so is there any command that could do query_reload so i can make it in a Batch file and have it as a scheduled task.
Attachments
Graph1.JPG
Graph1.JPG (102.4 KiB) Viewed 2271 times
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

\cacti\cli\poller_reindex_hosts.php or poller_graphs_reapply_names.php should do the trick.
MadX
Posts: 31
Joined: Wed Apr 23, 2008 7:10 pm

thanks for ur reply

Post by MadX »

\cacti\cli\poller_reindex_hosts.php has worked like charme,

is there any way to have this script running each time a host comes up from a down state.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

If the reindex method for that data query is 'Uptime Goes Backwards', cacti should automatically do that.
MadX
Posts: 31
Joined: Wed Apr 23, 2008 7:10 pm

Post by MadX »

actually the reindex method for that data query is already set 'Uptime Goes Backwards' and cacti is not doing it automaticly, i'm wondring what dose the "Verify All Fields" method mean?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

MadX wrote:actually the reindex method for that data query is already set 'Uptime Goes Backwards' and cacti is not doing it automaticly
Hmm, something is broken or the device isn't reporting it's uptime correctly to Cacti. Look through your cacti.log file when the device reboots on what cacti does with it.
MadX wrote:'m wondring what dose the "Verify All Fields" method mean?
http://docs.cacti.net/manual:087:6_refe ... []=reindex
MadX
Posts: 31
Joined: Wed Apr 23, 2008 7:10 pm

Post by MadX »

only "Verify All Fields" has achieve what i need. i think becuse the device or te host is not rebooted it`s only dissconnect and reconnect with a new ip.
recording to the link u post
Uptime Goes Backwards:Refers to a system reboot. Cacti will detect if the target has been rebootet by querying sysUptime.


but it`s filling up the logs with this
07/04/2009 06:14:45 PM - PCOMMAND: Poller[0] Host[20] WARNING: Recache Event Detected for Host
07/04/2009 06:14:45 PM - PCOMMAND: Poller[0] Host[23] WARNING: Recache Event Detected for Host
07/04/2009 06:14:45 PM - PCOMMAND: Poller[0] Host[26] WARNING: Recache Event Detected for Host

for all the hosts that i have set it`s reindex method to "Verify All Fields"
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests