Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/precurse/internet_data_usage
Python based application to pull data plan usage for different carriers such as Telus and Koodo
https://github.com/precurse/internet_data_usage
Last synced: 3 months ago
JSON representation
Python based application to pull data plan usage for different carriers such as Telus and Koodo
- Host: GitHub
- URL: https://github.com/precurse/internet_data_usage
- Owner: precurse
- License: bsd-2-clause
- Created: 2015-10-24T03:30:55.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-20T06:46:42.000Z (about 9 years ago)
- Last Synced: 2024-08-02T07:11:05.317Z (6 months ago)
- Language: Python
- Homepage:
- Size: 0 Bytes
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-influxdb - internet_data_usage - Python based application to pull data plan usage for different carriers such as Telus and Koodo (Collecting data into InfluxDB / Projects)
README
Provides an interface to pull carrier data plan usage from a simple command line.
Was originally intended to be a method to graph usage in Zabbix, but evolved into a full command line tool.
Currently supports the following carriers:
- Telus Wireline
- Koodo MobileAdditional carriers can easily be added if requested.
Installation
------
Install `internet_data_usage` from [Github](http://www.github.com) using git:git clone https://github.com/precurse/internet_data_usage.git
Install module requirements using [pip](http://www.pip-installer.org/en/latest/), a
package manager for Python.pip install -r requirements.txt
Need pip? Try installing it by running the following from the command
line:$ curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python
Command Line Usage
------$ ./internet_data_usage.py -h
usage: internet_data_usage.py [-h] {term,zabbix,influxdb} ...internet_data_usage 0.2-HEAD Copyright (c) 2015 Andrew Klaus
([email protected])optional arguments:
-h, --help show this help message and exitsubcommands:
{term,zabbix,influxdb}
valid subcommands
term all output will echo in a terminal
zabbix all output will be sent to a Zabbix server
influxdb all output will be sent to an influxdb databaseTerminal Usage
------$ ./internet_data_usage.py term -h
usage: internet_data_usage.py term [-h] [-p PASSWORD]
[-c {telus_wireline,koodo_mobile}]
[-a HTTP_USER_AGENT] [-v]
usernamepositional arguments:
username Username for account accessoptional arguments:
-h, --help show this help message and exit
-p PASSWORD, --password PASSWORD
Carrier password for account access (will prompt if
not specified)
-c {telus_wireline,koodo_mobile}, --carrier {telus_wireline,koodo_mobile}
Carrier to query from (default=telus_wireline)
-a HTTP_USER_AGENT, --http_user_agent HTTP_USER_AGENT
Defaults to 'Mozilla/5.0 (X11; Linux x86_64)'
-v, --verboseZabbix/Monitoring Usage
------$ ./internet_data_usage.py zabbix -h
usage: internet_data_usage.py zabbix [-h]
[-i {data_usage,data_use_unit,data_plan_total,plan}]
[-c {telus_wireline,koodo_mobile}]
[-a HTTP_USER_AGENT] [-v]
username passwordpositional arguments:
username Username for account access
password Carrier password for account accessoptional arguments:
-h, --help show this help message and exit
-i {data_usage,data_use_unit,data_plan_total,plan}, --item {data_usage,data_use_unit,data_plan_total,plan}
Item to request (default=data_usage)
-c {telus_wireline,koodo_mobile}, --carrier {telus_wireline,koodo_mobile}
Carrier to query from (default=telus_wireline)
-a HTTP_USER_AGENT, --http_user_agent HTTP_USER_AGENT
Defaults to 'Mozilla/5.0 (X11; Linux x86_64)'
-v, --verbose
./internet_data_usage.py -h
usage: internet_data_usage.py [-h] {term,zabbix,influxdb} ...internet_data_usage 0.2-HEAD Copyright (c) 2015 Andrew Klaus
([email protected])optional arguments:
-h, --help show this help message and exitsubcommands:
{term,zabbix,influxdb}
valid subcommands
term all output will echo in a terminal
zabbix all output will be sent to a Zabbix server
influxdb all output will be sent to an influxdb databaseInfluxdb Usage
------$ ./internet_data_usage.py influxdb -h
usage: internet_data_usage.py influxdb [-h] [-p PORT]
[-c {telus_wireline,koodo_mobile}]
[-a HTTP_USER_AGENT] [-v]
username password i_user i_pass i_host
i_dbpositional arguments:
username Username for account access
password Carrier password for account access
i_user Influxdb username
i_pass Influxdb password
i_host Influxdb hostname
i_db Influxdb databaseoptional arguments:
-h, --help show this help message and exit
-p PORT, --port PORT Port for influxdb access (default=8086)
-c {telus_wireline,koodo_mobile}, --carrier {telus_wireline,koodo_mobile}
Carrier to query from (default=telus_wireline)
-a HTTP_USER_AGENT, --http_user_agent HTTP_USER_AGENT
Defaults to 'Mozilla/5.0 (X11; Linux x86_64)'
-v, --verboseCommand line output:
------Terminal:
$ ./internet_data_usage.py term -c telus_wireline [email protected]
Carrier password (will not echo):
TelusWireline Plan: TELUS Internet 50
Usage: 49/400 GBZabbix:
$ ./internet_data_usage.py zabbix -i data_usage [email protected] password
49Influxdb:
$ ./internet_data_usage.py influxdb [email protected] mypass root root localhost internet_usage