2004-05-12 MonitorWare Agent 2.1

MonitorWare Agent 2.1 Final

  • New Services Added– DataBase Monitor Service can read a table out of a database and process each data record like other events within MonitorWare Agent.
    – SerialMonitor Service allows you to capture messages from a Serial Com or from the Printer ports. It is highly configurable and can send a Greeting message. Continue reading “2004-05-12 MonitorWare Agent 2.1”

Why does the Online Web Access Viewer displays wrong page reference?

Why does the Online Web Access Viewer displays wrong page reference?

Created 2004-04-23 by Tamsila-Q-Siddique

I am using MySQL as the underline database. The online web access viewer only displays 1 page of records even though there are 100 or more records. The page reference in the upper right hand corner says “Page 1 of 0”?

Please do the following:
There is a Boolean in the Config file “bUsingMysql” (without quotes). Set this Boolean to “true” (without quotes) as following “bUsingMysql = true” (without quotes).

Forwarding IIS Logs to a central File

Forwarding IIS Logs to a central File

Created 2004-04-02 by Timm Herget and Rainer Gerhards.

I would like to centralize IIS log files to a central log server. The files on that central server should be in the exact same format they are on the IIS machines.

This can be done with MonitorWare Agent 2.0 and above. Let’s look into the theory first: If you would like to forward IIS log files AND have them in the same format at the receiving machine, you need to make some special settings.

First of all, please note that the file monitor, when set to “W3C log files”, is optimized to extract the properties from each log line, not to forward the log literally. If you would like to forward them literally, you need to make sure that the format is set to “Standard”, which will disable all W3C-log specific handling (that would otherwise disturb the result). The syslog tag is not needed here, so it should be totally removed.

We must ensure that the send syslog action does not alter this message content. As such, we must make sure that the “Add Syslog Source when Forwarding” setting is NOT activated.

Unfortunately, that will not eliminate the tag as such from the syslog message, but we can handle this with the property replacer. As of RFC 3164, the syslog tag will be present in the so-generated message. In fact, the message will be “: <ORIGINAL line W3C>” with <ORIGINAL line W3C> literally being the line taken from the W3C log. Effectively, we end up with two extra characters (“: “) at the beginning of the line. Thankfully, we can eliminate these with the property replacer (it is capable of providing substrings of event properties). The message is in the “msg” property. So “%msg:3%” is everything from the third character position up until the end of the line (end position is not specified and so “end of line” is the default). To use the property replacer, we must just the “Write to File” action with “Custom” file format. Then, we can enter an arbriatary string that shall be written to the file. In our case, we use “%msg:3%%$CRLF%”: this instructs the write to file action to first write the original file line and then a Windows newline sequence. The later is needed because it was stripped out by the file monitor.

This looks in the dialogs as follows:

1. Sender : Forward Via Syslog Settings

The “Add Syslog Source when …”-Checkbox MUST be unchecked.

Figure 1: Forward Syslog Action Settings

2. Sender : File Monitor Service Settings

Please note that the “Syslog Tag Value” Field MUST be empty (not even a space in it).

Figure 2: File Monitor Service Settings

3. Recipient: Syslog Listener Settings

Please note that the “Enable RFC 3164 Parsing” MUST be checked

Figure 3: Syslog Listener Service Settings

4. Recipient: Write to File Action Settings

The “File Path Name” Directory must be available, MonitorWare Agent will not create it if its not present.

The “File Format” MUST be set to “Custom”. The following custom line format MUST be used:

%msg:3%%$CRLF%

Figure 4: Write to File Action Settings

With the above settings the recipient MonitorWare Agent  will successfully generate exact the same logfiles as the original ones are.

Sample Configurations

We have created some registry files for both the sender and the recipient server. If you download them, simply import them into the registry on the machine in question (if you system is a default-install, double-clicking the file is sufficient to do this). Be sure that the MonitorWare Agent client is closed while you do this. Please note that the sample configurations MUST be customized in order to make them work for you.

Sample configuration for MonitorWare Agent 2.0

Please note: samples may not work with versions other than the one specified in the download link!

How can I use a second sound card with the Play Sound Action?

How can I use a second sound card with the Play Sound Action?

Created 2004-03-25 by Tamsila-Q-Siddique

I have got a second sound card on my machine, how can I use it with the Play Sound Action?

PlaySounds action plays a sound on the local machine. It is possible to play wave files and some other “system” supported soundfiles. This does “NOT” include mp3 files. As MonitorWare Agent is usually running “as a” System service, there are some things which needed to be noted!

On machines with more then ONE sound card, the MonitorWare Agent Service will take the “first active installed soundcard as output device regardless what is configured”. This behaviour is further explained by Microsoft Q255584 (PlaySound API).

If there is a need to play the sound on another sound card instead of the first active installed one, then there are two workarounds:

  1. Specify a “User Account” for the Service which has a local profile where the sound card you want to use configured as primary playback device.
  2. Run the MonitorWare Agent Service in console mode using the “-r” switch under a user account which has the sound card you want to use configured as primary playback device.

By following the above mentioned work around, you would be able to use second sound card (even x sound cards where x is user configurable) with the Play Sound Action.

Please Note: The following things are user configurable in the Play Sound Action.

Filename of the Soundfile – A full path and filename to the wave file which will be played. If the sound file specified here cannot be found or is not a valid wave file, a simple system beep will be played.

Playcount: Default is 1 – can be configured up to 100 times.

Delay between the sound plays – Only useful if the sound is played more then once.Between each play, MonitorWare Agent will wait for this time until it plays the sound again.

Note: A prior running sound will be aborted when this action is executed.

How to install MonitorWare Agent in silent mode?

How to install MonitorWare Agent in silent mode?

Created on by Andre Lorbach.

Because MonitorWare Agent is using the Windows Installer (MSIE) it is very easy to start the Installation in silent mode.
There are two ways to do it.

1. Using the MonitorWare Agent msi-file (Only possible if Windows Installer version 2.0 is installed on the target machine)
The msi-file has to be started with the following command line options (Using a sample File location):
msiexec /i C:\SetupFileName.msi /qn

2. Using the WinSyslog setup-file (Only necessary if Windows Installer 2.0 isn’t installed – a reboot might be necessary).
The setup-file has to be started with the following command line options (Using a sample File location):
SetupFileName.exe /v”/qn” /s

For more informations about the Windows Installer command line options see: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/hh/msi/app_73eb.asp.

Forwarding Windows Events via stunnel to a UNIX/Linux syslogd

Forwarding Windows Events via stunnel to a UNIX/Linux syslogd

Article created 2004-02-04 by Rainer Gerhards.

Windows Event Log data can securely be forwarded to a UNIX/Linux based syslogd via stunnel. This article describes why and how this can be done. It is a mini-howto that primarily focusses on the Windows side because there are many good descriptions for the UNIX/Linux side.

The free stunnel project provides a way to use ssl communication for any non-ssl aware client and server (daemon).

This is done much like a wrapper. Both on the client and on the server machine, tunnel portals are created. The non-ssl aware client and server software is configured to not directly talk to the remote partner, but to the local (s)tunnel portal instead. Stunnel, in turn, takes the data received from the client, encrypts it via ssl, sends it to the remote tunnel portal and that remote portal sends it to the recipient process on the remote machine. The transfer to the portals is done via unencrypted communication. As such, it is vital that the portal and the respective program that is talking to it are on the same machine, otherwise data would travel partly unencrypted.

Tunneling, as done by stunnel, requires connection oriented communication. As such, classical UDP-based syslog can not be used for tunneling. Consequently, you need to use a Syslog implementation that supports TCP, either non-standard raw TCP or one of the newer standards like RFC 3195 (RFC 3195 supports encryption by itself, so it is best to check first if your application supports this – if it does, this is better than setting up a tunnel). Fortunately, Adiscon products support both raw TCP syslog as well as RFC 3195, so you can talk to whatever you have on the UNIX/Linux side.

For this article, I assume that you run syslog-ng on the UNIX/Linux side. It supports raw TCP, only, so this is the mode of choice. I selected this scenario because syslog-ng is quite common and chances are good that you will use it if you think about securely transfering Syslog data to UNIX/Linux. Please note that the stock syslogd does NOT support connection oriented (TCP) syslog, so you need to replace it by something else if you would like to use stunnel.

As I wrote, I try not to duplicate the UNIX/Linux side howto’s available. There is a good one for syslog-ng at http://www.stunnel.org/examples/syslog-ng.html. I will use the settings from this tutorial while setting up the Windows side. Please read through it, and understand how stunnel works before proceeding. If you are more a UNIX/Linux-type admin, it may be a good idea to create a UNIX/Linux only lab according to this howto – this will get you aquainted to the software.

I suggest that you set up your UNIX/Linux environment before proceeding.

You can fully utilize your stunnel knowledge on Windows, because there is an excellent and fully equivalent port available. These are distributed as binaries at http://www.stunnel.org/download/binaries.html – download your copy before proceeding. Copy the files to a location of your choice. If in doubt what you need, download the latest stunnel binary as well as the ZIP file with the openssl libararies. Place everything in the same directory, e.g. c:\bin\stunnel. Please note that the stunnel binary (eg. stunnel-4.04.exe) is the actual stunnel program and NOT a self-extracting exe program.

Once you have done this, you only need to supply stunnel with a correct configuration file. You can use the one from the stunnel UNIX/Linux tutorial, step 5. Make sure that you not only copy over the config file but also the needed .PEM files. You probably need to change the pathes in the stunnel.conf file to reflect your local Windows directory structure.

Once you have the config file ready, you can start the Windows stunnel. Please note that it by default starts interactively. If all goes well, there is a small icon in the icon tray. Double-Click it to get a status window. If something goes wrong, the status window automatically appears with a nice error message.

Let’s assume all went well. What is left is that we must tell the event log monitor where to forward events to. This method applies to both the EventReporter and the MonitorWare Agent product. Both of them allow forwarding events via the “forward syslog” action. You need to configure this action to use TCP for the transport. Then, you must set the address of the syslog server (receiver) to 127.0.0.1, the local machine. This is important, because you will no longer directly talk to the remote server but to the local stunnel portal instead! The port number must be set to where the stunnel portal is listening, port 514 in this example.

Please note that it may be clever to change this port number to something different form 514 (e.g. to 2514) because 514 may conflict with a syslog server process running on the same machine. If you change it, make sure that you change it both in EventReporter or MonitorWare Agent AND the client stunnel.conf file. I am sticking with the default of 514 soley because I would like to keep things as consistent with the UNIX/Linux tutorial as possible.

Once you have configured the event log monitor, you can restart the EventReporter or MonitorWare Agent service and should see messages traveling via the stunnel (assumed that the UNIX/Linux server part is already running…).

The remaining thing needed to do is to set stunnel to run non-interactively as a Windows service. This can be done with “stunnel.exe -install”. If in doubt, see the stunnel documentation.

If you have sucessfully followed these steps, you have a logging system that extracts Windows event log data and securely forwards it to a central syslog daemon on UNIX/Linux. Please note that you could also transfer IIS logs, other text files, database contents and a wealth of other important state information if you use MonitorWare Agent. As the stunnel works in combination with the “forward syslog” action, you can use it together with any data source supported by the product.

If you can’t find the links…

Don’t worry! I am used to disappearing sites and information. As such, I have cached a (PDF) copy of the UNIX/Linux syslog-ng stunnel tutorial, the stunnel windows binary, the stunnel source and the openssl binaries at the time of this writing. This material is kind of last resort and most probably outdated. I strongly recommend visiting www.stunnel.org to get it directly from the source.

How can I copy the current configuration to the other servers?

How can I copy the current configuration to the other servers?

Created 2004-01-26 by Tamsila-Q-Siddique

I have got “x” number of copies of EventReporter, MonitorWare Agent or Winsyslog. How can I copy the current configuration to the other servers so we can save time? I want to copy all of the services and rulesets I’ve setup on my server.

Please do the following:

  1. Go to Computer Menu-> Export Settings to Registry-File (Not Binary).
  2. Save this registry file.

Now put this registry file in a shared folder. Then on each computer you would just have to double click on it. When you double click on this registry file it would simply import your registry settings into EventReporter, MonitorWare Agent or WinSyslog. When you open the EventReporter, MonitorWare Agent, or WinSyslog you would see your configured rules and services.

Note: If you are using Windows XP / Windows 2000 and want to export your settings from EventReporter, MonitorWare Agent or WinSyslog to WinNT 4.0 machine then follow the following steps:

  1. Start -> Run.
  2. Type “regedit” and click ok – Now the Registry Editor is opened.
  3. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Adiscon\EventReporter (MonitorWare Agent or WinSyslog) click on the “EventReporter” (MonitorWare Agent, WinSyslog) folder.
  4. Go to Registry Menu -> Export Registry File…
  5. Now give the file a name, like “myeventconfig” and change the “Save as type” to “Win9x/NT4 Registration Files (REGEDIT4)”.

Now you have a registry file that can be used for distributing your configuration across your WinNT 4.0 machines. If you don’t follow this procedure, you will not be able to distribute your Windows XP / Windows 2000 registry file to NT machines.

Do I need a new Key for an Upgrade?

Do I need a new Key for an Upgrade?

Created 2004-01-23 by Tamsila-Q-Siddique

Will the same key work when I upgrade from 1.x version to 2.x version?

You can use this license key for any 1.x version of MonitorWare Agent. But this license key will not work if you want to upgrade from 1.x to 2.x and it will also not work if you want to switch from e.g. professional edition to enterprise edition. It calls for a new license. If you had got a new license and aren’t sure what to do follow these simple procedure.

Note1: But if you have got an UpgradeInsurance ID please contact support@adiscon.com for further details.

Note2: We assume you already have installed the trial version. If you do not have it installed, please visit the product web site and download and install the product first.

  1. Download MonitorWare Agent from http://www.mwagent.com/en/Download/
  2. After downloading the software start the client application.
  3. Switch to the “License” tab.
  4. Enter the License Name and License Key into the respective fields.
  5. Click “OK”

This process will switch the product from the trial version to the licensed one. Be sure to enter the license name and license key exactly as provided by us. Remember that the license key information is case-sensitive. Documentation on how to enter the license key is in the manual. If you still encounter problems, please go throught this License Information FAQ.

Note3: Different Editions and Versions of MonitorWare Agent are availabe.

What does Event ID 1011 mean?

What does Event ID 1011 mean?

Created 2004-01-16 by Tamsila-Q-Siddique

What does event 1011 mean?

Our MonitorWare Line of Products e.g. EventReporter, MonitorWare Agent etc. periodically reads the Windows Event Log. While reading the Windows Event Log, they try to read the last record that was processed in the last run. We had opt for this, because if the last record doesn’t exist, then either someone had messed up with the Windows Event Log or the Windows Event Log was truncated. When MonitorWare Line of Products can not read the last record, then two things happen:

  1. MonitorWare Line of Products send an Event ID 1011 to the Application Event Log stating that the Log has been truncated (this can be disabled by unchecking the “Report Log Truncation” checkbox in the configuration program).
  2. MonitorWare Line of Products re-set the counter to the begining of the Windows Event Log.

Number 2 is done because there is no better way to resume processing, especially when the last record could not be found (it would be guessing where to begin). Please note that this can lead to message duplication.

This condition is normal when someone has cleared the event log in question. However, if that is not the case, seeing an 1011 event is a good indication that somebody has messed up with the event logs.

If you receive multiple 1010 events and you know this is fine based on your configuration, you may want to look at our step-by-step guide to limiting the number of consecutive events received.