Skip to main content

Lightweight OS-agnostic observability UI for PyNinja

Project description

PyObservability

Python

Platform Supported

Platform

Deployments

pypi docker

Pypi Pypi-format Pypi-status

Kick off

Recommendations

Install PyObservability

python -m pip install pyobservability

Initiate - IDE

import pyobservability


if __name__ == '__main__':
    pyobservability.start()

Initiate - CLI

pyobservability start

Use pyobservability --help for usage instructions.

Containerized Deployment

docker pull thevickypedia/pyobservability:latest

docker run \
    --name observability \
    -p 8080:80 \
    -v /home/user/config:/config \
    --restart=no \
    thevickypedia/pyobservability

Environment Variables

Sourcing environment variables from an env file

By default, PyObservability will look for a .env file in the current working directory. Other file options (like JSON and YAML) are supported with a custom kwarg or env var env_file pointing to the filepath.

Mandatory

  • TARGETS - Target URLs running PyNinja in the following format.
    • TARGETS='[{"name":"node1","base_url":"http://192.168.1.10:8000","apikey":"token1"},{"name":"node2","base_url":"http://192.168.1.11:8000"}]'

Defaults

  • HOST - Host IP to run PyObservability. Defaults to 127.0.0.1 or 0.0.0.0
  • PORT - Port number to run PyObservability. Defaults to 8080
  • INTERVAL - Polling interval to retrieve server information.

Optional

  • USERNAME - Username to authenticate the monitoring page.
  • PASSWORD - Password to authenticate the monitoring page.
  • TIMEOUT - Timeout (in seconds) for UI authentication. Defaults to 5m.

Logging

PyObservability uses uvicorn logger by default. Following options can be used to override the default logger.

  • LOG - Lazy logger to use a custom log format. Can either be file or stdout.
  • DEBUG - Enables debug level logging. Defaults to False.
  • LOGS_PATH - Directory path to store log files if LOG is set to file.
  • LOG_CONFIG - Path to a custom logging configuration file.

Uptime Kuma

Uptime Kuma integration can be enabled by setting the following environment variables.

  • KUMA_URL - Base URL of the Uptime Kuma server.
  • KUMA_USERNAME - Username to authenticate with Uptime Kuma.
  • KUMA_PASSWORD - Password to authenticate with Uptime Kuma.
  • KUMA_TIMEOUT - Timeout (in seconds) for Uptime Kuma authentication. Defaults to 5s.

License & copyright

© Vignesh Rao

Licensed under the MIT License

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

pyobservability-2.2.1-py3-none-any.whl (32.9 kB view details)

Uploaded Python 3

File details

Details for the file pyobservability-2.2.1-py3-none-any.whl.

File metadata

  • Download URL: pyobservability-2.2.1-py3-none-any.whl
  • Upload date:
  • Size: 32.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0rc1

File hashes

Hashes for pyobservability-2.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c916dc831e0fa6699132c87bdcc7a01a816b11fd4706df0b6c09cf74ac35b362
MD5 638683efd32afb990065df8ff8ee44b0
BLAKE2b-256 a39c3c578c904ba4ce8a91cd837401a96ab8aafc07dc948e0d077b26ffea4c73

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