A client API for accessing the OpenNMS network monitoring platform.
Information on getting started and how to use the API is in the HOWTO document.
The complete API list is available at docs.opennms.org.
- install Node.js
- run
sudo npm install -g opennms
- run
opennms --help
for a list of possible commands
OpenNMS.js currently supports a subset of the OpenNMS ReST API:
- query alarms, events, and nodes (including complex queries against OpenNMS Horizon 21+ and Meridian 2017+)
- acknowledge, escalate, and clear alarms
- create, update, and close trouble tickets against an alarm
- create, update, and delete alarm sticky memos
- create, update, and delete alarm journal memos
Future plans include adding support for other common ReST operations:
- creating, updating, deleting, and importing requisitions
- query the measurements ReST API (RRD/Newts time-series data)
- query outages and notifications
The CHANGELOG will be updated as releases occur, and should always be accessible here.
To build this project, first install yarn:
npm install -g yarn
Then run yarn to fetch all dependencies:
yarn
Then you can run yarn to build or test the project:
yarn dist
- run tests and lint, and build the complete tree indist/
yarn dev
- build a development version of the API indist/opennms.js
anddist/opennms.node.js
yarn build
- build the development and production versions of the API indist/
yarn docs
- build the docs indist/docs/
yarn watch
- continuously build the development version indist/opennms.js
yarn test
- run the testsyarn watch-test
- continuously run the testsyarn cli -- <arguments>
- run the CLI test tool (try--help
for options)
OpenNMS.js issues are tracked in the OpenNMS issue tracker: https://issues.opennms.org/browse/JS
On MAC OS X with WebStorm v2017.2 debugging tests may not work.
See jestjs/jest#1652 for more details.
The described solution there is to add --env jest-environment-node-debug
as argument to the runtime configuration.