pcp
[Top] [All Lists]

Re: [pcp] Combined metrics with PCP_DERIVED_CONFIG

To: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Subject: Re: [pcp] Combined metrics with PCP_DERIVED_CONFIG
From: Martin Spier <mspier@xxxxxxxxxxx>
Date: Fri, 25 Jul 2014 11:26:18 -0700
Cc: pcp@xxxxxxxxxxx
Delivered-to: pcp@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netflix.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=WnHDY1fX7H4lYQ2Y/rSpSQMVuzUIW3VJxCFnzk9FNMk=; b=HAOmcyvEzz+5F7Z+tu+aF4/WyRSG5iRCqIbDBruhcEfxlXuiX5Cnu4DWH7JY2SR4gR wWz0pFevNLSSpQq7lV4J0ysboY4TVxcEB5sp76f0Bnxz83QhGBI5sxaRqzqIMnL0v30q xqWEho1wHhpFIlkXGfpJz4TIkHg3/pi/uR2vM=
In-reply-to: <53D16827.5010600@xxxxxxxxxxxxxxxx>
References: <CAEp4+dUo5sQJU=5MyXmfOiXmTSGA13_vHkb8nCbGmLyj28gwDQ@xxxxxxxxxxxxxx> <53D16827.5010600@xxxxxxxxxxxxxxxx>
Sure. I'm building an UI that will consume PCP's API and besides other things, plot the live data. One of the charts I need to draw is composed of user and sys CPU. As of now, I need to fetch two metrics,Âkernel.all.cpu.sys and kernel.all.cpu.user, each returning a separate data structure and combine them. Eg.:

{
 "timestamp": {
  "s": 1406312466,
  "us": 909502
 },
 "values": [
  {
   "pmid": 251658262,
   "name": "kernel.all.cpu.sys",
   "instances": [
    {
     "value": 3614914200
    }
   ]
  },
  {
   "pmid": 251658260,
   "name": "kernel.all.cpu.user",
   "instances": [
    {
     "value": 3165066120
    }
   ]
  }
 ]
}

And what I'm hoping to achieve is something like this:

{
 "timestamp": {
  "s": 1406312466,
  "us": 909502
 },
 "values": [
  {
   "pmid": 251658262,
   "name": "kernel.all.cpu.combined",Â
   "instances": [
    {
     "value": 3614914200,
     "instance": 1
    },
    {
     "value": 3165066120,
     "instance": 2
    }
   ]
  }
 ]
}

Wondering if it's possible to get something like this withÂPCP_DERIVED_CONFIG or something else.

Thanks,


On Thu, Jul 24, 2014 at 1:10 PM, Ken McDonell <kenj@xxxxxxxxxxxxxxxx> wrote:
On 25/07/14 02:00, Martin Spier wrote:
I know it's possible to do arithmetic operations on top of metrics to
create derived metrics, like:

kernel.all.cpu.sum = kernel.all.cpu.sys + kernel.all.cpu.user

Is it possible to combine metrics into a single metric with multiple
series? Like a derived metric with two or more series:

kernel.all.cpu.combined = [kernel.all.cpu.sys, kernel.all.cpu.user]

Sorry Martin, I don't understand the question.

What do you mean by "multiple series"?

Perhaps you could give a small example of what you'd like to achieve?

_______________________________________________
pcp mailing list
pcp@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/pcp

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