npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

oam-node

v1.0.0

Published

Operation and Maintainence Client Node module

Downloads

32

Readme

Table of Contents

Installation

# clone the repository
npm install

Features

  • EventEmitter based Alarm generation
  • Configurable OIDs and Mapping Messages for Raise/Clear an Alarm

Configuration

 /**
  * For NPM module settings
  * Following JSON template is expected in init method of OAM cli.
  **/
{
  "enabled": true,
  // OAM properties
  "options": {
    "oamServerIp": "localhost",           // IP Address of OAM Server
    "oamServerPort": 4545,                // PORT Number of OAM Server
    "oidPrefix": "1.3.6.1.4.1.19338.116", // OAM ID project specific
    "oidMap": {                           // Map which holds component specific Alarm property
      // OID of each component
      "component1": [1, "Component1 is up and running", "Component1 is down"],  // OID, Success Message, Failure Message
      "component2": [2, "Component2 is up and running", "Component2 is down"]
    }
  }
}

Sample configuration

 /**
  * Holds all configurable values
  **/

let configuration = {
  enabled: true,
  options: {
    oamServerIp: "localhost",
    oamServerPort: 4545,
    appId: 1,
    oidPrefix: "1.3.6.1.4.1.19338.116",
    oidMap: {
      // OID of each component
      component1: [1, "Component1 is up and running", "Component1 is down"],
      component2: [2, "Component2 is up and running", "Component2 is down"]
    }
  }
};
// Initialize the Module
let oam = require("./srcs/oam");
oam.init(configuration);

// Usage
oam.emit("clearAlert", "component1");
oam.emit("criticalAlert", "component1");
oam.emit("warningAlert", "component1");
oam.emit("unknownAlert", "component1");

Sample Output
-------------
PS D:\WorkSpace\MBS-Generics\oam_cli> node .\test.js
[1,"Component1 is up and running","Component1 is down"]
ALERT:1.1.3.6.1.4.1.19338.116.1#0#Component1 is up and running#CLEARED#OK#CLIENTNAME
[1,"Component1 is up and running","Component1 is down"]
ALERT:1.1.3.6.1.4.1.19338.116.1#2#Component1 is down#RAISED#CRITICAL#CLIENTNAME
[1,"Component1 is up and running","Component1 is down"]
ALERT:1.1.3.6.1.4.1.19338.116.1#1#Component1 is down#RAISED#WARNING#CLIENTNAME
[1,"Component1 is up and running","Component1 is down"]
ALERT:1.1.3.6.1.4.1.19338.116.1#3#Component1 is down#RAISED#UNKNOWN#CLIENTNAME
(node:25284) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
OAM Alert : RAISED : CRITICAL : Component1 is down
OAM Alert : RAISED : WARNING : Component1 is down
OAM Alert : RAISED : UNKNOWN : Component1 is down
OAM Alert : CLEARED : OK : Component1 is up and running

Support & Help

  • For any suggestions on improving documentation write to me at [email protected]
  • If you find any bug, raise an issue here in gitlab.
  • If you want to be a contributor clone the project, create MRs with enhancements / features.

COPYRIGHT STATEMENT AND RESTRICTION Copyright © 2017 Nviera Technologies Ltd, Registered Office at A-26, Info City, Sector 34, Gurgaon-122001, Haryana, India. All rights reserved. This document shall not, in whole or in part, be copied, photocopied, reproduced, translated, or reduced to any electronic medium or machine readable form, by any means electronic, mechanical, photographic, optic recording or otherwise without prior consent, in writing, of Nviera Technologies Ltd. The information in this document is subject to change without notice and describes only the product defined in the introduction of this documentation. This document is intended for the use of prospective Nviera customers for the sole purpose of the transaction for which the document is submitted. No part of it may be reproduced or transmitted in any form or manner whatsoever without the prior written permission of Nviera. The intended audience for this document is the target customer, who/which assumes full responsibility for using the document appropriately. Nviera welcomes customer comments as part of the process of continuous development and improvement. Nviera has made all reasonable efforts to ensure that the information contained in the document is adequate, sufficient and free of material errors and omissions. Nviera will, if necessary, explain issues, which may not be covered by the document. However, Nviera does not assume any liability of whatsoever nature, for any errors in the document except the responsibility to provide correct information when any such error is brought to Nviera’s knowledge. Nviera will not be responsible, in any event, for errors in this document or for any damages, incidental or consequential, including monetary losses that might arise from the use of this document or of the information contained in it. This document and the products, solutions and services it describes are intellectual property of Nviera and/or of the respective owners thereof, whether such IPR is registered, registrable, pending for registration, applied for registration or not. The only warranties for Nviera products, solutions and services are set forth in the express warranty statements accompanying its products and services. Nothing herein should be construed as constituting an additional warranty. Nviera shall not be liable for technical or editorial errors or omissions contained herein. The Nviera logo is a trademark of Nviera Technologies Ltd. Other products, names, logos mentioned in this document, if any, may be trademarks of their respective owners. Copyright © 2017 Nviera Technologies Limited. All rights reserved.