* Biggest change in this commit; scan-apc-pdu and scan-apc-ups now only run on Striker dashboards! This was because we found that if two machines ran their agents at the same time, the reponce time from SNMP read requests grew a lot. This meant it was likely a third, fourth and so on machne would also then have their scan agent runs while the existing runs were still trying to process, causing the SNMP reads to get slower still until timeouts popped.
* Bumped scancore's scan delay from 30 seconds to 60.
* Shorted the age-out time to 24 hours and again boosted the archive thresholds. As we get a feel for the amount of data collected on multi-Anvil! systems over time, we may continue to tune this.l
* Moved Database->archive_database() to be called daily by anvil-daemon, instead of during '->connect' calls.
* Added locking to Database->_age_out_data to avoid resyncs mid-purge. Also moved the power, temperature and ip_address columns into the same 'to_clean' hash as it was duplicate logic.
Signed-off-by: Digimer <digimer@alteeve.ca>
# Find how many records will be left. If it's 0, we'll use an OFFSET 1.
my$query="SELECT history_id FROM history.".$table." WHERE ".$uuid_column." = ".$anvil->Database->quote($column_uuid)." AND modified_date > '".$old_timestamp."';";
my$query="DELETE FROM history.".$table." WHERE ".$uuid_column." = ".$anvil->Database->quote($column_uuid)." AND modified_date <= '".$old_timestamp."';";
@ -1596,7 +1596,7 @@ Failed to promote the DRBD resource: [#!variable!resource!#] primary. Expected a
<keyname="log_0448">Ready to parse: [#!variable!file!#].</key>
<keyname="log_0448">Ready to parse: [#!variable!file!#].</key>
<keyname="log_0449">Parsed: [#!variable!records!#], adding/updating them to the database now.</key>
<keyname="log_0449">Parsed: [#!variable!records!#], adding/updating them to the database now.</key>
<keyname="log_0450">Skipping the network scan. The next scheduled scan will be done in: [#!variable!next_scan!#]. Override with '--force'.</key>
<keyname="log_0450">Skipping the network scan. The next scheduled scan will be done in: [#!variable!next_scan!#]. Override with '--force'.</key>
<keyname="log_0451">Checking to see if any data needs to be archived before starting the resync.</key>
<keyname="log_0451">Checking to see if any data needs to be archived.</key>
<keyname="log_0452">Skipping archiving, not a Striker dashboard.</key>
<keyname="log_0452">Skipping archiving, not a Striker dashboard.</key>
<keyname="log_0453">Archiving: [#!variable!records!#] over: [#!variable!loops!#] segments from the table: [#!variable!table!#] from the database on: [#!variable!host!#]. This might take a bit, please be patient.</key>
<keyname="log_0453">Archiving: [#!variable!records!#] over: [#!variable!loops!#] segments from the table: [#!variable!table!#] from the database on: [#!variable!host!#]. This might take a bit, please be patient.</key>
<keyname="log_0454">Writing: [#!variable!records!#] to the file: [#!variable!file!#].</key>
<keyname="log_0454">Writing: [#!variable!records!#] to the file: [#!variable!file!#].</key>