You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Purpose

This article will provide an example of opConfig collecting specific command output based on event characteristics.  The command output becomes embedded into the event allowing network operators to more quickly identify root cause and affect resolution.

Use Case

For this example we'll take actions if an event's stateful element is a BGP Peer.  opEvents will fire scripts that result in useful information for engineers to follow up on.

Related Pages

Configuration

opEvents

In this case the necessary configuration for opEvents is contained in /usr/local/omk/conf/EventActions.nmis.  There are two sections we will be concerned with; script and policy. 

/usr/local/omk/conf/EventActions.nmis
 	'script' => {
               'ping_node' => {
                        arguments => '-c 5 node.host',
                        exec => '/bin/ping',                  
                        output => 'save'
                },
                'ping_neighbor' => {
                        arguments => '-c 5 event.element',
                        exec => '/bin/ping',
                        output => 'save'
                },
                'troubleshoot_bgp' => {
                        arguments => 'act=run_command_sets names=IOS_TS_BGP nodes=node.name print_command_output=
true mthread=false debug=0 quiet=1',                    
                        exec => '/usr/local/omk/bin/opconfig-cli.pl',
                        output => 'save'
                },
	}

 

opConfig

Testing and Verification

 

  • No labels