{ "info": { "author": "Martin Peters", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: System Administrators", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3 :: Only", "Topic :: System :: Monitoring", "Topic :: Utilities" ], "description": "chksrv\n======\n\n*check-service a tool to probe and check the health of network services*\n\n*chksrv* is a tool intended to be used in conjunction with other tools (e.g. `Minitor `_)\nto check the health and availability of network services.\nOne design goal was to provide flexibility of what is checked,\nwithout the need for complex bash scripts and piping. Effectively allowing to\nwrite one check and then validating mulitple measurements afterwards.\n\nInstallation\n------------\n\n:code:`pip install chksrv`\n\nYou need at least Python 3.7 to run *chksrv*.\n\nUsage\n-----\n\n.. code::\n\n Usage:\n chksrv (-h | --help)\n chksrv --version\n chksrv tcp [options] [-p PARAM=VALUE]... [-e EXPR]... HOST PORT\n chksrv ssl [options] [-p PARAM=VALUE]... [-e EXPR]... HOST PORT\n chksrv http [options] [-p PARAM=VALUE]... [-e EXPR]... URL\n\n Options:\n -h --help Show this screen.\n --version Show version.\n -v --verbose Increases verbosity.\n -l --log-level LEVEL Defines the log verbosity [default: WARN].\n --log-file FILE Stores all log output in a file.\n -p --parameter PARAM=VALUE Defines a parameter.\n -e --expects EXPR Defines an expection expression.\n -r --retry RETRY Defines the amount of retries [default: 3].\n --timeout TIMEOUT Defines a timeout for one try in seconds [default: 10].\n\nModules\n-------\n\n.. _module-tcp:\n\nTCP\n'''\n\nThe TCP is one of the most basic check modules.\nIts purpose is to try to establish a connection\nto a standard TCP listening socket.\n\nParameters\n..........\n\n:ipv6: Specifies the IPv6 behaviour. Possible values:\n\n - :code:`True` only tries to connect to IPv6\n - :code:`False` only tries to connect to IPv4\n - :code:`'prefer'` tries to connect using IPv6 first,\n and tries IPv4 if this fails (default)\n - :code:`'fallback'` tries to connect using IPv4 first,\n and falls back to IPv6 if this fails\n\n:timeout: Specifies the socket timeout in seconds\n\nResults\n.......\n\n:tcp.success: :code:`True` if the socket connect succeded\n:tcp.con.time.perf: Fractions of seconds it took to establish\n the socket connection\n:tcp.con.time.process: Fractions of seconds of CPU time (system and user)\n the process used to establish the socket connection\n:tcp.ipv6: :code:`True` if the socket was established using IPv6\n\nSSL\n'''\n\nThe SSL module is based on the TCP module and layers\na SSL/TLS handshake on top of it, using the Python3 :code:`ssl` library.\n\n*All parameters and results from the TCP module are available in addition*\n\nParameters\n..........\n\n:ssl.use_default_context: If set to :code:`True` the SSL context is created using systems defaults.\n :code:`ssl.protocol` and :code:`ssl.ciphers` will be ignored.\n (default: :code:`'prefer'`)\n:ssl.check_hostname: If set to :code:`True` chksrv verifies if the SSL certificate commonName\n matches the connected hostname. (default: :code:`False`)\n:ssl.protocol: SSL protocol to use. Possible values:\n\n - :code:`tls` (default)\n - :code:`sslv2`\n - :code:`sslv3`\n - :code:`tlsv1`\n - :code:`tlsv1.1`\n - :code:`tlsv1.2`\n\n:ssl.ciphers: The cipher suite to use.\n Must be a valid OpenSSL cipher suite string. (default: :code:`ALL`)\n:ssl.verify_mode: SSL verify mode. cf. `ssl.VerifyMode `_ (default: :code:`CERT_OPTIONAL`)\n:ssl.verify_flags: SSL verify flags. cf. `ssl.VerifyFlags `_ (default: :code:`VERIFY_DEFAULT`)\n:ssl.ca: Directory or file containing x509 certifcates of\n trusted Certificate Authorities. By setting it to :code:`__sys__`\n *chksr* tries to load the system default trusted certificates.\n\nResults\n.......\n\n:ssl.success: :code:`True` if the SSL handshake was successful\n:ssl.con.cert: Parsed x509 certificate the server used to authenticate itself\n:ssl.con.cipher: Negotiated cipher used to this connection\n:ssl.con.compression: Compression algorithm for this connection or :code:`None`\n:ssl.con.alpn_protocol: ALPN protocol selected during the TLS handshake\n or :code:`None`\n:ssl.con.npn_protocol: NPN protocol selected during the SSL/TLS handshake\n or :code:`None`\n:ssl.con.ssl_version: Actual SSL protocol version negotiated for this connection\n or :code:`None` if no secure connection was established\n:ssl.con.server_hostname: Hostname of the server\n:ssl.con.cert.matches_hostname: :code:`True` if the server hostname matches the\n certificate commonName\n\nHTTP\n''''\n\nThe HTTP module is intended to be used to check web services,\nand relies on either the TCP or SSL module to establish\nthe underlying socket connection. Depending if the URL is\nspecified with :code:`http://` or :code:`https://`.\n\nConsequently *all parameters from either only the TCP module or both\nthe TCP and SSL module are available in addition*\n\nParameters\n..........\n\n:http.method: HTTP method of the request. Possible values:\n\n * :code:`GET` (default)\n * :code:`HEAD`\n * :code:`POST`\n * :code:`PUT`\n * :code:`DELETE`\n * :code:`OPTIONS`\n * :code:`PATCH`\n * :code:`TRACE`\n\n:http.body: Body to attach to the request. (default: :code:`None`)\n\nResults\n.......\n\n:http.success: :code:`True` if the HTTP request was successful.\n (Does not evaluate the returned status code)\n:http.resp.status: HTTP response status code (numeric)\n:http.resp.reason: HTTP response reason (e.g. :code:`Found`)\n:http.resp.version: HTTP version\n:http.resp.body: HTTP response body\n:http.resp.body_length: Actual size of the HTTP response body.\n (Does not read :code:`Content-Length` header)\n:http.resp.header.*: Collection of response headers, converted to lower-case snake_case.\n So the header field :code:`Content-Length` is available as\n :code:`http.resp.header.content_length`. If a header field appears multiple\n times in the response header (e.g. :code:`Set-Cookie`) the value\n is provided as list.\n\n\n\n\n\n\n\n", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://git.hel.freakybytes.net/martin/chksrv", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "chksrv", "package_url": "https://pypi.org/project/chksrv/", "platform": "", "project_url": "https://pypi.org/project/chksrv/", "project_urls": { "Homepage": "https://git.hel.freakybytes.net/martin/chksrv" }, "release_url": "https://pypi.org/project/chksrv/0.1.0/", "requires_dist": [ "docopt (~=0.6)" ], "requires_python": "", "summary": "A tool to probe and check the health of services", "version": "0.1.0" }, "last_serial": 4424990, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "3c3e5dffeec346596b3b8809a5c39e03", "sha256": "7717cc54a0751eb3cbb5fb985f364ac2e63b69ab9e49d9097ade0b67943c1ad1" }, "downloads": -1, "filename": "chksrv-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "3c3e5dffeec346596b3b8809a5c39e03", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 30314, "upload_time": "2018-10-28T18:34:28", "url": "https://files.pythonhosted.org/packages/6e/9f/f286cabff1d549b9ec92c11670d7109b0274f0c8afad202c620d78e51a34/chksrv-0.1.0-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3c3e5dffeec346596b3b8809a5c39e03", "sha256": "7717cc54a0751eb3cbb5fb985f364ac2e63b69ab9e49d9097ade0b67943c1ad1" }, "downloads": -1, "filename": "chksrv-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "3c3e5dffeec346596b3b8809a5c39e03", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 30314, "upload_time": "2018-10-28T18:34:28", "url": "https://files.pythonhosted.org/packages/6e/9f/f286cabff1d549b9ec92c11670d7109b0274f0c8afad202c620d78e51a34/chksrv-0.1.0-py3-none-any.whl" } ] }