An open API service indexing awesome lists of open source software.

https://github.com/thriqon/xycrd


https://github.com/thriqon/xycrd

crd kubernetes xymon

Last synced: 8 months ago
JSON representation

Awesome Lists containing this project

README

          

# xycrd

Generate [Xymon][1] `hosts.cfg` snippets for services in [Kubernetes][2].

## Design Considerations

* A single configuration file allows inclusion via `option include ` directly in the main `hosts.cfg`, cleanup of the config file is not required.
* Multiple Kubernetes object updates are batched into a single rewrite of the configuration file with a configurable rewrite/reload delay. This incurs a certain delay for most updates, but this usually not really noticable.
* Cleanup (`drop ...`) is not implemented right now, as deletion of Endpoint is unusual. Version 2 might support it, though.
* This tool makes the simple case easy (a single URL check with optional content check), and provides an escape hatch to set additional Xymon tags.

Please note that there is no way to set global tags for all monitors. If this is needed, use `.default.` hosts prior to `optional include`, and reset them afterwards. See [`man hosts.cfg`][3] for reference.

## Installation

On Debian-compatible systems, use the package from the latest release and install it with `dpkg`.

On other systems, use the binary from the latest release and run it using `xymonlaunch`.

## Getting Started

1. After installation, `xycrd` stores the generated file (by default) in `/var/lib/xycrd/`. Include the snippet into the main `hosts.cfg`:
```bash
optional include /var/lib/xycrd/xycrd.cfg
```
2. Add the CRD to Kubernetes:
```bash
xycrd --print-install-files | kubectl apply -f -
```
3. Create `EndpointMonitor`s:
```yaml
kubectl apply -f - <