View Cacti Log File [" . sizeof($logcontents) . " Item" . ((sizeof($logcontents) > 0) ? "s" : "") . "]", "98%", $colors["header"], "3", "center", ""); $i = 0; foreach ($logcontents as $item) { if (strpos($item,":") <> 0) { if ($linecolor = True) { $linecolor = False; }else{ $linecolor = True; } } $host_start = strpos($item, "Host["); $ds_start = strpos($item, "DS["); $new_item = ""; if ((!$host_start) && (!$ds_start)) { $new_item = $item; }else{ if ($host_start) { $host_end = strpos($item, "]", $host_start); $host_id = substr($item, $host_start+5, $host_end-($host_start+5)); $new_item = $new_item . substr($item, 0, $host_start + 5) . "" . substr($item, $host_start + 5, $host_end-($host_start + 5)) . ""; $item = substr($item, $host_end); } $ds_start = strpos($item, "DS["); if ($ds_start) { $ds_end = strpos($item, "]", $ds_start); $ds_id = substr($item, $ds_start+3, $ds_end-($ds_start+3)); $new_item = $new_item . substr($item, 0, $ds_start + 3) . "" . substr($item, $ds_start + 3, $ds_end-($ds_start + 3)) . ""; $item = substr($item, $ds_end); $new_item = $new_item . $item; }else{ $new_item = $new_item . $item; } } switch ($linecolor) { case True: form_alternate_row_color($colors["form_alternate1"],$colors["form_alternate2"],$i); ?> Clear Cacti Log File", "98%", $colors["header"], "1", "center", ""); if (file_exists($logfile)) { if (is_writable($logfile)) { unlink($logfile); touch($logfile); print "Cacti Log File Cleared"; }else{ print "Error: Unable to clear log, no write permissions."; } }else{ print "Error: Unable to clear log, file does not exist."; } html_end_box(); } function utilities_view_snmp_cache() { global $colors; $snmp_cache = db_fetch_assoc("select host_snmp_cache.*, host.description, snmp_query.name from (host_snmp_cache,snmp_query,host) where host_snmp_cache.host_id=host.id and host_snmp_cache.snmp_query_id=snmp_query.id order by host_snmp_cache.host_id,host_snmp_cache.snmp_query_id,host_snmp_cache.snmp_index"); html_start_box("View SNMP Cache [" . sizeof($snmp_cache) . " Item" . ((sizeof($snmp_cache) > 0) ? "s" : "") . "]", "98%", $colors["header"], "3", "center", ""); $i = 0; if (sizeof($snmp_cache) > 0) { foreach ($snmp_cache as $item) { form_alternate_row_color($colors["form_alternate1"],$colors["form_alternate2"],$i); ?> Host: , SNMP Query: Index: , Field Name: , Field Value: OID: View Poller Cache [" . sizeof($poller_cache) . " Item" . ((sizeof($poller_cache) > 0) ? "s" : "") . "]", "98%", $colors["header"], "3", "center", ""); $i = 0; if (sizeof($poller_cache) > 0) { foreach ($poller_cache as $item) { form_alternate_row_color($colors["form_alternate1"],$colors["form_alternate2"],$i); ?> Data Source: RRD: Action: , Cacti System Utilities", "98%", $colors["header"], "3", "center", ""); html_header(array("Poller Cache Administration"), 2); ?> ">

View Poller Cache

This is the data that is being passed to the poller each time it runs. This data is then in turn executed/interpreted and the results are fed into the rrd files for graphing or the database for display.

">

View SNMP Cache

The SNMP cache stores information gathered from SNMP queries. It is used by cacti to determine the OID to use when gathering information from an SNMP-enabled host.

">

Clear Poller Cache

The poller cache will be cleared and re-generated if you select this option. Sometimes host/data source data can get out of sync with the cache in which case it makes sense to clear the cache and start over.

">

View Cacti Log File

The Cacti Log File stores statistic, error and other message depending on system settings. This information can be used to identify problems with the poller and application.

">

Clear Cacti Log File

This action will reset the Cacti Log File. Please note that if you are using the Syslog/Eventlog only, this action will have no effect.