Skip to main content

Checker to determine if all is well

Project description


Python 3 is required:

$ pip install netwell


Given a netwell checkup file

from netwell.checkers import URL, DNS, Port, Repo

URL('') \
    .redirects_to('') \
    .title_matches('Free Software Foundation') \
    .has_header('Content-Type', 'text/html;charset=utf-8')
Port('', 443).ssl_valid_for(days=3000)
DNS('', '').resolves_to('')

def custom_check(response, outcome):
    data = response.json()
    if data:'Other data expected')


Then, run:

$ netwell /some/where/
Checking that redirects to OK
Checking that title matches "Free Software Foundation"... OK
Checking that has header "Content-Type": "text/html;charset=utf-8"... OK
Checking that SSL at is valid for at least 3000 days... ERROR
ERROR: Not valid after 2016-10-13
Checking that resolves to OK
Checking that resolves to OK
Checking that / has 1 GB free space... ERROR
ERROR: Only 0.5 GB free
Checking that /var/log/syslog was modified after 2015-12-27 22:21:05.873355... OK
Checking that passes custom_check... ERROR
ERROR: Other data expected
Checking that repository /home/deploy/src/project is clean... ERROR
ERROR: Untracked files found

Use –quiet to only output the error messages, if any.

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

netwell-0.4.0.tar.gz (6.7 kB view hashes)

Uploaded source

Supported by

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