Skip to main content

Polymonitor can be used as a stand alone CLI tool to quickly check the status of a URL or as a plugin for polybar.

Project description

Polymonitor

Polymonitor can be used as a stand alone CLI tool to quickly check the status of a URL or as a plugin for polybar.

Installation

Use the package manager pip to install polymonitor.

$ pip install polymonitor

Alternatively you can clone the git repository and use Poetry to install it.

$ git clone https://github.com/hegelocampus/polymonitor
$ cd polymonitor
$ poetry install

Usage

polymonitor --help 
usage: Displays site status for polybar. [-h] [-s] [-c] [-u URLS [URLS ...]]

optional arguments:
  -h, --help            show this help message and exit
  -s, --symbolic        Displays the results as symbols
  -c, --compact         Reduces the results into a more compact package
  -u URLS [URLS ...], --urls URLS [URLS ...]
                        Pass in URLs to monitor

A basic use case would be quickly printing the status of web-apps you'd like to check on:

$ polymonitor -cu duckduckgo.com google.com google.com/404
Up: 2 Down: google.com/404

Note that you do not need to preface the URLs with a protocol (e.g., https://). If you do not provide a full URL https:// will be prefixed to your URL before it is pinged.

You can leave off the -c flag for more verbose output:

$ polymonitor -cu duckduckgo.com google.com google.com/404
google.com: Up google.com/404: Down duckduckgo.com: Up

Polybar Use

If you would like to use this tool in your polybar you need to add the following to your polybar config:

[module/polymonitor]
type = custom/script
exec = polymonitor -cu duckduckgo.com google.com twitter.com cloudflare.com
interval = 10800

This is what the above configuration will generate:
Polybar Screenshot
Note that if you are using this to ping your own web-pages, you may want to raise the interval to only refresh every couple hours. The interval is specified in seconds so one hour would be interval = 3600 and the above example would refresh every three hours.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

polymonitor-0.1.6.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

polymonitor-0.1.6-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file polymonitor-0.1.6.tar.gz.

File metadata

  • Download URL: polymonitor-0.1.6.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.8.5 Linux/5.7.12-zen1-1-zen

File hashes

Hashes for polymonitor-0.1.6.tar.gz
Algorithm Hash digest
SHA256 9ddfb0821fe480188ba6b9303bc16ff1f503637e6a690d1cb1234b993f863aab
MD5 9b7eb4232c148ff292f2dfeb8dc57a41
BLAKE2b-256 09e9b2ee914200429984ce9e593c14ef4abc9a6ffdd4c5e3a2d1989f8d9e6195

See more details on using hashes here.

File details

Details for the file polymonitor-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: polymonitor-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.8.5 Linux/5.7.12-zen1-1-zen

File hashes

Hashes for polymonitor-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 faebb3b426a034ee93c2345781133e82b66b46841b575aa0930604934f10c1f5
MD5 e1b21926796fe015b0814716e5c85563
BLAKE2b-256 176a9291c60aa612038c8b8c0cfe411e025ef5e218dc2bce278925c4542dd55f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page