promtool-configmap

command module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: MIT Imports: 12 Imported by: 0

README

promtool-configmap

Run promtool over kubernetes ConfigMaps without the fuss of translating between the formats.

Install

Download the latest release for Linux or macOS.

$ go install github.com/adamdecaf/promtool-configmap@latest

Usage

Pass your ConfigMap objects into promtool-configmap:

$ promtool-configmap testdata/good.yaml
testdata/good.yaml passed checks

# read via stdin
$ cat testdata/bad.yaml | promtool-configmap --
ERROR validating rules for /Users/adam/.../bad.yaml, err=error validating rule file
 Groupname should not be empty
 Group: : unknown fields in rule_group: malformed

promtool-configmap can also read a json ConfigMap:

$ promtool-configmap testdata/bad.json
ERROR validating rules for /Users/adam/.../bad.json, err=error validating rule file
 yaml: unmarshal errors:
  line 2: cannot unmarshal !!str `bad` into rulefmt.RuleGroup

Note: promtool is required on PATH.

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