probegen

command module
v0.0.0-...-acac91d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2023 License: MIT Imports: 14 Imported by: 0

README

probegen

A small program to query the Backstage API and generate Cloudprober definitions based on annotation metadata.

The generated Cloudprober definitions can be used to monitor the health and availability of the components defined in your Backstage instance.

Usage

See ./probegen -h for options.

Given a backstage component such as:

apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
  name: user-service
  description: User service
  tags:
    - aws
  annotations:
    backstage.io/techdocs-ref: dir:.
    example.com/probe-targets: user-service.prod.example.com
    example.com/probe-http-relative-url: /health
spec:
  type: service
  lifecycle: production
  owner: floobteam
  system: website

You can generate a probe definition like so:

$ ./probegen -pretty -backstage-url 'https://backstage.ops.example.com' -namespace 'example.com' 2>/dev/null
probe: {
  name: "probe-user-service"
  type: HTTP
  interval: "10s"
  targets: {
    host_names: "user-service.prod.example.com"
  }
  http_probe: {
    protocol: HTTPS
    relative_url: "/health"
    method: GET
  }
}

Contributing

Contributions to this project are welcome. If you encounter any issues or have suggestions for improvements, please open an issue or submit a pull request on the GitHub repository.

Acknowledgments

This project is inspired by the Backstage platform and Cloudprober. Special thanks to the contributors of these projects for their valuable work.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL