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

Network Change & Configuration Management

Reply
Highlighted

[HINT.API] Hub Locator as an Issue

Adviser
Posts: 136
1414     1

Hi All,

 

This simple script shows how to create an issue if q-ty end hosts in hub locator more then 4. Don't forget to create a custom issue.

 

 

# BEGIN-SCRIPT-BLOCK
#
# Script-Filter: true
# Script-Login: false
#
# END-SCRIPT-BLOCK

use NetMRI_Easy;
use Data::Dumper;

my $easy = new NetMRI_Easy;

my @IFs=$easy->broker->spm_interfaces_hub_locator_grid->index();

foreach my $IF (@IFs){
 if (${$IF}{EndHostCount}>4) {
  print ${$IF}{DeviceName}." ".${$IF}{ifName}." ".${$IF}{ifMAC}." ".${$IF}{EndHostCount}."\n";
  my $issue_id = $easy->broker->issue_adhoc->generate_issue({
   DeviceID    => ${$IF}{DeviceID},
    IssueTypeID => "HubLocatorMaxEndHosts",
    Severity    => "Error",
   "DeviceName" => ${$IF}{DeviceName}, "ifName"=> ${$IF}{ifName}, "ifMAC"=>${$IF}{ifMAC}, "EndHostCount"=>${$IF}{EndHostCount},},
  );

}
}

Hub Locator tab and an Issue.

HubLocator1.png

 

 

The custom issue:

HubLocator3.png

BR,

Vadim

Showing results for 
Search instead for 
Do you mean 

Recommended for You