Linux Agent : Disk Performance Collection and Instance Discovery

Started by tzcole, December 16, 2014, 04:38:10 PM

Previous topic - Next topic

tzcole

Hi,

Thank you for a great product.

I'm setting up some Disk IO monitoring for some Linux hosts.  I've been successful in pulling the data, using an explicit disk name.

In my Data Collection Configuration, on the General Tab, in Data->Parameter I'm using...

System.IO.ReadRate("xvda")

I'm wanting to make this dynamic in my Template.  I've been reviewing the wiki and the forum, looking for the right way to do Instance Discovery for a List of Disks.  At the present, I've only setup the Agent on a Linux host, and I've not configured any SNMP on servers yet.  I've been unable to find anything that points to a List/Table from the agent with this data.  If nothing native exists, then I'm thinking that I'll need to leverage an "External List".

1.  For this type of Data Collection, is Agent best, or should I examine SNMP?  What are others doing here?
2.  Am I correct in assuming that there isn't an Agent List/Table with a list of 'Disks'?
3.  Are 'External Lists' my best option?

Thank you and Kind Regards.

Cheers,
Tim

Victor Kirhenshtein

Hi,

you can use agent list FileSystem.MountPoints to get list of all file systems.

Best regards,
Victor

tzcole

Victor,

Early on I looked at that.  Does "System.IO.ReadRate(*)" work with filesystems?  From what I gleaned from the code, it seems to want a 'Disk', that could be found under /dev.  Looking at the Disk IO is more in line with what I'm looking for.

Cheers,

Victor Kirhenshtein

Yes, you're right - it will not gie you device names. Your best option probably is to create external list on agent.

Best regards,
Victor

tzcole

Ok,  Thank you.  I will give this a try and report back on my results.

Cheers,

tzcole

All,

Ok, I've successfully put in place an "ExternalList" property for generating my BlockDevices list.  I currently have this in my Server Managed Agent Configuration file, but I'll probably move it to a Policy later on.

The Line I've added in the "Configuration File" is.


ExternalList = BlockDevices:/bin/ls -1 /sys/block | /bin/egrep -v "loop|ram" | /bin/sort -n  | /usr/bin/tr "\!" "/"


I don't care for the "loop|ram" entries, so I filter them out, sort them, and provide some cleanup with tr.

The reason for my use of the /usr/bin/tr command is to convert the HP Raid device entries to a proper parseable path.  (i.e. something that will resolve under the /dev directory structure.)  Without the cleanup the output shows an exclamation mark in the middle, as shown here.


# /bin/ls -1 /sys/block | /bin/egrep -v "loop|ram" | /bin/sort -n
cciss!c0d0
dm-0
dm-1
dm-2
dm-3
sr0


The /usr/bin/tr command converts it to a slash, which will resolve relative to /dev.


# /bin/ls -1 /sys/block | /bin/egrep -v "loop|ram" | /bin/sort -n  | /usr/bin/tr "\!" "/"
cciss/c0d0
dm-0
dm-1
dm-2
dm-3
sr0



Then in my Template -> Data Collection Configuration, for my System.IO.ReadRate(*) parameter, I've configured the Instance Discovery property as follows.

Instance discovery method = Agent List
List name = BlockDevices


Many of those System.IO.* parameters require a Block Device be provided, relative to the /dev directory.


This is working for me on Oracle and CentOS Linux 6.5, using HP Physicals and XenServer VMs.  Check if you have entries in your /sys/block directory structure for compatibility.

Cheers,

Tatjana Dubrovica

Thank you for well described manual! I think it will help others a lot.

Victor Kirhenshtein

Update: starting with version 2.1 is is possible to use agent list System.IO.Devices for instance discovery.