WinDAN

From FreeNATS Wiki
Jump to: navigation, search

Overview

WinDAN is the Windows Desktop Alerter for (Free)NATS.

It is a Win32 executable built in Microsoft Visual C++ and compatible with all current versions of Microsoft Windows.

Once configured WinDAN will regularly poll a FreeNATS installation (using the Data API), display any alerting nodes (optionally with additional information) and can popup, display a taskbar icon or play a sound when new alerts are found.

Configuration Options

Options are accessed via the Tools - Options menu. The default configuration will be loaded from (and optionally saved to) a file called config.xml in the working directory. You can specify an alternative configuration file (see below).

FreeNATS URL

This is the full URL to the FreeNATS installation including trailing slash e.g. http://server/freenats/

API Script

The filename of the Data API (defaults to api.php and you shouldn't have to change that)

API Key

In order for WinDAN to access the Data API you must have configured the API for public access and optionally configured a key which if set must be provided here (see below for more details on configuring the API).

Play Sound

If enabled and a .WAV file is selected then this sound will be played when there are new alerts.

Popup on Alert

If the window is minimised to the task bar it will reopen when there are new alerts.

Start Minimised

Immediately disappear to the systray only on startup.

Fetch Node Data

If enabled then when alerts are found a second call is made to the API allowing additional data to be displayed when you click on the node in the interface.

Interval

Interval in seconds between polls of the API to find alerts.

Optional FreeNATS Credentials

If these are provided then when you click through to node details you will be automatically logged into the interface rather than being prompted to login in your browser if not already authenticated.

Using WinDAN

The first time you run the application the options screen will be displayed. Input your settings and click Apply and Save as Default

Unless disabled (it will be the first time you run as the configuration cannot be loaded) the system will poll the API at set intervals for alerts.

When a new alert is detected it will be displayed in the Alerts Pane and the systray icon will turn red (if configured the window will popup and/or a sound will be played as well).

The progress bar at the bottom shows time until the next poll for alerts - it will fill to the end and the polling will commence when it is full.

When alerting nodes are shown in the Alerts Pane clicking on them will display information in the Details Pane (either details or just a message if the Node Data option is disabled). Once a node is selected in the Alerts Pane double-clicking on the Details Pane will take you into the FreeNATS web interface page for that node.

Configuring the API

In order for WinDAN to get alerts from FreeNATS the Data API must be configured to allow access ([[Data API#Security|full details here).

To do this you must set two system variables within FreeNATS (Configuration - System Settings - System Variables)

  • api.public must be set to 1
  • api.key is an optional alphanumeric string to protect access, you set this to whatever you want within FreeNATS and then put the same string into WinDAN

Download

The latest binary version of WinDAN can be downloaded from http://www.purplepixie.org/freenats/windan/windan.zip

News of updated versions will be posted to the normal news and announcements.

Source is available from http://www.purplepixie.org/freenats/windan/windan-source.zip

Installation

To run simply extract from the archive and execute the WinDAN exe.

Please note that you will probably also need to install the Visual C++ 2008 Redist Package. You also require the .net framework though most Windows systems will have that installed (otherwise download from Microsoft).

Feedback and Support

Feedback and support are available through the normal channels, any suggestions or bug reports are very welcome.

Licence

As with FreeNATS itself WinDAN is licenced under the GNU GPL version 3 (or later if you wish).

Debugging and Testing

A debug log is available through the Tools - Debug Window menu option.

To test your sounds and other alert settings you can manually change the alert level of WinDAN through the Tools - Set Status menu option.

Alternative Configuration

To allow maximum flexibility you can specify an alternative configuration file at startup simply by passing it to the exe for example:

  • windan.exe c:\my_config.xml
  • windan.exe "c:\My Files\my_config.xml"

Will load the configuration from c:\my_config.xml and c:\My Files\my_config.xml respectively.

Any changes made and saved will be saved back to this file.

Code Environment

Source code (and associated project files etc) are for Visual C++ 2008 Express Edition as .net Common Language Runtime (CLR) Managed code.