Administer > Customize Metrics for RMVM Monitoring

Customize metrics for RMVM monitoring

You can add or customize metrics to your specific storage service monitoring requirements. Microsoft Azure RM Performance Monitoring metrics (policies) are defined and configured in the MSAzure_CollectionDefinition_RMVMMonitoring ConfigFile policy. You can edit the ConfigFile policy to include additional metrics. The MSAzure_CollectionDefinition_RMVMMonitoring policy is scheduled to run at a default interval of five minutes. The policy is part of Microsoft Azure RM Performance Monitoring Aspect.

MSAzure_RMVM is a collector defined for RM VM monitoring. The collector contains multiple metrics to collect and log data for required feature. Following is the collection that is defined for the storage service monitoring. Measurement Threshold policy can be created if event must be generated. In case of event generation, you must also add alarm definition. If only data logging is required, then you need not create policy.

<Collection name="MSAzureMP_RMVM" id="MSAzureMP_C20002"  application="Microsoft Azure" enabled="true" table="MS_AZURE_RMVMMON" database="MS_AZURE">

In this instance,

  • name is the name of collection defined for storage service monitoring. MSAzureMP_RMVM is the collection name.
  • application, the application to be monitored. Microsoft Azure in this instance.
  • table, is the data class for storing the data. MS_AZURE_RMVMMON in this instance.
  • database, is the datasource for data storage, MS_AZURE in this instance.

Follow the steps to specify a metric for data collection and data logging:

  1. Open the Policy Template pane:

    Click Administrator > Monitoring > Policy Template.

  2. In the Policy Template Groups pane, expand Policy Management > Template Groups.
  3. Select the MP for Microsoft Azure.
  4. In Policy Template pane, select the MSAzure_CollectionDefinition_RMVMMonitoring policy and click Edit Policy Template (Raw Mode). The Edit ConfigFile Policy window opens.
  5. In the Policy Data tab, modify as following:

    1. Include the metric in <Field> block one each for Windows and Linux. Make sure to provide a metricid for the metric.

      For example, <Field>TotalBillableRequests</Field>

      Following is the list of existing metrics already defined in the ConfigFile policy.

      <Fields ostype="Windows">
      <Field metricid="MSAzureMP_M20205">\PhysicalDisk(_Total)\Disk Read Bytes/sec</Field>
      <Field metricid="MSAzureMP_M20206">\PhysicalDisk(_Total)\Disk Write Bytes/sec</Field>
      <Field metricid="MSAzureMP_M20207">\Process(_Total)\% Processor Time</Field>
      <Field metricid="MSAzureMP_M20209">\TCPv4\Segments Received/sec</Field>
      <Field metricid="MSAzureMP_M20210">\TCPv4\Segments Sent/sec</Field>
      <Field metricid="MSAzureMP_M20211">\Memory\% Committed Bytes In Use</Field>
      <Field metricid="MSAzureMP_M20212">\Memory\Available Bytes</Field>
      </Fields>
      <Fields ostype="Linux">
      <Field metricid="MSAzureMP_M20205">\PhysicalDisk\ReadBytesPerSecond</Field>
      <Field metricid="MSAzureMP_M20206">\PhysicalDisk\WriteBytesPerSecond</Field>
      <Field metricid="MSAzureMP_M20207">\Processor\PercentProcessorTime</Field>
      <Field metricid="MSAzureMP_M20209">\NetworkInterface\BytesReceived</Field>
      <Field metricid="MSAzureMP_M20210">\NetworkInterface\BytesTransmitted</Field>
      <Field metricid="MSAzureMP_M20211">\Memory\PercentUsedMemory</Field>
      <Field metricid="MSAzureMP_M20212">\Memory\AvailableMemory</Field>
      </Fields>
    2. Append the metric definition using <Metric> block to the existing list of metric definition.

      < Metric id="MSAzureMP_M10212" name="StorageServiceURI" alarm="false" formulae="value" position="12" category="CONSTANT"/>

      In this instance,

      id is identifier for particular metric. Make sure the ID must be increment of last metric available in the ConfigFile policy.

      name metric name specified in </field> tag.

      alarm If true, events are generated.

      If false, only data will be logged for the metric.

      formulaeset as "value".

      position occurrence in MS_Azure_StorageMetrics.spec file.

      category set as METRIC for all the new metrics.

      For example, <Metric id="MSAzureMP_M10214" name="TotalBillableRequests" alarm="true" formulae="value" position="13" category="METRIC">

    A new version of the MSAzure_CollectionDefinition_RMVMMonitoring policy is created.

  6. Update the existing MS_Azure_RMVMMetrics.spec file available at %ovdatadir%\bin\instrumentation location by appending the new metric name at the end.

    Example:

    BillableRequests = 390013
    # BillableRequests CODA_DATATYPE = UTF8
    # CODA_CATEGORYTYPE = ATTRIBUTE
    Label "TBillable Request"
    TYPE TEXT LENGTH 256;
  7. Run the following tool to update the datasource with new metrics.

    1. Open the Assignments & Tuning pane:

      Click Administration > Monitoring > Assignments & Tuning.

    2. In the Browse Views pane, select the MSAzure_Deployment view.
    3. Right-click the proxy Operations Agent node, where you require to deploy the Aspects with custom metrics, and click Launch Tool. The Run Tool window appears.
    4. Select the MSAzure Delete Data Source tool and click Run.
    5. Select the MSAzure Create Data Source tool and click Run.
  8. You must create a new version of Microsoft Azure Storage Account Monitoring Aspect including the latest version of policy and deploy.

Define Alarm Definition for New Metric

You can follow the steps to add alarm definition for both new and existing metrics:

  1. Create a Measurement Threshold policy for the new metric to be monitored.

    You can check existing measurement threshold policy for structure and details.

  2. Add <AlarmDef> block following the <Metric/> block.

    <AlarmDef>
    	<Policy><Name of the policy> </Policy>
    	<Object>	
    	   <MetricId>MSAzureMP_M10203</MetricId>
    	</Object>
    	<Options>
    	     <Option>
    		<Name>SUBSCRIPTION_ID</Name>|
    		<Value>MSAzureMP_M10201</Value>
    	     </Option>
     	     <Option>
    		<Name>SA_NAME</Name>
    		<Value>MSAzureMP_M10202</Value>
    	     </Option>
    	</Options>
    </AlarmDef>

Object = message object of the policy. <$MSG_OBJECT> to associate the event to this object.

Example:
<Metric id="MSAzureMP_M10214" name="TotalBillableRequests" alarm="true" formulae="value" position="13" category="METRIC">
<AlarmDef>
<Policy>MSAzure_TotalBillableRequest</Policy>
<Object>
<MetricId>MSAzureMP_M10203</MetricId>
</Object>
<Options>
<Option>
<Name>SUBSCRIPTION_ID</Name>
<Value>MSAzureMP_M10201</Value>
</Option>
<Option>
<Name>SA_NAME</Name>
<Value>MSAzureMP_M10202</Value>
</Option>
</Options>
</AlarmDef>
</Metric>