Counting files in a directory

General chat about HostMonitor (all messages posted before March 07, 2003 available here).
Locked
marius
Posts: 3
Joined: Wed Oct 16, 2002 6:00 pm
Location: South Africa

Post by marius »

Hi.

How can I get HostMonitor to count the number of files in a directory and when it exceeds a preset limit, it must write a message to the NT Event log and/or send out and alert?

Thanks.

Marius
marius@is.co.za
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

You can use "Count Files" test. HostMonitor can send e-mail or message to pager but it cannot write record to NT Event Log

Regards
Alex
marius
Posts: 3
Joined: Wed Oct 16, 2002 6:00 pm
Location: South Africa

Post by marius »

Thanks :smile:

I got it working. Another question (or 2) if you don't mind:

- Can I write a message to the NT Event log when the threshold is exceeded?
- How do I clear the logs?

Thanks,

Marius

<font size=-1>[ This Message was edited by: marius on 2002-10-17 01:45 ]</font>
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

>Can I write a message to the NT Evnet log when the threshold is exceeded?

Current version of HostMonitor cannot do that

>How to I clear the logs?

You can remove file, HM will create new one. Or, you can use "clear log and start over" option (located on Log Settings page in the Options dialog)

Regards
Alex
marius
Posts: 3
Joined: Wed Oct 16, 2002 6:00 pm
Location: South Africa

Post by marius »

When will HM be able to write to the NT Event log?

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

Post by KS-Soft »

Probably version 3.50 will be able do that. Version 3.40 will be available in October, version 3.50 may be in November. But I cannot guarantee

Regards
Alex
jricha34
Posts: 59
Joined: Sun Jul 07, 2002 6:00 pm
Location: USA

Post by jricha34 »

Define an external action and have it call the logevent resource kit tool and you can log your own events.

If you want to define a message source to use check out http://www.joeware.net free win32 tools and grab ELDLL which will define a message source and has some basic messages that can be used.
Locked