mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix: Re-added peeringdb back into daily.sh (#7884)
This commit is contained in:
4
daily.sh
4
daily.sh
@@ -226,6 +226,10 @@ main () {
|
||||
local options=("notifications");
|
||||
call_daily_php "${options[@]}";
|
||||
;;
|
||||
peeringdb)
|
||||
local options=("peeringdb");
|
||||
call_daily_php "${options[@]}";
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
@@ -2282,7 +2282,7 @@ function cache_peeringdb()
|
||||
// We cache for 71 hours
|
||||
$cached = dbFetchCell("SELECT count(*) FROM `pdb_ix` WHERE (UNIX_TIMESTAMP() - timestamp) < 255600");
|
||||
if ($cached == 0) {
|
||||
$rand = rand(30, 600);
|
||||
$rand = rand(3, 30);
|
||||
echo "No cached PeeringDB data found, sleeping for $rand seconds" . PHP_EOL;
|
||||
sleep($rand);
|
||||
foreach (dbFetchRows("SELECT `bgpLocalAs` FROM `devices` WHERE `disabled` = 0 AND `ignore` = 0 AND `bgpLocalAs` > 0 AND (`bgpLocalAs` < 64512 OR `bgpLocalAs` > 65535) AND `bgpLocalAs` < 4200000000 GROUP BY `bgpLocalAs`") as $as) {
|
||||
|
Reference in New Issue
Block a user