Intial Commit. First Release

This commit is contained in:
Grzegorz Budny 2019-07-14 22:52:31 +02:00
parent 1508f05bc0
commit e2280aad84
4 changed files with 50 additions and 0 deletions

View file

@ -0,0 +1,21 @@
# RouterOS Function
# Copyright (c) Grzegorz Budny
# Generates log alert when free disk space reach specified treshhold
:global LowDiskSpace do={
:local alertSpace $treshhold;
:local freeSpace [/system resource get free-hdd-space];
:local totalSpace [/system resource get total-hdd-space];
:local diskUsage (($freeSpace * 100)/$totalSpace);
:if ($diskUsage < $treshhold) do={
/log warning ("Disk space reached ".$treshhold." % treshold. Free disk space is ".$diskUsage."%");
}
}
$LowDiskSpace treshhold=free_disk_space_in_%;