Simple question - CDM monitoring using snmp - anybody doing this ** all good **

Started by paul, May 23, 2019, 06:50:22 PM

Previous topic - Next topic

paul

Ok - global per drive is working - another successful step forward.

For Linux, this is working fine.

As originally stated (and implied) - the DCI instance is an exact match. Windows SNMP in its infinite wisdom returns the volume serial which means we need and exact matching on that.

Once I get my head around the syntax of the code a bit further, I expect that for windows, we can strip the volume back to the first three chars using something like 
$short_DCI = left($dci.->instance,3) as line 1 to create the short version of the filesystem and use that to compare against the Persistent Storage entry of "P:\" so as to avoid the need to have the whole volume name as the Persistent Storage variable.

Other than that though - this is working fine - absolutely fine :)

My many thanks again to Tursiops for this contribution which has been an incalculable benefit.


Oh - in case you are wondering why my alerts say Linux on a Windows server? - I leave the description as Linux so I can tell if my existing Windows template is triggering the exception or the new template is.


paul

OK - Windows threshold is working with only having to use the first three chars of the file system name at either Node level or at Persistent Storage level.

[/if ( left($dci->instance,3) != NULL ) { shortdci = left($dci->instance,3); }
if ( GetCustomAttribute($node,"fileSystem_Warning_".shortdci) != NULL ) { threshold = GetCustomAttribute($node,"fileSystem_Warning_".shortdci); }
else if ( GetCustomAttribute($node,"fileSystem_Warning") != NULL ) { threshold = GetCustomAttribute($node,"fileSystem_Warning"); }
else if ( ReadPersistentStorage("fileSystem_Warning_".shortdci) != "" ) { threshold = ReadPersistentStorage("fileSystem_Warning_".shortdci); }
else { threshold = ReadPersistentStorage("fileSystem_Warning"); }
if ( ( threshold == null ) || ( threshold == "" ) ) { return null; }
if ( $1 >= threshold ) return 1;
else return 0;code]


And this is what it looks like from Object Details - Infrastructure Services as the object - Thresholds tab.
I have set the overall warning threshold to 65% - and - on that first node, I set node specific Custom Attribute settings for C:\, D:\ and P:\  with different severity levels so I would know that it was each setting being picked up and each setting was being applied independently only to the file system specified.