Need help on Log Rotation

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
sneader
Posts: 90
Joined: Thu Dec 22, 2005 3:32 pm

Need help on Log Rotation

Post by sneader »

Ok, spent a good hour reading the manual and searching the archives here, then was still unsuccessful in setting up a basic monthly log rotation.

My first task was to get HostMon to start using the Date variable when it creates the logs. Unfortunately, when I told it to use %YYMMDD%.htm, it saved the file EXACTLY that way. I read where I must check a box that says "resolve macros" but the manual says to do it one way, but my Host Mon version (latest beta) does not look the same as the manual's example screen shot -- I cannot find such option.

Can someone point me in the right direction?

Perhaps once this is resolved, the rest of my task will go OK. :-)

- Scott
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

1) What version of HostMonitor do you use? 6.20?
2) If you set "Log to specific file" option, HostMonitor does not resolve macros. Use "Automatically change the log every month" option
Unfortunately, when I told it to use %YYMMDD%.htm
3) Such variable should be used for DAILY logs rotation
I read where I must check a box that says "resolve macros" but the manual says to do it one way, but my Host Mon version (latest beta) does not look the same as the manual's example screen shot
What the reason to use old Beta version when newer release available?
Beta versions may include old help files (related to previous version of the software)

Regards
Alex
sneader
Posts: 90
Joined: Thu Dec 22, 2005 3:32 pm

Post by sneader »

KS-Soft wrote:1) What version of HostMonitor do you use? 6.20?
Version 6.24
KS-Soft wrote:2) If you set "Log to specific file" option, HostMonitor does not resolve macros. Use "Automatically change the log every month" option
Where is this option? I wish the on-line manual was searchable. :)
KS-Soft wrote:
sneader wrote:Unfortunately, when I told it to use %YYMMDD%.htm
3) Such variable should be used for DAILY logs rotation
I was just thinking it would date the file as the current year month day that the log was created, which is fine by me. But I am truly open to whatever you want me to do. I just want to create a new log each month, and save all the old log files, and have them named in a way that I will understand which file is for which month.
KS-Soft wrote:
sneader wrote:I read where I must check a box that says "resolve macros" but the manual says to do it one way, but my Host Mon version (latest beta) does not look the same as the manual's example screen shot
What the reason to use old Beta version when newer release available?
Beta versions may include old help files (related to previous version of the software)
I'm not using old Betas... I've read where you want people like us to start using the new software as soon as it is out, so that we can report problems, help test, etc., and so I always try to do that.

Maybe I'm doing something dumb, but since the on-line manual isn't searchable, I used google.com... it took me to this page:

http://www.ks-soft.net/hostmon.eng/la/index.htm

This page shows a screen shot called Report Manager, which I cannot find on my 6.24 version:

http://www.ks-soft.net/images/hostmon4/ ... epman1.gif

This screen shot has the "Resolve Macros" checkbox that I thought I needed (based on reading a thread in this forum)

I think it would be helpful if you included monthly log rotation in your examples in the manual, and spelled it out. I know... in your spare time, right? :-)

Thanks for your help, as always!

- Scott

P.S. the F1 Help gives me "Windows API Error. Error description not available" -- any suggestions there (I know this should be a different thread)
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Version 6.24
Then manual and help file is up-to-date.
Why did you say you are using Beta version?
Where is this option?
Its right here - "Log Setting / Primary Log" page in the Options dialog.

Quote from the manual
You may specify Primay and Backup common logs, so there are 2 identical sets of parameters located on 2 pages in the Options dialog:
- [Primary log]
- [Backup log]
For each log you may choose defferent log type (ODBC or File), file format (HTML, Text or DBF) and logging mode (Full, Brief, Midnight or Reply).
....
If you have chosen "File" as type of the log, then you should define location and name of the common log file. Select one of the following options:
Log to specific file
Automatically change the log every month (MMYYYY-Log.ext)
Automatically change the log every week (WWYYYY-Log.ext)
Automatically change the log every day (DDMMYYYY-Log.ext)
If you select option to automatically change the log file date macro variables may be specified in the log file name. HostMonitor interprets text between the '%' of the log name as a macro, where 'DD' represents the day of the month, ‘WW' - current week number, 'MM' - the month, 'YY' - the year in two digit format, 'YYYY' - the year.
I think it would be helpful if you included monthly log rotation in your examples in the manual, and spelled it out
But its straight forward without any manual :wink: Simply choose "Automatically change the log every month" option. That's it.
P.S. the F1 Help gives me "Windows API Error. Error description not available" -- any suggestions there (I know this should be a different thread)
Please read the following article http://www.ks-soft.net/cgi-bin/phpBB/vi ... php?t=2847

Regards
Alex
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

PS Package includes printabe (and searchable) manual in MS Word format

Regards
Alex
sneader
Posts: 90
Joined: Thu Dec 22, 2005 3:32 pm

Post by sneader »

KS-Soft wrote:
Why did you say you are using Beta version?
Oops... I just installed 6.24 and I thought it was a BETA. But you are right, nowhere does it say this. My apologies for the confusion.
KS-Soft wrote:
Where is this option?
Its right here - "Log Setting / Primary Log" page in the Options dialog.
THANK YOU! I chose "log to specific file" and I did not know that the drop-down menu included the option to rotate logs. I've been a long-time customer... maybe this option was added after I did the installation... not sure. But YES it is there... I will try it!!

Is it possible to do something similar for the private logs?
KS-Soft wrote:
I think it would be helpful if you included monthly log rotation in your examples in the manual, and spelled it out
But its straight forward without any manual :wink: Simply choose "Automatically change the log every month" option. That's it.
Well, I did waste two hours getting this to work. And I didn't fall off the apple cart yesterday. I really tried to use all the resources available to me, yet I failed. I think this indicates some type of documentation problem.

Here, look at this... as a dumb user like me.

1) I go to your web site, pull up the On-line manual.
2) I click on "Logs & Reports" on the left side menu.
3) I go to the section titled "Log Processing". It says "Log processing options allow you to manage log files: e.g. you may setup HostMonitor to remove files older than 3 months, or you may configure HostMonitor to keep just 2 log files - for previous and current month."
4) I click the link "Log processing" to learn more about these log file options.

There is nothing here that talks about the option to "Automatically change the log each month"

So... where should I have looked & clicked to find this information? Obviously Logs & Reports and Log Processing was not the correct way to go....
KS-Soft wrote:
P.S. the F1 Help gives me "Windows API Error. Error description not available" -- any suggestions there (I know this should be a different thread)
Please read the following article http://www.ks-soft.net/cgi-bin/phpBB/vi ... php?t=2847
Perfect -- I'll give that a shot. Thanks for the awesome support and product!!!

- Scott
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

I've been a long-time customer... maybe this option was added after I did the installation
This option was implemented about 6 years ago in version 1. We just changed RadioGroup to ComboBox.
Is it possible to do something similar for the private logs?
Yes, you may use variables for Private logs as well
Well, I did waste two hours getting this to work. And I didn't fall off the apple cart yesterday. I really tried to use all the resources available to me, yet I failed. I think this indicates some type of documentation problem
I will see what we can do. On the other hand.. I don't remember somebody else had problems with this option :roll:
May be you just missed coffee this morning? :wink:
1) I go to your web site, pull up the On-line manual.
2) I click on "Logs & Reports" on the left side menu.
3) I go to the section titled "Log Processing". It says "Log processing options allow you to manage log files: e.g. you may setup HostMonitor to remove files older than 3 months, or you may configure HostMonitor to keep just 2 log files - for previous and current month."
4) I click the link "Log processing" to learn more about these log file options.
Why didn't you click "Log settings" link? Or simply look at options in the dialog window?
Perfect -- I'll give that a shot. Thanks for the awesome support and product!!!
You are welcome :)

Regards
Alex
sneader
Posts: 90
Joined: Thu Dec 22, 2005 3:32 pm

Post by sneader »

KS-Soft wrote:
Is it possible to do something similar for the private logs?
Yes, you may use variables for Private logs as well
I'm probably going to regret asking this... but how can I do this? The thread started when I said I had used the variables, but the file was saved literally with the variable name, not with the date. My research indicated that I must check the box to "Resolve Macros" but I could not find this option... so here we are again. :)

There is no "Automatically Change the Logs" option for Private Logs, that I can find ??
KS-Soft wrote:
Well, I did waste two hours getting this to work. And I didn't fall off the apple cart yesterday. I really tried to use all the resources available to me, yet I failed. I think this indicates some type of documentation problem
I will see what we can do. On the other hand.. I don't remember somebody else had problems with this option :roll:
May be you just missed coffee this morning? :wink:
Maybe some other people will chime in, now or in the future... maybe many people out there are NOT rotating their logs... I do not know. I found it very difficult to find this information, I guess I am dumb. :oops:
KS-Soft wrote:
1) I go to your web site, pull up the On-line manual.
2) I click on "Logs & Reports" on the left side menu.
3) I go to the section titled "Log Processing". It says "Log processing options allow you to manage log files: e.g. you may setup HostMonitor to remove files older than 3 months, or you may configure HostMonitor to keep just 2 log files - for previous and current month."
4) I click the link "Log processing" to learn more about these log file options.
Why didn't you click "Log settings" link? Or simply look at options in the dialog window?
Isn't changing the logs each month a "Log Processing" function? And under "Log Processing" you go into great detail on how you can copy and move and rename the log files, etc. I believe you need to at least mention the "Automatically Change the Logs..." options here under Log Processing. It is just an HTML link, eh?

As far as why I didn't look in the dialog options... is it really that obvious?

The section of the Primary Log dialog box says: "File log" (what does that even mean?) and the drop down menu shows one option, which is "Log to Specific File". That option seemed good to me, I didn't even try to click it to see what else was there. I had no idea that by clicking the drop-down menu I would see some options for processing log files daily, weekly or monthly? Again, I apologize for being dumb, but it was not obvious to me (or if it were, I'd have done it and not bothered you so much today LOL)

Anyway, once I get the Private Log file rotation figured out, I will try to leave you alone for a while. :P

- Scott
sneader
Posts: 90
Joined: Thu Dec 22, 2005 3:32 pm

HTML Help

Post by sneader »

Security patches for Windows lead to the following problem: HostMonitor cannot display help when running as Win32 service.
http://support.microsoft.com/kb/896358

Solution - you should add 2 DWORD variables into registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp\1.x\HHRestrictions
1) EnableFrameNavigationInSafeMode = 1
2) EnableNonInteractiveUser = 1
and restart service

If you do not have HHRestrictions key in the registry, you may create it.
Running Windows 2000 Server here. I do not have:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp

Should I create HTML Help, then create 1.x, then create HHRestriction ?

- Scott
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Running Windows 2000 Server here. I do not have:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp
Should I create HTML Help, then create 1.x, then create HHRestriction
Yes, you may create key by yourself

Regards
Alex
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

The thread started when I said I had used the variables, but the file was saved literally with the variable name, not with the date.
You was talking about Common Log.
Private log does not have special options for this purpose, so simply type file name like c:\hostmon\logs\%MMYYYY%.htm
The section of the Primary Log dialog box says: "File log" (what does that even mean?)
Quote from the manual
===========
For each log you may choose defferent log type (ODBC or File)
...
First you should decide what type of the log do you need: File or ODBC and choose logging mode that will be used for all test items.
Log type
None
Choose this option if you are really sure you don’t need a log
File
Record test results into a file stored on local hard driver is a fast and most reliable solution. HostMonitor supports three different data formats: plain text, HTML and DBF.
ODBC
Starting with version 3.0, HostMonitor can write log information into database using any ODBC driver installed on your system (e.g Oracle, MS SQL or MySQL database). It’s a very flexible solution - you may define table structure and choose type of the fields to fit your needs. However you must be sure that ODBC driver (provided by 3rd party) works reliable and will not cause HostMonitor to crash.
E.g. Microsoft dBase Driver v 4.00 causes resource leakage; Oracle driver v8 may crash application.
===========
Maybe some other people will chime in, now or in the future... maybe many people out there are NOT rotating their logs...
May be...

Regards
Alex
sneader
Posts: 90
Joined: Thu Dec 22, 2005 3:32 pm

Post by sneader »

Private log does not have special options for this purpose, so simply type file name like c:\hostmon\logs\%MMYYYY%.htm
I see my problem now... I thought I read somewhere that HostMon replaced any MM DD YY characters inside the % -- % with the correct values.... so I assumed I could change it around like:

c:\hostmon\logs\%YYMMDD%.htm

I would like to be able to sort the files by YEAR, then MONTH (obviously the DD idea was bad, don't need to know the date on a monthly log).

Is this possible? If not, then I'll just use what works... if MMYYYY works, then that is what I will use.

EDIT: In fact, using the correct variable, %MMYYYY%, it works fine (of course). Sorry Alex!

Thanks!

- Scott
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

I would like to be able to sort the files by YEAR, then MONTH (obviously the DD idea was bad, don't need to know the date on a monthly log)
Yes, you can do that. Use %YYMM% variable

Regards
Alex
Post Reply