Skip to content

Commit 219c5d6

Browse files
Merge pull request #563 from henrywhitaker3/alpha
Add InfluxDB integration
2 parents cb5abcf + ce549b5 commit 219c5d6

File tree

80 files changed

+1051
-113
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+1051
-113
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Speedtest Tracker
22

3-
[![Docker pulls](https://img.shields.io/docker/pulls/henrywhitaker3/speedtest-tracker?style=flat-square)](https://hub.docker.com/r/henrywhitaker3/speedtest-tracker) [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/henrywhitaker3/Speedtest-Tracker/Stable?label=master&logo=github&style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/actions) [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/henrywhitaker3/Speedtest-Tracker/Dev?label=dev&logo=github&style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/actions) [![last_commit](https://img.shields.io/github/last-commit/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/commits) [![issues](https://img.shields.io/github/issues/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/issues) [![commit_freq](https://img.shields.io/github/commit-activity/m/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/commits) ![version](https://img.shields.io/badge/version-v1.11.1-success?style=flat-square) [![license](https://img.shields.io/github/license/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/blob/master/LICENSE)
3+
[![Docker pulls](https://img.shields.io/docker/pulls/henrywhitaker3/speedtest-tracker?style=flat-square)](https://hub.docker.com/r/henrywhitaker3/speedtest-tracker) [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/henrywhitaker3/Speedtest-Tracker/Stable?label=master&logo=github&style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/actions) [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/henrywhitaker3/Speedtest-Tracker/Dev?label=dev&logo=github&style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/actions) [![last_commit](https://img.shields.io/github/last-commit/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/commits) [![issues](https://img.shields.io/github/issues/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/issues) [![commit_freq](https://img.shields.io/github/commit-activity/m/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/commits) ![version](https://img.shields.io/badge/version-v1.12.0-success?style=flat-square) [![license](https://img.shields.io/github/license/henrywhitaker3/Speedtest-Tracker?style=flat-square)](https://github.com/henrywhitaker3/Speedtest-Tracker/blob/master/LICENSE)
44

55
This program runs a speedtest check every hour and graphs the results. The back-end is written in [Laravel](https://laravel.com/) and the front-end uses [React](https://reactjs.org/). It uses the [Ookla's speedtest cli](https://www.speedtest.net/apps/cli) package to get the data and uses [Chart.js](https://www.chartjs.org/) to plot the results.
66

@@ -18,6 +18,7 @@ Disclaimer: You will need to accept Ookla's EULA and privacy agreements in order
1818
- Slack/Discord/Telegram notifications
1919
- [healthchecks.io](https://healthchecks.io) integration
2020
- Organizr integration
21+
- InfluxDB integration (currently v1 only, v2 is a WIP)
2122

2223
## Installation & Setup
2324

@@ -84,6 +85,8 @@ Container images are configured using parameters passed at runtime (such as thos
8485
| `-e PUID` | Optional. Supply a local user ID for volume permissions |
8586
| `-e PGID` | Optional. Supply a local group ID for volume permissions |
8687
| `-e AUTH` | Optional. Set to 'true' to enable authentication for the app |
88+
| `-e INFLUXDB_RETENTION`| Optional. Sets the InfluxDB retention period, defaults to `30d` |
89+
| `-e INFLUXDB_HOST_TAG | Optional. Sets the InfluxDB host tag value, defaults to `speedtest` |
8790

8891
### Authentication
8992

@@ -101,3 +104,7 @@ After enabling, you should change the password through the web UI.
101104
### Manual Install
102105

103106
For manual installations, please follow the instructions [here](https://github.com/henrywhitaker3/Speedtest-Tracker/wiki/Manual-Installation).
107+
108+
### Kubernetes
109+
110+
There is a 3rd party helm chart available [here](https://github.com/sOblivionsCall/charts).

app/Actions/GetFailedSpeedtestData.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace App\Actions;
44

5-
use App\Speedtest;
5+
use App\Models\Speedtest;
66
use Cache;
77
use Carbon\Carbon;
88
use DB;

app/Actions/GetLatestSpeedtestData.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use App\Helpers\SettingsHelper;
66
use App\Helpers\SpeedtestHelper;
7-
use App\Speedtest;
7+
use App\Models\Speedtest;
88
use DB;
99
use Henrywhitaker3\LaravelActions\Interfaces\ActionInterface;
1010

app/Actions/GetSpeedtestTimeData.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace App\Actions;
44

55
use App\Helpers\SettingsHelper;
6-
use App\Speedtest;
6+
use App\Models\Speedtest;
77
use Cache;
88
use Carbon\Carbon;
99
use Henrywhitaker3\LaravelActions\Interfaces\ActionInterface;

app/Console/Commands/ClearOldSessionsCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace App\Console\Commands;
44

5-
use App\Auth\LoginSession;
5+
use App\Models\Auth\LoginSession;
66
use Carbon\Carbon;
77
use Illuminate\Console\Command;
88
use Log;
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
namespace App\Exceptions;
4+
5+
use Exception;
6+
7+
class InfluxDBConnectionErrorException extends Exception
8+
{
9+
//
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
namespace App\Exceptions;
4+
5+
use Exception;
6+
7+
class InfluxDBNotEnabledException extends Exception
8+
{
9+
//
10+
}

app/Helpers/BackupHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace App\Helpers;
44

5-
use App\Speedtest;
5+
use App\Models\Speedtest;
66
use Cache;
77
use DateTime;
88
use Exception;

app/Helpers/EmailVerificationHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace App\Helpers;
44

5-
use App\Auth\EmailVerification;
6-
use App\User;
5+
use App\Models\Auth\EmailVerification;
6+
use App\Models\User;
77

88
class EmailVerificationHelper {
99
public static function checkVerificationAttempt($userID, $token)

app/Helpers/SettingsHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace App\Helpers;
44

55
use App\Events\TestNotificationEvent;
6-
use App\Setting;
6+
use App\Models\Setting;
77
use Cache;
88
use Carbon\Carbon;
99

0 commit comments

Comments
 (0)