This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Compare custom property to total capacity

This could be more generic across other modules, but I'm using it in SRM, hence putting it here.

I have added a custom property for each volume as a text string such as "500.00 GB" and am trying to compare it to volume's total capacity which if I look at the property also shows "500.00 GB". However, when I set an alert to check if two are equal, it doesn't trigger the alert even though they are equal.

Any ideas of how I can accomplish this?

  • I „think“ the amount is stored in Bytes rather than GB. At least for NPM this is the case.
    I also think you can’t compare a string value to an integer, that doesn’t make sense.
    For an alert I usually use a custom SWQL Query as this gives me more flexibility in comparing values. E.g. I can use GB in the Custom property and just convert the value to Byte in my SWQL-Query
  • That totally makes sense. I don't know why I lept thinking that it converts a total capacity value from integer to string, hence, I kept trying to compare what I thought was 2 strings. I see it now, though.

    Now, I just need to figure out how to compare the 2 using SWQL query.  , do you have an example for that?

  • This is for the NPM/SAM Volume Alerts, it should be translateable to SRM somehow. I don't have many SRM Clients currently....

    use an alert and alert on a Volume, the upper menu should populate automatically with the volume selection. In the lower selection something like this:

    JOIN Orion.VolumesCustomProperties vcp ON v.VolumeID = vcp.VolumeID

    JOIN Orion.Nodes nodes on v.NodeID = nodes.NodeID

    JOIN Orion.NodesCustomProperties ncp on nodes.NodeID = ncp.NodeID

    where v.VolumeSpaceAvailable >= vcp.YourCPNameforTheVolume

    Your CP should now be in "bytes" if you want it in GB you can use methematical operations like vcp.YourCPNameforTheVolume*1024 etc.