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

The server application will take a simple command-line argument to refer it to a configuration file, which will define a series of JUNOS OS devices that will be polled. The configuration file will include the necessary SSH credentials for access to the devices to be polled:

  1. Make a directory on the management server in order to store all of the resources associated with this project and start by downloading all of the necessary pre-requisite Node.js packages:
     $ npm install socket.io     └─┬ socket.io@2.0.3         ├─┬ debug@2.6.8         │ └── ms@2.0.0      [...]     $ npm install xml2js     └─┬ xml2js@0.4.19         ├── sax@1.2.4         └── xmlbuilder@9.0.4      $ npm install argparse     └─┬ argparse@1.0.9         └── sprintf-js@1.0.3 
  1. Create collector.js in your preferred ...

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