2008-09-03 Sancho Lerena <slerena@gmail.com>
* pandora_server_installer: Added more info about some dependencies. * pandora_package_installer: The same. * util/pandora_db.pl: Fixed problem deleteing tevent table. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1082 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
418f3b0732
commit
d73805e616
|
@ -1,3 +1,10 @@
|
|||
2008-09-03 Sancho Lerena <slerena@gmail.com>
|
||||
|
||||
* pandora_server_installer: Added more info about some dependencies.
|
||||
|
||||
* pandora_package_installer: The same.
|
||||
|
||||
* util/pandora_db.pl: Fixed problem deleteing tevent table.
|
||||
|
||||
2008-09-01 Sancho Lerena <slerena@gmail.com>
|
||||
|
||||
|
|
|
@ -58,11 +58,11 @@ install () {
|
|||
if [ -d /etc/cron.daily ]
|
||||
then
|
||||
echo "#!/bin/bash" > /etc/cron.daily/pandora_purge_db
|
||||
echo "perl /usr/share/pandora/util/pandora_db /etc/pandora/pandora_server.conf" >> /etc/cron.daily/pandora_purge_db
|
||||
echo "perl /usr/share/pandora/util/pandora_db.pl /etc/pandora/pandora_server.conf" >> /etc/cron.daily/pandora_purge_db
|
||||
chmod +x /etc/cron.daily/pandora_purge_db
|
||||
else
|
||||
echo "You're probably not using cron for automatic scheduling. You should schedule the following command to run frequently (daily) on your master server:"
|
||||
echo " perl /usr/share/pandora/util/pandora_db /etc/pandora/pandora_server.conf"
|
||||
echo " perl /usr/share/pandora/util/pandora_db.pl /etc/pandora/pandora_server.conf"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ then
|
|||
echo "The complete installation guide is at: "http://www.openideas.info/wiki/index.php?title=Pandora_1.3:Server:QIG#Installing_from_sources" "
|
||||
echo " "
|
||||
echo "Debian-based distribution do:"
|
||||
echo " $ apt-get install libdate-manip-perl snmp snmpd libsnmp-perl libtime-format-perl libxml-simple-perl libnetaddr-ip-perl libdbi-perl libxml-simple-perl libnetaddr-ip-perl wmi-client xprobe2"
|
||||
echo " $ apt-get install libdate-manip-perl snmp snmpd libsnmp-perl libtime-format-perl libxml-simple-perl libnetaddr-ip-perl libdbi-perl libxml-simple-perl libnetaddr-ip-perl libhtml-parser-perl wmi-client xprobe2"
|
||||
echo " "
|
||||
echo "RedHat-based distribution do"
|
||||
echo " "
|
||||
|
@ -30,7 +30,7 @@ then
|
|||
echo " "
|
||||
echo "To get it from source through CPAN do"
|
||||
echo " "
|
||||
echo " $ cpan Digest::MD5 Time::Local DBI threads threads::shared IO::Socket Time::HiRes Time::Format Net::Ping NetAddr::IP Mail::Sendmail Net::Traceroute::PurePerl"
|
||||
echo " $ cpan Digest::MD5 Time::Local DBI threads threads::shared IO::Socket Time::HiRes Time::Format Net::Ping NetAddr::IP Mail::Sendmail Net::Traceroute::PurePerl HTML::Entities"
|
||||
echo " "
|
||||
rm output
|
||||
else
|
||||
|
@ -99,11 +99,11 @@ else
|
|||
if [ -d /etc/cron.daily ]
|
||||
then
|
||||
echo "#!/bin/bash" > /etc/cron.daily/pandora_purge_db
|
||||
echo "perl /usr/share/pandora/util/pandora_db /etc/pandora/pandora_server.conf" >> /etc/cron.daily/pandora_purge_db
|
||||
echo "perl /usr/share/pandora/util/pandora_db.pl /etc/pandora/pandora_server.conf" >> /etc/cron.daily/pandora_purge_db
|
||||
chmod +x /etc/cron.daily/pandora_purge_db
|
||||
else
|
||||
echo "You're probably not using cron for automatic scheduling. You should schedule the following command to run frequently (daily) on your master server:"
|
||||
echo " perl /usr/share/pandora/util/pandora_db /etc/pandora/pandora_server.conf"
|
||||
echo " perl /usr/share/pandora/util/pandora_db.pl /etc/pandora/pandora_server.conf"
|
||||
fi
|
||||
rm output
|
||||
fi
|
||||
|
|
|
@ -25,7 +25,7 @@ use DBI; # DB interface with MySQL
|
|||
use Date::Manip; # Date/Time manipulation
|
||||
|
||||
# version: define la version actual del programa
|
||||
my $version = "1.3 PS080327";
|
||||
my $version = "2.0 PS080903";
|
||||
|
||||
# Setup variables
|
||||
my $dirname="";
|
||||
|
@ -91,7 +91,7 @@ sub pandora_purgedb {
|
|||
my $limit_event = DateCalc("today","-$config_days_purge days",\$err);
|
||||
$limit_event = &UnixDate($limit_event,"%Y-%m-%d %H:%M:%S");
|
||||
print "[PURGE] Deleting old event data (More than $config_days_purge days)... \n";
|
||||
$dbh->do("DELETE FROM tevent WHERE timestamp < '$limit_event'");
|
||||
$dbh->do("DELETE FROM tevento WHERE timestamp < '$limit_event'");
|
||||
|
||||
print "[PURGE] Deleting old data... \n";
|
||||
# Lets insert the last value on $limit_timestamp + 1 minute for each id_agente_modulo
|
||||
|
|
Loading…
Reference in New Issue