Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm trying to forward metrics from gmetad to graphite/carbon. After configuring carbon_server and ganglia_prefix in gmetad.conf gmetad starts losing metrics.

gmetad Version is 3.3.5, carbon/whisper/graphite-web is 0.9.8.

There is no I/O bottleneck on the system and no CPU bottleneck (HP DL385G7 with 2 SSDs in RAID0), I even configured another gmetad on a remote host to send metrics to graphite/carbon, which also broke down.

Does anyone else experience this?

share|improve this question
    
Please show us the details configuration? Can you telnet to gmetad port? –  quanta Sep 10 '12 at 20:38
    
gmetad runs perfectly, as soon as I add carbon_server and ganglia_prefix some threads in gmetad start segfaulting and rrds are not updated. –  Falk Stern Sep 12 '12 at 8:33

2 Answers 2

up vote 1 down vote accepted

Got that fixed with two small bash & perl scripts (dirty hack ahead)

g2g.pl

#!/usr/bin/perl 

use XML::Simple; 


$now = time;
$ref = XMLin("-");
$clustername = $ref->{"CLUSTER"}{"NAME"};
foreach (@{$ref->{"CLUSTER"}{"HOST"}}) {
    $hostname = $_->{"NAME"};
    $hostname =~ s/\./_/g;
    $hostname = "here.goes.my.prefix.".$clustername.".".$hostname; 
    foreach (@{$_->{"METRIC"}}) {
        print "$hostname".".".$_->{"NAME"}." ".$_->{"VAL"}." ".$now."\n";
    }
}

ganglia2graphite.sh

#!/bin/sh 

while true ; do 
    nc localhost 8649 | /usr/local/bin/g2g.pl | nc -q1  localhost 2003
done
share|improve this answer

I had the same issue, but the above perl script isn't working for me (fails with an error "Not an ARRAY reference at g2g.pl").

However, I think I found a fix. Just ensure carbon_server is an IP address without quotes. That seems to work just fine for me:

carbon_server a.b.c.d
carbon_port 2003
graphite_prefix "ganglia"
write_rrds off
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.