As there is not an out of the box solution, you will first need to setup custom attributes as described here. You would create a custom attribute called something like
mountCount. On each host with 5 mount points you would then edit the config file so the value is
mountCount. Do this similarly for each group of hosts with an identical number of drive volumes, so that each host has a custom attribute of
mountCount with a value of the number of drives on that host.
You will then be able to use something like the following query in a condition in your policy. You will only need one policy for multiple conditions where each condition would scope to the group of hosts containing identical
mountCount values. Here is an example for the group of hosts with 5 mount points:
SELECT uniqueCount(entityAndMountPoint) FROM StorageSample where mountCount = '5' FACET hostname
You could then set the threshold to watch for this count to go below 5, along the lines of
Query returns a value below 5 for at least 5 minutes. The
for at least 5 minutes will watch to make sure the count remains lower than 5 for a full consecutive 5 minutes, so that ephemeral internet glitches do not result in a false positive violation.
I realize this is quite a bit of work. Ultimately, being able to create “Disk Not Reporting” alert conditions out-of-the-box is an excellent idea for a new feature and I have submitted a Feature Request for this. If you have an opportunity, you might also want to visit our Feature Ideas section of Explorer’s Hub where you can add your use case for the proposed feature as a Feature Idea. This will allow other New Relic users to discover your idea and participate in the conversation by adding their use cases, possible workarounds, and even their vote.