Capturing output after an event
In this recipe, we'll configure a JUNOS event policy that reacts to an operational event, executes a CLI command to obtain output, and relays that command output to the NMS server for record-keeping.
Getting ready
In order to complete this recipe, you need access to a JUNOS device and a UNIX-like network management station running an OpenSSH (or equivalent) server. You should have configured the NMS host with a suitable account profile so that the JUNOS device can access it. Steps 1 and 2 in the previous recipe on archiving configurations can help you complete this if necessary.
How to do it…
The steps for the recipe are as follows:
- Verify the configuration of the network management host to ensure that an account profile exists that can be used by the JUNOS router in order to upload files.
user$ touch test.txt user$ scp test.txt [email protected]:/home/junos/test.txt
- If necessary, configure the JUNOS device with the access details for the destination...