Skip to content

Latest commit

 

History

305 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, so users, event sources, SNMP config, requisitions, maintenance windows, and data-collection sources 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.

Pre-stability notice. v0.x.y releases may break CLI flags, the config schema, and the EventSource YAML schema between minor versions. Surfaces stabilize at v1.0.0.

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