pcp
[Top] [All Lists]

Re: Param to add Hostname into pcp2graphite metrics?

To: "Frank Ch. Eigler" <fche@xxxxxxxxxx>
Subject: Re: Param to add Hostname into pcp2graphite metrics?
From: Alejandro <cdgraff@xxxxxxxxx>
Date: Fri, 4 Sep 2015 16:52:19 -0300
Cc: pcp@xxxxxxxxxxx
Delivered-to: pcp@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=4Lij/ngYEKq1yS/QgY7P02MsJKXIUJGxiTmfj7lPpuQ=; b=epTTMb3b1NKngwCk2bam2It2nnnszwffDx8bvxHnSNHkP4vFnAuAXsH52QTGildVUF Nh+/cMr5AofoLLe6OnVFg3/bO8he3bi5Yupk73+vqdv7y1Biz5NPpWRpwhg5oo3PDN9b Sl/lyhbQo8Buxdwjk3RPSYR6+b4EAj8A0cYOo7+lRJV961Zx4WWiVUwFkYfLBlmXrkL8 h2OkEADFcs0P2Qh8Z1/ScIqHssK/IyNMSOgEDW3BLbAv/IYBJ2GYPCpRrgk3oe3gLJMQ y+51i7BearL9P5xBPBLuI4Oa9Siqu8EhL7wu/pWE9PlAfyu0ZiCJqz4HGuBOxFxyKUgQ Ov6g==
In-reply-to: <y0ma8t27yra.fsf@xxxxxxxx>
References: <CALJtzxCGwMHVJ4-P_fCHupqNaFgVOU42FnEgxOtTVQqgc+M7xQ@xxxxxxxxxxxxxx> <y0ma8t27yra.fsf@xxxxxxxx>
Thanks Frank,Â

Some way to avoid write the Hostname hardcoded into each server? something like pcp.%H. where %H = hostname from ENV?


Possible after read the example, %H is Systemd variable? and for this reason does not work when I run pcp2graphite in the console only.

Thanks again!
Ale



2015-09-04 16:47 GMT-03:00 Frank Ch. Eigler <fche@xxxxxxxxxx>:

cdgraff wrote:

> I'm implementingÂpcp2graphite, all works perfect with Influxdb, with Graphite
> handler, just I saw that all the metrics don't come with HostName to
> identify...
> [...]

The way to do this is pcp2graphite's "-m PREFIX" option. The given string
is passed to graphite as a prefix for all metric names. The default is
"pcp."; you could make it "pcp.$insert_hostname_here.".

- FChE

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