Skip to main content

A CLI tool to declaratively manage your monitors across multiple kener instances in YAML.

Project description

Kener Agent CLI

License: GPL v3

kener-agent is a command-line tool for managing and applying Kener monitors defined in YAML files.
It supports multiple instances, automatic context switching, and integrates seamlessly with CI/CD workflows.


Features

  • Apply monitors from YAML files to Kener API.
  • Multi-instance configuration with default context support.
  • Auto-resolution of group monitors.
  • CLI commands for login, apply, listing, and setting defaults.
  • Fully automated releases with semantic versioning.
  • Compatible with Conventional Commits and GitHub Actions for automated release notes.
  • PyPI package for easy installation.

Installation

Install via PyPI:

pip install kener-agent

After installation, the CLI command kener-agent is available globally.


Configuration

The tool stores its configuration in YAML format at:

~/.config/kener-agent/config.yml

Example configuration

default: dev
instances:
  dev:
    host: 10.10.3.1
    port: 3000
    token: devtoken
    folder: monitors/dev
  prod:
    host: 10.20.0.5
    port: 3000
    token: prodtoken
    folder: monitors/prod

CLI Commands

1. Login / Add an Instance

kener-agent login --name dev --host 10.10.3.1 --port 3000 --token <token> --folder monitors/dev --default
  • --name: Name of the instance.
  • --default: Set as default instance.
  • Stores credentials and folder path in ~/.config/kener-agent/config.yml.

2. Apply Monitors

kener-agent apply [--instance dev] [--folder ./other-folder]
  • --instance: Optional instance name (overrides default).
  • --folder: Optional folder override containing YAML monitor files.
  • Processes YAML files in ascending numeric order (e.g., 01-monitor.yml, 02-monitor.yml).

3. List Instances

kener-agent list

Outputs a table of configured instances, highlighting the default.

╒══════════╤═══════════╤═════════════╤═══════╤═════════════════╕
│ Default   Instance   Host         Port   Folder          │
╞══════════╪═══════════╪═════════════╪═══════╪═════════════════╡
│ *         dev        10.10.3.1    3000   monitors/dev    │
│           prod       10.20.0.5    3000   monitors/prod   │
╘══════════╧═══════════╧═════════════╧═══════╧═════════════════╛

4. Set Default Instance

kener-agent set-default prod

Switches the default instance to prod.

License

This project is licensed under the GNU General Public License v3.0 (GPLv3).

Contributing

  1. Fork the repository.
  2. Create a feature branch.
  3. Make your changes.
  4. Ensure tests pass.
  5. Submit a pull request.

Contact

For questions or support, open an issue on GitHub or contact the maintainer.

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

kener_agent-0.1.4.tar.gz (40.2 kB view details)

Uploaded Source

Built Distribution

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

kener_agent-0.1.4-py3-none-any.whl (27.5 kB view details)

Uploaded Python 3

File details

Details for the file kener_agent-0.1.4.tar.gz.

File metadata

  • Download URL: kener_agent-0.1.4.tar.gz
  • Upload date:
  • Size: 40.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for kener_agent-0.1.4.tar.gz
Algorithm Hash digest
SHA256 5b3ff9d802c18f826d9a6c69d32ac87ed945c676aab297fabdf6b9731e05d02b
MD5 291083718ddfbeb5c61cb9fd6269fb7a
BLAKE2b-256 e9d256693426cbbf224797b94e7f3de7e25f0fe3e349f83eafc64b43f5a40099

See more details on using hashes here.

File details

Details for the file kener_agent-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: kener_agent-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 27.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for kener_agent-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 55ad4a4f745c511809defc0222dc50c285718d37b72b00a65d9212554e251c56
MD5 a7bcae0b86eaaf0a5299d62f74f6972d
BLAKE2b-256 bfee2ab436f019c996cc4b54294f46eab75de193671ac2cd24622aaaa6a078e6

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