Updated script so it now offers the choice to do specific tests. It also now logs the ISP and the IP address that was tested.
This commit is contained in:
commit
a0992e46a1
@ -1,3 +1,6 @@
|
|||||||
# Speedtest_logger
|
# Speedtest_logger
|
||||||
|
|
||||||
A basic script that uses Speedtest-cli and logs the result to a csv file
|
A basic script that uses Speedtest-cli and logs the result to a csv file
|
||||||
|
|
||||||
|
### Dependencies
|
||||||
|
Speedtest CLI: https://www.speedtest.net/apps/cli
|
||||||
@ -24,6 +24,12 @@ IP=$(echo "$INFO" | grep -oE '"ip":\s*"[^"]+"' | grep -oE '[0-9.]+')
|
|||||||
# Reported ISP
|
# Reported ISP
|
||||||
ORG=$(echo "$INFO" | grep -oE '"organization":\s*"[^"]+"' | grep -oE '"[^"]+"' | tr -d '"')
|
ORG=$(echo "$INFO" | grep -oE '"organization":\s*"[^"]+"' | grep -oE '"[^"]+"' | tr -d '"')
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
# Set WAN Number
|
||||||
|
WAN="NUMBER"
|
||||||
|
|
||||||
|
>>>>>>> e74072aff15ddfef5a49aa6a3c1a5d270925c90c
|
||||||
# Run the speedtest and parse the output
|
# Run the speedtest and parse the output
|
||||||
SPEEDTEST=$(speedtest-cli --csv)
|
SPEEDTEST=$(speedtest-cli --csv)
|
||||||
|
|
||||||
|
|||||||
13
README.md
13
README.md
@ -1,17 +1,20 @@
|
|||||||
# Speedtest_logger
|
# Speedtest_logger
|
||||||
|
|
||||||
A basic script that uses Speedtest-cli and logs the result to a csv file
|
A basic script that uses Speedtest-cli and logs the result to a csv file and to a Discord Webhook
|
||||||
<br>/br>
|
<br></br>
|
||||||
### How to Create a Discord Web Hook
|
### How to Create a Discord Web Hook
|
||||||
|
|
||||||
1) On your Discord server, right click on the text channel that you want the results to appear in and then select "Edit Channel".
|
1) On your Discord server, right click on the text channel that you want the results to appear in and then select "Edit Channel".
|
||||||
2) Select the "Intergrations" menu and then select "Webhooks".
|
2) Select the "Intergrations" menu and then select "Webhooks".
|
||||||
3) Click the blue "New Webhook" button, this will create a new Webhook with a random name.
|
3) Click the blue "New Webhook" button, this will create a new Webhook with a random name.
|
||||||
4) Clock on the newly created Webhook. This will let you change the name and set a a picute that will appear when a post is created, this can be changed to something like "Speedtest Bot".
|
4) Click on the newly created Webhook, this will let you change the name and set a a picture that will appear when a post is created, this can be changed to something like "Speedtest Bot".
|
||||||
5) Click the "Copy Webhook URL" and make a note of it.
|
5) Click the "Copy Webhook URL" button and paste the coppied URL into a text editor, this will be needed in the next part.
|
||||||
6) You can not select "ESC" at the top to exit the settings.
|
6) You can not select "ESC" at the top to exit the settings.
|
||||||
|
|
||||||
### Edit the script
|
### Edit the script
|
||||||
1) Open the Speedtest.sh or .bat file (depending if you are using the Linux verison or the Windows version) and replace the "DISCORD_WEBHOOK_URL" with the coppied Webhook URL.
|
1) Open the Speedtest.sh or .bat file (depending if you are using the Linux verison or the Windows version) and paste in the coppied Webhook URL into the "DISCORD_WEBHOOK_URL" section. Make sure the URL is pasted in between the " ".
|
||||||
2) Change the WAN "NUMBER" option, this is handy if you have multiple connections to test.
|
2) Change the WAN "NUMBER" option, this is handy if you have multiple connections to test.
|
||||||
|
|
||||||
|
### Running the Script
|
||||||
|
|
||||||
|
Once and dependancys have been installed (these will be noted in each versions README file) the script can be ran. This will run the speedtest-cli software and save the output speeds to a variable which will then be "posted" via curl to the Discord Webhook. The script can be ran manually or on a scheduled (this should be the prefered option).
|
||||||
@ -3,6 +3,7 @@
|
|||||||
A basic script that uses Speedtest-cli and logs the result to a csv file and post's the output speed to a Dicord Web Hook.
|
A basic script that uses Speedtest-cli and logs the result to a csv file and post's the output speed to a Dicord Web Hook.
|
||||||
This script was converted from the linix version and will require curl and speedtest-cli to be installed on Windows in order for it to post to Discord.
|
This script was converted from the linix version and will require curl and speedtest-cli to be installed on Windows in order for it to post to Discord.
|
||||||
|
|
||||||
|
### Dependencies
|
||||||
Speedtest CLI: https://www.speedtest.net/apps/cli
|
Speedtest CLI: https://www.speedtest.net/apps/cli
|
||||||
<br></br>
|
|
||||||
Curl: https://curl.se/windows/
|
Curl: https://curl.se/windows/
|
||||||
Loading…
Reference in New Issue
Block a user