How to flush all records of a host?
Moderators: Developers, Moderators
-
- Posts: 8
- Joined: Tue Jan 30, 2007 5:22 pm
How to flush all records of a host?
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?
-
- Posts: 8
- Joined: Tue Jan 30, 2007 5:22 pm
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.
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.
-
- Posts: 8
- Joined: Tue Jan 30, 2007 5:22 pm
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
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
-
- Posts: 8
- Joined: Tue Jan 30, 2007 5:22 pm
Who is online
Users browsing this forum: No registered users and 1 guest