https://github.com/thriqon/xycrd
https://github.com/thriqon/xycrd
crd kubernetes xymon
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/thriqon/xycrd
- Owner: thriqon
- License: mit
- Created: 2021-05-17T20:54:30.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-07-18T13:03:31.000Z (about 4 years ago)
- Last Synced: 2025-01-14T08:16:41.265Z (9 months ago)
- Topics: crd, kubernetes, xymon
- Language: Rust
- Homepage:
- Size: 32.2 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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 - <