Learn How We Can Help You Keep Teleworkers Protected During the COVID-19 Crisis

Network Change & Configuration Management


Discover Now via API/Script?

Posts: 30
3574     0

We have a device that is successfully being backed up when a Discover Now is executed, but times out with the automatic config collections later on. While we wait for a fix, we are wondering if there is a way to kick off a Discover Now via a script (presumably Perl)? That would allow us to 1) schedule it and 2) not have to give SysAdmin out to users that would not normally have. NetMRI 6.9.4.


Re: Discover Now via API/Script?

Posts: 353
3575     0
Yes, though first I would try the GET-CONFIGS command in CCS, if all you want is the config file. See the CCS Supplement document in the help under Additional Documentation.

If you want to do the full Discovery Now equivalent you would use this API call:



Re: Discover Now via API/Script?

[ Edited ]
Posts: 30
3575     0

Unfortunatly, the behavior is different, so these do not work. There is something different about doing a Discover Now from the GUI. I even tried setting ignore_history_ind to 1. Any ideas? The Perl script I used is below, but as I said, it doesn't behave the same as the GUI's Disvoer Now.


# Script-Filter:
# $name like /-bane-of-my-existence-/i

use strict;
use warnings;
use NetMRI_Easy 0.6;

my $easy = new NetMRI_Easy({ api_version => 2.5 });
my $dev = $easy->device;
my %discover_hash = ( DeviceID => $dev->DeviceID, ignore_history_ind => 1 );
my $href = $dev->broker->discover( \%discover_hash );

Showing results for 
Search instead for 
Do you mean 

Recommended for You