Admiral
Admiral
251 views

Modifying the SI-NetworkUsageAndPerformance policy to filter by interface

Hi,

 

While the Network Usage policy allows to override thresholds using the parameter names from the policy, same as you would do in the DiskCapacity monitor.

 

Unlike the later, the perl script in the NetworkUsage policy doesn't care about thresholds for specific instances, so something like this:

 

;XPL config
[eaagt]
NICByteRateMajorThreshold=80000,eth0=100000

Wouldn't work. The policy would read the "80000" default threshold, but not the threshold for eth0.

 

I'm trying to adapt part of the script in the DiskCapacity policy to compare specific thresholds against NicNames, which doesn't seem to be all than complicated wasn't it because I got stuck at an unexpected point.

 

In order to evaluate the overriding thresholds you'd first read the value of the parameter like this:

 

my $NICByteRateMajorThreshold = $Session->Value("NICByteRateMajorThreshold");

 

Which would read the value of NICByteRateMajorThreshold as specified by the Node Info policy. You could then split the string and go shifting through each of the thresholds in an array (if there was any).

 

The problem is, while that works for the DiskCapacity policy, in the NetworkUsage perl I'm not getting the whole string from $Session->Value("NICByteRateMajorThreshold"), only the first bit (default value).

 

 

Am I missing something? Is there any reason why I wouldn't get the same value for NICByteRateMajorThreshold that you can see in ovconfget?

 

 

Regards.

0 Replies
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.