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.2.0.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.2.0-py3-none-any.whl (27.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kener_agent-0.2.0.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.2.0.tar.gz
Algorithm Hash digest
SHA256 a11af0be593b190b90b458f7c836f0ae426d0cd33fbf909c28eb876be545ebcf
MD5 fd055a1451ee3963a21066ce49cecc33
BLAKE2b-256 5e25c088ff64afcbafdf375e7ce2f2fb6da5354a204ffd4a76df63ff881d7292

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kener_agent-0.2.0-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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 30c2c7d1de5ded96b7b0a30cf465fb0bd414f1e3544d54b559c5329c102a342c
MD5 cec3c23b3623f2e5ee210d5a037c728f
BLAKE2b-256 e50fce55ee732084cdf10c8574e779c85d84cd9e679758f6b395c0860ca89775

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