Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
title/usr/local/omk/conf/EventActions.nmis
         'policy' => {
                '10' => {
                        IF => 'event.any',
                        THEN => {
                                '10' => {
                                        IF => 'event.stateful =~ "BGP Peer"',
                                        THEN => 'priority(8) AND script.ping_node() AND script.ping_neighbor() AND script.troubleshoot_bgp()',
                                        BREAK => 'false'
                                },
                        },
          }

opConfig

The /usr/local/omk/conf/command_sets.d directory is where we have files detailing exec commands to be executed on nodes.  For this example we are concerned with ios.nmis.

Code Block
title/usr/local/omk/conf/command_sets.d/ios.nmis
   'IOS_TS_BGP' => {
  
    'os_info' => {
      'version' => '/12.2|12.4|15.\d+/',
      'os' => 'IOS',
    },
                'scheduling_info' => {
      'run_commands_on_separate_connection' => 'false',
                        'attempt_timeout_recovery' => 1,
    },
                
    'purging_policy' => {
      'keep_last' => 1000,
      'purge_older_than' => 2592000, # 30 days
      'autoprotect_first_revision' => 'true', 
    },    
    'commands' => [
                        {
        'multipage' => 'true',
        'privileged' => 'true',
        'command' => 'show ip bgp',
        'tags' => [ 'troubleshooting', 'routing', 'detect-change' ],
      },
                        
      {
        'multipage' => 'true',
        'privileged' => 'true',
        'command' => 'show ip bgp summary',
        'tags' => [ 'troubleshooting', 'routing', 'detect-change' ],
      },
                        
      {
        'multipage' => 'true',
        'privileged' => 'true',
        'command' => 'show ip route summary',
        'tags' => [ 'troubleshooting', 'routing', 'detect-change' ],
      },
    ],
  },

 

Testing and Verification