...
Import the node into opConfig
Info | ||
---|---|---|
| ||
This feature is not available for opConfig > 4.0.0. As NMIS and opConfig share the same nodes database. |
Access the menu in opConfig and import the node, you can do this from the menu "System -> Edit Nodes", then look for the blue button "Import new Nodes from NMIS".
...
Code Block |
---|
%hash = ( 'ROUTEROS_DAILY' => { 'os_info' => { 'os' => 'RouterOS', }, 'scheduling_info' => { 'run_commands_on_separate_connection' => 'false', }, commands => [ { 'tags' => [ 'DAILY', 'configuration','version', 'troubleshooting', 'detect-change', 'routeros' ], 'command' => '/export', 'privileged' => 'false', 'multipage' => 'false', 'run_command_on_separate_connection' => 'false' }, { 'tags' => [ 'DAILY', 'configuration','version', 'troubleshooting', 'detect-change', 'routeros' ], 'command' => '/system license print', 'privileged' => 'false', 'multipage' => 'false', 'run_command_on_separate_connection' => 'false' }, { 'tags' => [ 'DAILY', 'configuration','version', 'troubleshooting', 'detect-change', 'routeros' ], 'command' => '/system package print', 'privileged' => 'false', 'multipage' => 'false', 'run_command_on_separate_connection' => 'false' }, ], }, ); |
Appendix A: OS Rules Help Text
Code Block |
---|
# here are some example rules and explanations 1 => { # all IF clauses must match. propnames are in main nodes structure, # and subarea.propname will work, too. IF => { 'nodeVendor' => qr/.../, 'sysDescr' => 'some static choice', 'someotherprop' => [ 'static option 1', 'other static option' ], 'elsewhere.subprop.subsubprop' => qr/whatever/, }, # propname => what to set it to, totally static # all props set that way are a/v to subsequent rules SET => { 'os_info.os' => 'set to fixedstring', 'connection_info.personality' => 'some other fixed string' }, # property to consume -> regex -> commasep prop list to fill with captures # props captured are also a/v to subsequent rules; use undef as target to skip a capture CAPTURE => [ [ 'sysDescr' => qr/with (capture)(groups)/ => "os_info.platform,os_info.otherthing" ] [ 'location' => qr/...(single).../ => "weird.prop.to.set", ], # and where evaluation is REQUIRED, but only with a SINGLE target property: [ 'thingy' => qr/...(more)than(one).../ => "some.prop" => 'an expression with $1, $2 etc.' ], ], # if set to 1 or 'true', don't consider any other rules # if this one already matched. no effect if the rule isn't matching. # i don't think this stuff needs to be nested/recursive, # but a cheapie overlapping setup would be good and useful: # e.g. R1: 'figure out if cisco-ish, don't break', then # R20: 'if cisco-ish is true form before, figure out if iosxr and if so, break.' BREAK => false, }, |
...