Skip to content

Latest commit

 

History

328 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

onmsctl

verify CodeQL OpenSSF Scorecard latest release license

A kubectl-style command-line interface for OpenNMS Horizon. One declarative entrypoint, onmsctl apply -f, peeks each YAML document's kind and routes it to the right handler. That way users, event sources and their evaluation order, threshold groups and threshd packages, SNMP config, requisitions, maintenance windows, data-collection sources, and business services all reconcile through a single command. XML→YAML migrators bring legacy eventconf and provision.pl-shape files into the loop. Reads, explicit deletes, and convert stay imperative.

New to onmsctl? Start with Getting started — install, configure a context, and run your first apply in a few minutes.

Install

# Resolve the newest release tag (follows the /releases/latest redirect;
# needs only curl). Set VERSION=vX.Y.Z by hand instead if you prefer to pin.
VERSION=$(basename "$(curl -fsSLo /dev/null -w '%{url_effective}' \
  https://github.com/no42-org/onmsctl/releases/latest)")
TARGET=x86_64-apple-darwin   # see https://onmsctl.no42.org/getting-started/install for other targets

curl -fL -O https://github.com/no42-org/onmsctl/releases/download/${VERSION}/onmsctl-${VERSION}-${TARGET}
curl -fL -O https://github.com/no42-org/onmsctl/releases/download/${VERSION}/onmsctl-${VERSION}-${TARGET}.sha256
shasum -a 256 -c onmsctl-${VERSION}-${TARGET}.sha256
chmod +x onmsctl-${VERSION}-${TARGET}
sudo mv onmsctl-${VERSION}-${TARGET} /usr/local/bin/onmsctl
onmsctl version

Other install methods: https://onmsctl.no42.org/getting-started/install

Example

onmsctl apply -f <file|dir|glob> is the single declarative mutation entrypoint. It peeks each YAML document's kind and routes it to the registered handler.

onmsctl apply -f users.yaml                       # single file
onmsctl apply -f ./desired-state/                 # directory (mixed kinds)
onmsctl apply -f ./desired-state/ -R              # recurse into subdirs
onmsctl apply -f 'sources/cisco-*.yaml'           # glob (quote it)

Documentation

Full documentation lives at onmsctl.no42.org.

License

Apache-2.0. Third-party crate licenses are inventoried in THIRD-PARTY-LICENSES.md (regenerated by make licenses).

Contributing

See CONTRIBUTING.md. Implementations work from the OpenAPI document and black-box observation of a Horizon instance — never from Horizon's server source — so the result stays an Apache-2.0 clean-room.

Releases

Packages

Used by

Contributors

Languages