pcp
[Top] [All Lists]

ganglia2pcp

To: pcp@xxxxxxxxxxx
Subject: ganglia2pcp
From: Martins Innus <minnus@xxxxxxxxxxx>
Date: Thu, 12 Feb 2015 14:51:58 -0500
Delivered-to: pcp@xxxxxxxxxxx
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0
Hi,
    I have a ganglia2pcp utility here for review/merging:

https://github.com/ubccr/pcp/tree/ganglia-import

This is a first step that converts most of the default metrics to equivalent pcp metrics. It operates on a directory full of rrd files and generates one pcp archive from this set. It uses the RRDs perl module that I tested was available in recent Centos and Ubuntu. I think I got all the build logic correct for at least these 2 platforms. QA requires binary rrd files, but I tried to make them as small as possible.

Usage: ganglia2pcp [-s start] [-e end] [-f output file name] [-d output file dir ] [-Z timezone] [-h hostname] input_dir

Only required parameter is an input directory. If no timespec is given, it will try to grab the last 24 hours. RRD files can have multiple time resolutions but this will only try to get the highest resolution.

start and end are formats that str2time would understand.

The default conversion config is in the source file. Any unknown metrics will be skipped. As far as I can tell, everything I have so far maps to correct current pcp metrics. Future work will be a config file to allow configuration of other custom metrics to convert.

I only tested on default ganglia configurations, so if anything breaks on more complex setups, please let me know.

I borrowed some code (mostly timezone stuff) from iostat2pcp so feel free to change the copyright if appropriate.

Thanks

Martins

<Prev in Thread] Current Thread [Next in Thread>