Difficulty configuring Private Log

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
timn
Posts: 184
Joined: Thu Nov 20, 2003 9:57 am
Location: United States

Difficulty configuring Private Log

Post by timn »

Alex:

I've read through the manual on this but I just can't seem to get HM to do what I want.

Basic desire is:

We have 60 servers. We are monitoring NT System Event Log on all 60. Currently, these 60 tests share a Private Log (text) -- D:\AHMReports\olev_%mm-dd-yy%.txt Logging mode is DEFAULT - and
default (under Options) is "write a record when test status changes".

(A sample test is shown at the bottom)

What we'd like to have happen is that every "error" (bad status) is written to the private log. But the only way to do this seems to be to also write all "good" statuses as well (i.e. logging mode FULL).

We've also tried REPLY mode, but it misses multiple occurances of the same error. For example, we had a case where status reply was:

"The server was unable to allocate from the system nonpaged
pool because the pool was empty."

This occurred a total of 12 times but was only written to private log
once because neither the status or the reply had changed.

Do you see a way to get what we want without writing ALL test results to log?


;-----------------------------------------------------------------------------
;- HostMonitor`s export/import file -
;- Generated by HostMonitor at 1/21/2005 11:00:54 AM -
;- Source file: D:\Program Files\HostMonitor4\2ndStory.hml -
;- Generation mode: Selected_Tests -
;-----------------------------------------------------------------------------


; ------- Test #01 -------


Method = NTLog
;--- Common properties ---
;DestFolder = Home\DMZ2 (Online Apps)\APPS 41 to 60\APP 50\
RMAgent = APP 50
Title = Event Log: System - APP50
Comment = APP50
RelatedURL =
ScheduleMode= Regular
Schedule =
Interval = 120
Alerts = Do nothing
ReverseAlert= No
UnknownIsBad= No
UseCommonLog= No
PrivateLog = D:\AHMReports\olev_%mm-dd-yy%.txt
PrivLogMode = Default
CommLogMode = Default
SyncCounters= Yes
SyncAlerts = No
DependsOn = list
MasterTest-Alive = 10.20.20.50 Master Connectivity - APP50
;--- Test specific properties ---
Computer = \\APP50
Log = System
Source =
CheckComp = Any
CheckType = AnyFromList
CheckID = Any
CheckDescr = AnyExceptList
CompList =
TypeList = Error
TypeList = Warning
IDList =
DescrList = ^Mbrowser was unable to retrieve^MUser Administrator at host^M
ReportMode = AllEvents
KS-Soft
Posts: 12887
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Looks like you need new logging mode, "Bad" mode...
As workaround you may use "bad" HM Script action to start external script (using ExecuteProgram action) to record only "bad" events.

Regards
Alex
timn
Posts: 184
Joined: Thu Nov 20, 2003 9:57 am
Location: United States

Post by timn »

OK, thanks Alex.

This is not a huge issue but a "it would be nice if" issue. I'll try
your work-around suggestion.
KS-Soft
Posts: 12887
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

BTW: Do you really need text log? HostMonitor provides "SQL Query" action, so you may easily log all "bad" events into any ODBC source.

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

Post by KS-Soft »

PS Windows has ODBC driver for text file

Regards
Alex
timn
Posts: 184
Joined: Thu Nov 20, 2003 9:57 am
Location: United States

Post by timn »

I am researching your suggestion but having some problems.

I've created a separate folder and used the ODBC Data Source Administrator to define a System DSN using the Microsoft Text Driver (*.txt, *.csv)

I also created an empty text file called HMLOG.TXT in the new folder and used the ODBC Admin tool to create a schema.ini file containing:

[hmlog.txt]
ColNameHeader=False
Format=CSVDelimited
MaxScanRows=25
CharacterSet=OEM
Col1=EVDATETIME LongChar
Col2=TESTNAME LongChar
Col3=STATUS LongChar
Col4=REPLY LongChar

Next, I try to test this by going to Options | Advanced Logs In the ODBC Log section, I set my source to the System DSN I just created. I then try executing TEST button. I get the following error dialog

HostMonitor
Return code: 4294967295
[Microsoft][ODBC Text Driver] System resources exceeded.
[Microsoft][ODBC Driver Manager] Driver's SQLSetAttr failed
[Microsoft][ODBC Driver Manager] Driver's SQLSetAttr failed

SQL Test Statement was:

Insert into hmlog (eventtime, testname, status, reply) VALUES (%DateTime%, '%TestName%', '%Status%', '%Reply%')



The other difficulty I see here is that -- using this method -- I won't be able to roll the logs over automatically on a daily basis using date macros.
timn
Posts: 184
Joined: Thu Nov 20, 2003 9:57 am
Location: United States

Post by timn »

It would certainly be possible to write some code that extracted entries from a database grouped by date.

It's just that with text format and auto-date rollover, no coding is needed. I just publish the text file directory under IIS, allow directory browsing and my work is done.

(Just FYI, the request I'm attempting to satisfy on this end is "Can you find a quick and simple way to gather all the event log data from all the servers and group it by technical division. That way techs can easily examine all event log data for their group of machines from a single web page. They won't have to look at the log data for other groups. We want all errors and warnings recorded in the log but none of the informational messages. Further, we want emails sent to the techs on some errors and on some warnings but not on all errors or all warnings. And, oh yeah, can we get this done by yesterday?")
KS-Soft
Posts: 12887
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

We can add new logging option.. But next month someone will ask for another option - record all bad&unknown events, then somebody will need option to save all good events and non-recurring bad events, and so on.
Probably the only good solution - add new "HostMonitor's log" action with 2 options:
- record event into common log
- record event into private log
Using "advanced mode" action you will be able to start this action exactly when you need.

Truth to say I thought next generation of HostMonitor (6.0?) will use ODBC log as common log (no HTML, Text, DBF)...

Regards
Alex
timn
Posts: 184
Joined: Thu Nov 20, 2003 9:57 am
Location: United States

Post by timn »

KS-Soft wrote:Truth to say I thought next generation of HostMonitor (6.0?) will use ODBC log as common log (no HTML, Text, DBF)...
I understand your approach here - if all log data is saved to ODBC, then the user of Host Monitor is free to develop any type of custom display application they want for that data.

While it would mean a small change on this end, I wouldn't object to heading in that direction.

I will look at logging to ODBC, then develop small display app. Thx
KS-Soft
Posts: 12887
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

I think we will implement "HostMonitor's log" action, I have added this task into "to do" list.
But I cannot do that right now, want to publish HostMonitor 5.00 Beta

Regards
Alex
timn
Posts: 184
Joined: Thu Nov 20, 2003 9:57 am
Location: United States

Post by timn »

KS-Soft wrote:I think we will implement "HostMonitor's log" action, I have added this task into "to do" list.
But I cannot do that right now, want to publish HostMonitor 5.00 Beta
Thank you - and thanks for all your efforts in making HM a great app! :D
KS-Soft
Posts: 12887
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

You are welcome :)
KS-Soft
Posts: 12887
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

There is update at www.ks-soft.net/download/hm502.zip
Please upgrade to version 5.00 Beta before applaying this update.
This version has new action "Record HM log"

Regards
Alex
timn
Posts: 184
Joined: Thu Nov 20, 2003 9:57 am
Location: United States

Post by timn »

Thanks Alex, I'm testing this new feature now - I'll let you know how it comes out.
Post Reply