<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Triggering sync-from using SNMP traps in NSO Developer Hub Discussions</title>
    <link>https://community.cisco.com/t5/nso-developer-hub-discussions/triggering-sync-from-using-snmp-traps/m-p/4407674#M6332</link>
    <description>&lt;P&gt;Yes with a little bit of work you can. Setup NSO to receive the traps you want&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://developer.cisco.com/docs/nso/guides/#!snmp-notification-receiver/snmp-notification-receiver" target="_blank"&gt;https://developer.cisco.com/docs/nso/guides/#!snmp-notification-receiver/snmp-notification-receiver&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and then setup a kicker that monitors those alarms. Something like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;admin@ncs% show kickers&lt;BR /&gt;data-kicker out-of-sync-alarm {&lt;BR /&gt;monitor /al:alarms/alarm-list/alarm;&lt;BR /&gt;trigger-expr "type='al:out-of-sync' and is-cleared='false'";&lt;BR /&gt;kick-node xxxx;&lt;BR /&gt;action-name xxxxx;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Of course you need to change the trigger-expression to trigger on your SNMP trap and also create a new nice action to parse the device name from the alarm etc so you can execute the sync-from action on the right device :).&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 24 May 2021 13:59:57 GMT</pubDate>
    <dc:creator>hniska</dc:creator>
    <dc:date>2021-05-24T13:59:57Z</dc:date>
    <item>
      <title>Triggering sync-from using SNMP traps</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/triggering-sync-from-using-snmp-traps/m-p/4407534#M6331</link>
      <description>&lt;P&gt;Is it possible to use the NSO SNMP notification receiver to trigger a sync-from operation? If so, does anyone have any example code they can share?&lt;/P&gt;</description>
      <pubDate>Mon, 24 May 2021 10:02:38 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/triggering-sync-from-using-snmp-traps/m-p/4407534#M6331</guid>
      <dc:creator>tcragg1</dc:creator>
      <dc:date>2021-05-24T10:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering sync-from using SNMP traps</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/triggering-sync-from-using-snmp-traps/m-p/4407674#M6332</link>
      <description>&lt;P&gt;Yes with a little bit of work you can. Setup NSO to receive the traps you want&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://developer.cisco.com/docs/nso/guides/#!snmp-notification-receiver/snmp-notification-receiver" target="_blank"&gt;https://developer.cisco.com/docs/nso/guides/#!snmp-notification-receiver/snmp-notification-receiver&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and then setup a kicker that monitors those alarms. Something like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;admin@ncs% show kickers&lt;BR /&gt;data-kicker out-of-sync-alarm {&lt;BR /&gt;monitor /al:alarms/alarm-list/alarm;&lt;BR /&gt;trigger-expr "type='al:out-of-sync' and is-cleared='false'";&lt;BR /&gt;kick-node xxxx;&lt;BR /&gt;action-name xxxxx;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Of course you need to change the trigger-expression to trigger on your SNMP trap and also create a new nice action to parse the device name from the alarm etc so you can execute the sync-from action on the right device :).&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 May 2021 13:59:57 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/triggering-sync-from-using-snmp-traps/m-p/4407674#M6332</guid>
      <dc:creator>hniska</dc:creator>
      <dc:date>2021-05-24T13:59:57Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering sync-from using SNMP traps</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/triggering-sync-from-using-snmp-traps/m-p/4407709#M6333</link>
      <description>&lt;P&gt;Is it possible to use python for the code for the SNMP notification receiver and the kicker? The docs only appear to mention java for this, and unfortunately I don't speak java.&lt;/P&gt;</description>
      <pubDate>Mon, 24 May 2021 14:44:22 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/triggering-sync-from-using-snmp-traps/m-p/4407709#M6333</guid>
      <dc:creator>tcragg1</dc:creator>
      <dc:date>2021-05-24T14:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: Triggering sync-from using SNMP traps</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/triggering-sync-from-using-snmp-traps/m-p/4407876#M6335</link>
      <description>&lt;P&gt;Kicker is NSO specific and you can write you action in python if you like. The only thing that is in java in the trap stuff and you should be able to handle that piece even if you don't write java. I think the only thing you need to worry about is the one where you match the oid.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="programlisting"&gt;            &lt;STRONG class="hl-keyword"&gt;if&lt;/STRONG&gt; (vb.getOid().toString().equals(&lt;STRONG class="hl-string"&gt;&lt;EM&gt;"1.3.6.1.6.3.1.1.4.1.0"&lt;/EM&gt;&lt;/STRONG&gt;)) etc&lt;/PRE&gt;</description>
      <pubDate>Mon, 24 May 2021 18:16:21 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/triggering-sync-from-using-snmp-traps/m-p/4407876#M6335</guid>
      <dc:creator>hniska</dc:creator>
      <dc:date>2021-05-24T18:16:21Z</dc:date>
    </item>
  </channel>
</rss>

