cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1499
Views
0
Helpful
5
Replies

Syslog in NSO / Monitoring NSO

igotni
Level 1
Level 1

Hi everyone,

 

I have 3 questions :

 

1 - SYSLOG : how can i use syslog to detect that a port of a router was switched from up to down (unplugged) and send this syslog to NSO ,this one launch a python script (python action)? can i use syslog-ng ?

 

2 - Monitoring : Is there any solution in NSO that allow monitoring and following on live an operation (launching a python action) ?SYSLOG

 

3 - Stopping : Is there any solution in NSO that allow stopping an action after launching it ?

 

 

Thanks in advance

 

5 Replies 5

siemhermans
Level 1
Level 1
  1. Most modern syslog tools allow for coupling actions to a syslog match action (syslog-ng, rsyslog, etc.). Both of these solutions do need some program/script to handle the log message and formulate an API call to NSO. Assuming you want to use data in the log message inside of your API call to NSO, logstash might be worth looking at as it provides a series of handles to send webhooks with substituted data.
  2. You can use subscribers/kickers to monitor operational data and couple actions to changes. Examples are included in the docs.
  3. Not sure what your question is. What is your use case?

Thanks siemhermans

Concerning the third question, I would like to know if we could stop a transaction ?

That depends on the stage your change is in. Refer to Jan's presentation regarding transaction phases. Also refer to the last slide. The short answer is 'No'. You can't turn back when you perform a commit action. Depending on whether the NED being used is transactional (I.e. Generic vs. NETCONF) the rollback of the aborted config will be more or less difficult to perform.

 

 

For the 2sd question I think that it was not clear, In fact I want to pilot an action, in other terms see what's going on after launching an action (this is possible via IHM or cli ? and how ?)

 

Thanks in advance

For CLI debugging your best bet would be to add the debug command I suppose.

 

admin@ncs(config-device-ios0)# commit dry-run | debug ?
Possible completions:
  dependencies   Display dependency debug info
  kicker         Display kicker debug info
  service        Display service debug info
  template       Display template debug info
  xpath          Display XPath debug info

For Python services being instantiated, monitor the logs directory in your NSO runtime. Each service package gets its own Python VM log. For a local-install that would be probably be in your 'ncs-run' directory if you followed the Getting Started guide.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the NSO Developer community: