Skip to content

A Python framework for creating, deploying, and managing Catchpoint monitoring configurations as code.

License

Notifications You must be signed in to change notification settings

fleXRPL/catchpoint-configurator

Repository files navigation

Catchpoint Configurator

A Python-based tool for managing Catchpoint monitoring configurations as code.

versions

PyPI version Python Versions CI/CD Pipeline Python

health

Quality Gate Status Overall Coverage Security Rating Maintainability Rating Vulnerabilities Dependabot Status Code style: black

stats

Downloads License: MIT

Features

  • Deploy and manage Catchpoint tests and dashboards using YAML configurations
  • Validate configurations against schemas
  • Template support for reusable configurations
  • CLI interface for all operations
  • Support for both test and dashboard configurations
  • Integration with Catchpoint API v2

Installation

pip install catchpoint-configurator

Quick Start

  1. Set up your Catchpoint API credentials:
export CATCHPOINT_CLIENT_ID="your_client_id"
export CATCHPOINT_CLIENT_SECRET="your_client_secret"
  1. Create a test configuration:
type: test
name: "my-web-test"
url: "https://example.com"
frequency: 300  # 5 minutes
nodes:
  - "US-East"
  - "US-West"
  - "EU-West"
alerts:
  - name: "High Response Time"
    metric: "response_time"
    threshold: 2000
    operator: ">"
    recipients:
      - email: "[email protected]"
  1. Deploy the configuration:
catchpoint-configurator deploy test-config.yaml

Usage

CLI Commands

  • deploy: Deploy a configuration
  • validate: Validate a configuration file
  • list: List existing configurations
  • apply-template: Apply a template with variables
  • update: Update an existing configuration
  • delete: Delete a configuration
  • export: Export a configuration
  • import-config: Import a configuration

Examples

Validate a configuration:

catchpoint-configurator validate test-config.yaml

List all tests:

catchpoint-configurator list --type test

Apply a template:

catchpoint-configurator apply-template web-test variables.yaml

Configuration Examples

See the examples/ directory for more configuration examples:

  • test-config.yaml: Example test configuration
  • dashboard-config.yaml: Example dashboard configuration
  • templates/web-test.yaml: Example template
  • templates/variables.yaml: Example template variables

Development

Setup

  1. Clone the repository:
git clone https://github.com/fleXRPL/catchpoint-configurator.git
cd catchpoint-configurator
  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -e ".[dev]"

Running Tests

pytest

Code Style

black .
isort .
flake8

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A Python framework for creating, deploying, and managing Catchpoint monitoring configurations as code.

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published