Setting Alarms

Please note that, as an option is available to reboot the router if unusual line stats are noticed, the alarm options are used entirely at your own risk. Because I am on a poor ADSL-Max line, I'm reluctant to continually connect and disconnect unnecessarily. Consequently, I have only been able to give this part of RouterStats limited testing.

Alarm Setpoints

Up to four simple alarm setpoints can be configured:

Ordinarily, the most useful of those would be when the Noise Margin or Sync Speed falls below a set value. I've included the high-value alarms because the router can sometimes report very high values in error - usually when a value has actually gone negative. In particular, Noise Margin values up in the 32,000,000 region are sometimes seen when the true value is actually being measured as a negative figure.

As shown in the picture above, each of the alarm options is selectable with a checkbox. In addition, a delay can be introduced so the alarm condition must remain for a set period of time.

Logically, this delay period would be set to be at least twice as long as the main sampling interval timer to ensure that at least two consecutive samples return the same result before an alarm is triggered.

However, RouterStats allows you to set this delay to as small as you wish so use after some thought and care!


In addition to the four simple alarm setpoints which trigger at absolute values, RouterStats keeps a running average of the Downstream Noise Margin figure over a certain number of samples.

If the Rx Noise Margin has increased... and/or the Rx Noise Margin has decreased... checkboxes are checked, any Noise Margin change which exceeds the set percentages will trigger the alarm. This allows RouterStats to ignore a slowly changing Noise Margin figure while reacting to larger changes which occur over a short period of time. This could be useful to monitor sudden unexpected changes but to ignore the gradual changes that occurs at night and in the morning.

The fewer samples that are used to calculate the average, the more "sensitive" to changes these triggers will be. The number of samples can be set between 5 and 1000. Note that the alarm will not become "enabled" until at least the set number of samples have been plotted because RouterStats needs to establish what the running average value is.

The values shown in blue (For example: ( 8.2 dB ) in the image above) indicate the current alarm trigger values based on the percentage setting of the current "running average".


For the Netgear DG834 series of routers, RouterStats can monitor the router's connection status and trigger the alarm if the status is 'Disconnected'. Monitoring the Sync Speed is a good indicator of total loss of ADSL but loss of the ppp session to the ISP can result in the router having Disconnected status while retaining the normal Sync Speed.

Alarm Actions

In this section, you can choose what actions to take when an alarm is triggered.

If more than one Alarm Action is selected, they will occur in the following order:


Reboot router

When Reboot router is checked, an Alarm trigger will cause the router to instantly drop the connection and reboot. No warning is given. The Reboot Now button will also cause the router to reboot when it is pressed but a confirmation message is displayed first.


The Audible Alarm is fairly obvious. If you're on hand, you can attend to the router manually.


Send e-mail

RouterStats can send an e-mail when the alarm is triggered. The contents of the e-mail can be a copy of the log (if a log is enabled), a snapshot of the current Rx Noise graph and a snapshot of the current Rx Sync Speed graph. These message attachments are selected individually on the E-mail Tab of the main configuration.


Write to log

If the log is enabled or the alarms are written to a separate alarm log file, (see Configuration below), RouterStats maintains a buffer containing the current values being monitored. If Write to Log is checked, this buffer will be written to the log when an alarm occurs. If the log is configured to log every sample, this option isn't really required. But, if the log is set to record data at less frequent intervals, it could be useful to force RouterStats to log the buffer when an alarm occurs.


Run external script or application

If this option is selected, RouterStats can launch an external .exe application, run a .bat batch file or execute a simple Telnet Script file (extension .sh). A script can only consist of either comment lines beginning with a #, blank lines or actual command lines.

For example:

# sample script file

ifconfig
cat /proc/meminfo
Running scripts is well out of my "home territory" but I included the facility in case someone wants to play with it.


Timers & Limits Tab

Because systems using ADSL-Max are 'aware' of the number of reboots a router performs, RouterStats provides the option to limit this number in a specified period. Check the checkbox and enter the number of times in the Don't reboot more than ___ times section and select either the per hour or per day radio button.

Note that the elapsed time is only 'remembered' while RouterStats is open. If RouterStats is closed and re-opened, the timing period and the number of previous re-boots are reset to zero.

If RouterStats is configured to reboot the router and send an e-mail, the e-mail has to be sent first in case the router won't re-connect after the reboot. RouterStats waits until the e-mail has been sent but, if your smtp mail server is down, it could be waiting for ever. To prevent RouterStats being locked in this waiting state, an over-riding timeout is provided. RouterStats will continue and reboot the router after this period whether the e-mail has been sent or not. You can set the timeout in the Email failure timeout box.

The Only send one e-mail checkbox works in conjunction with the Show icon when e-mail has been sent checkbox in the main e-mail configuration section. Once RouterStats has sent an e-mail and displayed the Icon, no more e-mails will be sent until the Icon is reset (by clicking on it).

Anti-cycle timer

Even with the delay set in the Alarm Setpoints section, it is possible for the alarm to be triggered again while the router is still rebooting. To prevent the router getting locked in an endless cycle, an 'Anti-Cycling timer' is included. Set this to allow time for the router to reboot and re-establish a connection with the ADSL network. Although it has a minimum time of 1 minute, I would recommend using nearer 5 minutes.

Although mainly to prevent the above situation, this timer is applied to all the alarm actions to prevent them continually triggering the alarm if the 'fault' persists.

Alternatively, by checking the Only trigger alarm action once checkbox, the alarm will be inhibited from 'triggering' again while the current alarm condition persists. As soon as the alarm condition clears, the inhibit is removed and the alarm will be free to trigger again.


Configuration

The Alarm configuration is included on the Alarms Tab for convenience instead of hiding it on the main configuration window.

The default action of RouterStats is to obtain the data which triggers the alarms from the router's webpage interface in the same way as the graphs are plotted. However, if the Netgear telnet option is selected, you can choose whether to obtain the alarm data from the webpage data or from the telnet data by selecting the appropriate radio button.

The Telnet data is inherently more reliable so I would recommend DG834(G) users to use the Telnet data - especially if the alarm is going to be used to trigger a router reboot.

If the Use webpage data radio button is selected, you need to enter the URL to the webpage which initiates a reboot. The default Netgear URL is already in the box.

(Note that monitoring the connection status and the Noise Margin percentage change is always through the http interface)

If the Alarm is to be written to the log, you can elect to use a separate log for the alarm messages.