DX APM Infrastructure Agent - Azure extension - Azure Virtual Machines - Available Memory Percentage (AVG) reports 0 when current value is missing
search cancel

DX APM Infrastructure Agent - Azure extension - Azure Virtual Machines - Available Memory Percentage (AVG) reports 0 when current value is missing

book

Article ID: 451087

calendar_today

Updated On:

Products

DX SaaS

Issue/Introduction

we would like to report a problem with the Azure VM metric:

Virtual Machines - Available Memory Percentage (AVG)

The issue is that when the metric does not have a currently collected/measured value, DX APM reports the value as 0 instead of last measured value.

In our environment the Azure APM agent polling interval is set to 10 minutes. Because of this, the metric shows a real value only at the actual polling time, but the other datapoints between polling intervals are displayed/reported as 0.

This causes false alarm messages.

Resolution

Please  go to this dir <apmia installation dir>/extensions/azure*/config/:
Modify the azure_vm_schema.json, for 

name":"Available Memory Percentage (Avg)",
    "calculation":"",
    "xml_ns":"",
    "attributes":{
        "apm":{
            "apm_type":"LongCounter",  -Change this line from LongAverage to LongCounter.
            "metric_path":[
                {
                    "name":"Azure"
                },
                {
                    "name":"Subscription ID"
                },
                {
                    "name":"%azure_subscriptionid"
                },
                {
                    "name":"Resource Groups"
                },
                {
                    "name":"%resgroup"
                },
                {
                    "name":"Virtual Machine"
                },
                {
                    "name":"%virtualMachine"
                },
                {
                    "name":"Memory"
                },
                {
                    "name":"Available Memory Percentage (Avg)"
                }
            ]
        }
    },
    "value":"$.value[?(@.name.value == 'Available Memory Percentage')].['timeseries'].[*].['data'].[0].['average']",
    "url":"vmmetric2",
    "group":"AZURE VM"
},

Restart APMIA and see if the last value is preserved on less non zero value for that inerval.