Host Monitor can provide Memory Buffer and Cache metrics - How to do it

book

Article ID: 195297

calendar_today

Updated On:

Products

CA Application Performance Management SaaS

Issue/Introduction

Following these instructions will provide Memory Buffer and Cache metrics information in the Metric Tree.

 

Environment

APMIA Agent 20.x

Linux , Not Windows

Resolution

1. You will need to create a couple of files, In this example we created getBuffer.sh and getCache.sh

Add this information in the getBuffer.sh

#!/bin/bash

echo $( vmstat -SK 1 2 | tail -1 | awk '{print $5}' ) 

Add this information in the getBuffer.sh

#!/bin/bash

echo $( vmstat -SK 1 2 | tail -1 | awk '{print $6}' ) 

I put both of these in a folder I create... don't forget to set permission on these files that will let you read and execute them. /root/Agents/apmia/extensions/SysEdge

2. Now we will need to edit the sysedge.cf.  I find this on my system in this folder /root/Agents/apmia/SystemEDGE/config/port1691.  

Add the following line in the bottom of the file.

#### Added July 14, 2020
extension 1 integer readonly '/root/Agents/apmia/extensions/SysEdge/getBuffer.sh'
extension 2 integer readonly '/root/Agents/apmia/extensions/SysEdge/getCache.sh'

Note these are the files we just created and their location.

3. We need to edit a file in this folder /root/Agents/apmia/extensions/HostMonitor/config.  We are going to edit the oid2metrics-linux.cnf

In this file we are going to add 3 lines at the top:

#OID    OpType   MetricPath:MetricName 
1.3.6.1.2.1.1.5.0   Variable  HostName

1.3.6.1.4.1.546.14.1.0  LongCounter SystemEdge|{$HostName}|Memory:Buffer (KBytes)
1.3.6.1.4.1.546.14.2.0  LongCounter SystemEdge|{$HostName}|Memory:Cache (KBytes)

The first line 1.3.6.1.2.1.1.5.0   Variable  HostName is setting up to get the variable for the hostname.  The last 2 is formatting the data for the metrics tree.

4. Save the changes to the files and restart the APMIAgent and you should start seeing the metrics.

 

Attachments