O'Reilly logo

JUNOS Automation Cookbook by Adam Chappell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Server application

We're going to update the collector.js tool in order to support the collection of multiple RPCs, and we'll write a new HTML client component to show a graph based upon the data that we've collected:

  1. Copy the existing collector.js from the previous recipe directory into a new directory.
  2. Modify the collector.js application so that it can support more than a single RPC. Update the constant xmlrpc at the top of the file to use a JavaScript array instead of a simple string:
   const xmlrpc = [   "<rpc><get-interface-information><media/></get-interface-      information></rpc>\n",   "<rpc><get-route-engine-information/></rpc>\n"   ];
  1. Modify the constructor function for the JUNOSDevice class so that it has an instance member which can ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required