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 17:29:31 -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=DbxduEqHEH6e13BhaZ7iILuS73x31Z7xXyKaIA6c8eo=; b=r9qxdM6N0lkG5PScEzPOzu+R1DQZu+f0f13uh7nIoPkbFqDLwhsMGOQf10dNbx0OJL /2ZbztWJOFfhsSEsaPLJNkT9jESANMBs2VnVf1aX4dNyT4NCN/ewZwLgiKJFSlnVpJ58 27TkpK8FdKQJ1AY8fF5kM1/qVeMoa2Fh2QemmW5GbtS7etouIr0sdA/4J3xOQ5/o14R3 ac77wCRMVSPzacmILfyo4SzLL9ThUghx2ZPRZyYDC4H+o2UQiiXZRcJS/YMRs9zWSO9Y NnvkXD61EuUifs5pBgbFw9saIVK8GhO9V/oWD2HAOtCwrUfsiaCBAnTY+SYtWmUpvp8u f5xA==
In-reply-to: <20150904201624.GC20997@xxxxxxxxxx>
References: <CALJtzxCGwMHVJ4-P_fCHupqNaFgVOU42FnEgxOtTVQqgc+M7xQ@xxxxxxxxxxxxxx> <y0ma8t27yra.fsf@xxxxxxxx> <CALJtzxCumz2eSTwB-Y71oMhdpfk1YEZQQgq5igfuF2sQvYEnMg@xxxxxxxxxxxxxx> <20150904201624.GC20997@xxxxxxxxxx>
Excellent! thanks for the detailed information!

I'm really happy with the Quality of the support here... is great for new users, detailed explanations that you guys give here!

Thanks again
Ale

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

> [...]
> I got the idea from here:
> https://github.com/performancecopilot/pcp/issues/24
>
> Possible after read the example, %H is Systemd variable? and for this
> reason does not work when I run pcp2graphite in the console only.

Yes, %H is substituted by systemd.

We would prefer not to hard-code policy like the output metric names
unnecessarily, given that the pcp2graphite invoker has apprx. the
right information already:

  pcp2graphite -m pcp.`hostname`. [...]

Though if pcp2graphite is being run against a remote -h HOST target,
then its hostname is what's probably desired. pcp appears to lack a
shell-friendly general one-shot value-fetcher to do the equivalent of
the above, but this might work well enough:

  pcp2graphite -h FOO -m pcp.`/usr/libexec/pcp/bin/pmhostname FOO`. [...]

(The latter works based on DNS, which is not the same thing as the
remote pmcd.hostname.)

- FChE

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