How to flush all records of a host?

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

Moderators: Developers, Moderators

Post Reply
robotshane
Posts: 8
Joined: Tue Jan 30, 2007 5:22 pm

How to flush all records of a host?

Post by robotshane »

I have some hosts that are showing as Down, though I can snmpget data from them so I think cacti may have some record of the host that's not available to delete in the data resource management section of the interface. Which mysql tables should I delete from to get rid of these records?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

I'm quite sure that this problem is not due to some ugly stuff in MySQL tables. I suppose it's a "Downed Host Detection" problem. Turn poller debug level to DEBUG for one cycle and find results of downed host detection in cacti.log. Post those lines, please
Reinhard
robotshane
Posts: 8
Joined: Tue Jan 30, 2007 5:22 pm

Post by robotshane »

Hello and thank you for your reply. Here is the debug output:

03/02/2007 01:06:30 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "update host set status = '1', status_event_count = '243', status_fail_date = '0000-00-00 00:00:00', status_rec_date = '0000-00-00 00:00:00', status_last_error = 'Host did not respond to SNMP', min_time = '9.99999', max_time = '0.00000', cur_time = '0.00000', avg_time = '0.00000', total_polls = '244', failed_polls = '244', availability = '0' where hostname = '10.4.20.20'"

What's weird is that this appears to happen for most, but not all hosts, who have 10.x.20.20 as their address.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

I would need a few lines more before this one
Reinhard
robotshane
Posts: 8
Joined: Tue Jan 30, 2007 5:22 pm

Post by robotshane »

I've disabled all hosts but the one in question:

03/15/2007 12:05:02 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select count(*) from poller_item"
03/15/2007 12:05:02 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select id from host where disabled = '' order by id"
03/15/2007 12:05:02 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "replace into settings (name,value) values ('path_webroot','/usr/share/cacti')"
03/15/2007 12:05:02 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "truncate table poller_time"
03/15/2007 12:05:02 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /usr/bin/php, ARGS: -q /usr/share/cacti/cmd.php 0 116]
03/15/2007 12:05:02 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: " SELECT * FROM host WHERE (disabled = '' AND id >= 0 AND id <= 116) ORDER by
id"
03/15/2007 12:05:02 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: " SELECT * from poller_item WHERE (host_id >= 0 AND host_id <= 116) ORDER by host
_id"
03/15/2007 12:05:02 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: " SELECT count(*) FROM poller_item WHERE (action=2 AND (host_id >= 0 AND host_id <=
116))"
03/15/2007 12:05:02 PM - CMDPHP: Poller[0] Host[116] SNMP: Host did not respond to SNMP
03/15/2007 12:05:02 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "update host set status = '1', status_event_count = '2359', status_fail_date = '0000-00-00 00:0
0:00', status_rec_date = '0000-00-00 00:00:00', status_last_error = 'Host did not respond to SNMP', min_time = '9.99999', max_time = '0.00000', cur_time
= '0.00000', avg_time = '0.00000', total_polls = '2360', failed_polls = '2360', availability = '0' where hostname = '10.4.20.20'"

SNMP works from the command line:
root@localhost:/usr/share/cacti/log # snmpget -c public -v 2c 10.4.20.20 system.sysUpTime.0
SNMPv2-MIB::sysUpTime.0 = Timeticks: (115455000) 13
robotshane
Posts: 8
Joined: Tue Jan 30, 2007 5:22 pm

Post by robotshane »

Hi Gandalf. I saw in one of your other posts to look at the "Downed Host Detection" option in Settings and changed this to Ping and SNMP. It works great now. Thank you!!!
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests