Junos Automation (Scripting)
Junos Automation (Scripting)

Configuration Change Tracking - Python and Others - SYSLOG

‎09-29-2017 12:04 PM


I have a complete list of services running over a Juniper MX BOX inside a Mondo DB database. I'm pooling and set all the configurations using netconf. The pooling is a so kind  micro service ubuntu / python fashion in which every day I pool all the services and parses again towards mongo DB.


My question is : Which is the best way to capture the configurations (commit changes) and export it to an external source.


I read that all the config changes could be salved into a file via SYSLOG but is there any kind of configurations that we can do to the syslog configuration in order to the lines changed appear inside a SYSLOG message. 


I'm pooling syslog messages to know when a config change is done but I need to go to the equipment and pool the complete doc and parse it again.


Junos Automation (Scripting)

Re: Configuration Change Tracking - Python and Others - SYSLOG

‎09-30-2017 04:18 AM

You can use archival sites and transfer on commit to automatically send backup copies of configurations to a server for storage.



Steve Puluka BSEET - Juniper Ambassador
IP Architect - DQE Communications Pittsburgh, PA (Metro Ethernet & ISP)
Junos Automation (Scripting)

Re: Configuration Change Tracking - Python and Others - SYSLOG

‎12-07-2017 10:41 PM

Logging is a means of tracking events that happen when some software runs. The software’s developer adds logging calls to their code to indicate that certain events have occurred. An event is described by a descriptive message which can optionally contain variable data (i.e. data that is potentially different for each occurrence of the event). Events also have an importance which the developer ascribes to the event; the importance can also be called the level or severity.

import logging
logging.warning('Watch out!')  # will print a message to the console
logging.info('I told you so')  # will not print anything

Link: https://docs.python.org/3/howto/logging.html