Skip to content

JosephKY/outagerecorder

Repository files navigation

Outage Recorder

Outage Recorder is a lightweight ping utility made entirely in JavaScript.

Abilities

  1. Ping multiple IP addresses at the same time
  2. Automatically record outages with configurable outage thresholds
  3. Automatically record all-time ping history
  4. Colorful ping logs based on the ping's performance
  5. Choose between a traditional ping log feed or a graph
  6. Perform periodic download speed tests

Media

Graph Log Outage in Graph Log
Traditional Log Outage in Traditional Log

Usage

Prerequisites: You must have Node.JS installed

Easy way: Double click run.bat or run.sh depending on your system. It will install the required packages and run index.js for you.

Long way: Run npm i to install the required packages, then run node index.js.

Take a look inside of config.js if you wish to change some settings, such as the IPs being pinged, the timeout duration, and the outage threshold.

Configuration

These are the options you can find in config.js:

Configuration Key Data Type Description Example Terminal Parameter
ips array (string) The IP addresses you want to ping. Leave blank to be prompted for IP addresses on startup [ "8.8.8.8", "1.1.1.1" ] --ips, -i
timeoutCountForOutage integer The number of times all the IP addresses being pinged must time out in order for an outage to be declared. 5 --maxtimeout, -m
nonOutageIps array (string) The IP addresses in the `ips` option that don't need to time out in order for an outage to be declared. ["1.1.1.1"] --nonoutageips, -n
outageFolder string The folder directory where you want to store outage logs. Leave blank to disable outage logs. "C:\Users\John Doe\Documents\Outage Logs" --outagedir, -o
pingDelay integer The amount of time, in milliseconds, spent between ping batches. All IPs are pinged at the same time. 1000 --delay, -d
pingTimeout integer The maximum amount of time, in milliseconds, that a ping has to return before it's considered a timeout. 3000 --timeout, -t
pingHistoryFolder string The folder directory where all-time ping logs are stored. Leave blank to disable ping logs. "C:\Users\John Doe\Documents\Ping Logs" --historydir, -h
maxPingChunkSize integer The maximum amount of ping data, for each IP, that is stored in memory before it is written to all-time ping logs. 10 --maxhistory, -x
alignLogs boolean If true and not in graph mode, keeps all the logs aligned at all times so that they don't shift left and right. false --align, -a
graphMode boolean If set to true, program will run in graph mode where ping data is shown as a graph instead of constant ping logs. Note that window sizing is not dynamic in graph mode and you'll have to adjust your terminal's window size before you begin the program. true --graphmode, -g
graphModeMaxPings integer If program is in graph mode, this is the maximum amount of pings shown and thus the max width of the X axis. If greater than window width, it will be resized down to the window width. 125 --graphmaxpings, -p
speedTestSize integer The size, in bytes, that the downloaded sample will be every speed test. Higher size means more accurate tests, but also more bandwidth consumption. Change to 0 to disable download speed tests 50000 --speedtestsize, -s
speedTestFrequency integer How many ping batches must be ran before another download speed test will be ran. 10 --speedtestfreq, -f
speedTestUnit string The unit you want the download speed test result to be represented as. Options are: "GBps", "gbps", "MBps", "mbps", "KBps", "kbps" mbps --speedtestunit, -u

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages