So recently I was asked to create an alert which would help identify hosts with less than 1 DiskGroups…. unfortunately you wont find a vRops metric at the Host System object which counts the number of DiskGroup…. so I had to create a super metric by taking advantage of depth!

I assume that you have vRops 6.6 with the vCenter and the vSan solution configured!!!

The process below will create a new Super Metric at the Host System which counts the child health badges for DiskGroups.

count(${adaptertype=VirtualAndPhysicalSANAdapter, objecttype=VirtualSANDiskGroup, attribute=badge|health, depth=1})

Create a super metric from the admin section of the GUI with the Name: DiskGroup count by Host and assign the formula above…

Below you can see the count is 0 because this host is not a vSAN host…

And in this example you can see the count is 1 as I expect because it is a vSAN host!!

    Click Save

 

So now that we have the SuperMetric we need to assign it to the Host System object

So now we have it assigned to the Host System object we must now enable the metric in the required policy… in this example I will just enable it in the Default Policy.

Navigate to the Metrics section and search the new Super Metric, under state select Local with the Tick and click Save

Now wait a cycle or two so that the metric begins to report at the Host Object and we can get to setting up the Symptoms and Alert….

In my case the alert needs to have 3 symptoms…. why you ask?

Well I didn’t want it to generate false alerts on Host System objects which were not yet fully provisioned or in Maintenance mode… Another thing I had to factor in was witness Hosts for stretch clusters… so I had to make sure the host was a member of a Cluster and the last one is if the DiskGroup count at the host is less than 1 in this case…

Below is the Alert XML which can be imported to create the Alert with the required Symptom Definitions and Recommendation.

<?xml version="1.0" encoding="UTF-8"?><alertContent>
    <AlertDefinitions>
        <AlertDefinition adapterKind="VMWARE" description="This alert will fire if the host has less than 1 DiskGroups configured and is not in Maintenance Mode " id="AlertDefinition-902c6da7-8e79-4b94-b865-cc898bbd7307" name="vSAN Host is running with less than 1 DiskGroups" resourceKind="HostSystem" subType="22" type="18">
            <State severity="automatic">
                <SymptomSets operator="and">
                    <SymptomSet applyOn="self" operator="and" ref="SymptomDefinition-bb2e11d6-c530-4142-9d0e-03976b9ae93c"/>
                    <SymptomSet applyOn="self" operator="and" ref="SymptomDefinition-c2534462-cb2a-4517-b343-194211a6f852"/>
                    <SymptomSet applyOn="self" operator="and" ref="SymptomDefinition-VMWARE-HostInsideACluster"/>
                </SymptomSets>
                <Impact key="health" type="badge"/>
                <Recommendations>
                    <Recommendation priority="1" ref="Recommendation-ud-2b1f757b-5a58-4e0f-98d5-3407ffc823ad"/>
                </Recommendations>
            </State>
        </AlertDefinition>
    </AlertDefinitions>
    <SymptomDefinitions>
        <SymptomDefinition adapterKind="VMWARE" cancelCycle="3" id="SymptomDefinition-bb2e11d6-c530-4142-9d0e-03976b9ae93c" name="Host has less than 1 DiskGroups" resourceKind="HostSystem" waitCycle="3">
            <State severity="info">
                <Condition key="Super Metric|sm_1a04b4e7-ca1f-4f09-a980-dab12666a370" operator="&lt;" thresholdType="static" type="metric" value="1.0" valueType="numeric"/>
            </State>
        </SymptomDefinition>
        <SymptomDefinition adapterKind="VMWARE" id="SymptomDefinition-VMWARE-HostInsideACluster" name="Host inside a cluster" resourceKind="HostSystem">
            <State severity="info">
                <Condition key="summary|parentCluster" operator="regex" thresholdType="static" type="property" value=".+" valueType="string"/>
            </State>
        </SymptomDefinition>
        <SymptomDefinition adapterKind="VMWARE" id="SymptomDefinition-c2534462-cb2a-4517-b343-194211a6f852" name="Host is not in maintenance mode" resourceKind="HostSystem">
            <State severity="info">
                <Condition key="runtime|maintenanceState" operator="!=" thresholdType="static" type="property" value="inMaintenance" valueType="string"/>
            </State>
        </SymptomDefinition>
    </SymptomDefinitions>
    <Recommendations>
        <Recommendation key="Recommendation-ud-2b1f757b-5a58-4e0f-98d5-3407ffc823ad">
            <Description>Check why the vSAN host has 0 Disk Groups configured.</Description>
        </Recommendation>
    </Recommendations>
</alertContent>

 

vMan