Is there any way to refresh private logs during the first day of every month. My logs are just getting piled up from the day it was first configured.
Thanks.
Refresh private logs every month
What exactly means "refresh"? You want to remove old log? You want to move log to archive?Is there any way to refresh private logs during the first day of every month. My logs are just getting piled up from the day it was first configured.
I think you should use "Special processing" options (located on "Log settings" page in the Options dialog)
Regards
Alex
Hi,
I just went through the special processing options for setting up private log. I have only two options - "If private log is bigger than", "If private log was created".
Now consider my situation, for eg on Jun 01, 2005 I want to move all May 2005 logs to c:\hostmonitor\May2005. Is there anyway that this can be done?
Thanks.
I just went through the special processing options for setting up private log. I have only two options - "If private log is bigger than", "If private log was created".
Now consider my situation, for eg on Jun 01, 2005 I want to move all May 2005 logs to c:\hostmonitor\May2005. Is there anyway that this can be done?
Thanks.
Ok thats good. And also when I click the Check button for special processing of private logs it is expecting a command to execute. I want to do the following if the log is one month old.
1. Create a folder with previous month's name in the format MMYYYY.
2. Move 1 month old logs to that folder.
Is all this possible or should I already have the folder created and hostmonitor will automatically take care of moving the logs.
Thanks.
1. Create a folder with previous month's name in the format MMYYYY.
2. Move 1 month old logs to that folder.
Is all this possible or should I already have the folder created and hostmonitor will automatically take care of moving the logs.
Thanks.
Quote from the manual
Last step: provide command line to start BAT file, e.g.
Regards
Alex
It means HostMonitor will check parameters of log file(s) and execute specified command. HostMonitor will not move files unless you provide command line that moves files.You may define command line for execution and choose one of 3 available options to specify when HostMonitor should execute external command for processing common log file(s):
I think you may use %MMYYYY%.htm format for log file name (extension depends on type of the file you want to use, for example HTM). Than you may create simple BAT file likeI want to do the following if the log is one month old.
1. Create a folder with previous month's name in the format MMYYYY.
2. Move 1 month old logs to that folder.
Code: Select all
mkdir %2
cmd /c move /y %1 %3%2
Code: Select all
cmd /c path_to_bat_file "%log%" "%logname%" "%logpath%"
Alex