So below is a sample windows batch file that checks the local directory to see if the file exists.
if it does it than checks it to see if the file is over a certain limit and returns a string.
rem setup variables for use
@echo off
setlocal
rem size is in bytes the below value is 75 Megabytes
set maxbytesize=75000000
Rem first section to get current date in yyyy-dd-mm format
set mydate=%date:~10,4%-%date:~4,2%-%date:~7,2%
rem uncommecnt below line for testing.
rem echo %mydate%
rem Set the file name
set FileName=ECS_%mydate%.log
rem echo %FileName%
rem check if the file exists:
if exist %FileName% (
rem echo file exists
call :setsize %FileName%
goto :check
) else (
echo file doesn't exist
)
:check
if %size% lss %maxbytesize% (
echo File is less than %maxbytesize% bytes
) else (
echo File is greater than %maxbytesize% bytes
)
goto :eof
Rem Filesize check
:setsize
set size=%~z1
rem echo %size%
goto :eof
I have attached the file as well.
you may need to play with path and location information but this should get your started.
you can have logmon call this file and it will return one of two values
file does not exist
file is greater than XXXXX bytes
so you can setup watcher profiles to alarm for either of those cases.