pcp
[Top] [All Lists]

Re: How to extend pmlogger's default configuration when using pmmgr

To: "Frank Ch. Eigler" <fche@xxxxxxxxxx>
Subject: Re: How to extend pmlogger's default configuration when using pmmgr
From: Tadej JaneÅ <tadej.j@xxxxxx>
Date: Wed, 09 Sep 2015 11:14:57 +0200
Cc: pcp@xxxxxxxxxxx
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <y0m37yqkqph.fsf@xxxxxxxx>
References: <1441613884.8358.33.camel@tlinux64> <y0m37yqkqph.fsf@xxxxxxxx>
Hi!

On Mon, 2015-09-07 at 14:51 -0400, Frank Ch. Eigler wrote:
> tadej.j wrote:
> 
> > To be more concrete, I have web server hosts where I enabled the nginx
> > PMDA. This PMDA provides the following additional metrics:
> > nginx.[...]
> > I would like configure pmlogger [under pmmgr] to also log these additional
> > metrics on the web server hosts.
> 
> There are at least two ways: with or without pmlogconf.

I would prefer to use pmlogconf.

> If using pmlogconf (/etc/pcp/pmmgr/pmlogconf exists), create a new
> file under $PCP_VAR_DIR/config/pmlogconf:
> 
>      ident nginx stuff
>      probe nginx.active
>            nginx

I have some trouble making this work.

The first thing which wasn't immediately obvious is that the file should
have "#pmlogconf-setup 2.0" as the first line.

The next problem I encountered was that nginx metrics weren't getting
included even though "pminfo" reported them:
[tadej@monitor ~]$ pminfo -h nginx_host nginx
nginx.writing
nginx.reading
nginx.waiting
nginx.active
nginx.handled_count
nginx.accepts_count
nginx.requests_count
[tadej@monitor ~]$ /usr/libexec/pcp/bin/pmlogconf -h nginx_host -v
test.conf
[...]
/var/lib/pcp/config/pmlogconf/nginx/summary: 
probe nginx.active exists ? include : exclude -> probe=failure
action=exclude
[...]

So I went directly to the nginx_host and checked the metrics:
[tadej@nginx_host ~]$  pmval nginx.active 

metric:    nginx.active
host:      collector
semantics: instantaneous value
units:     none
samples:   all

pmval: pmFetch: Unknown or illegal metric identifier

pmval: pmFetch: Unknown or illegal metric identifier

[...]

I tried other nginx metrics and I get the same error.

Any idea why this doesn't work?

Here are the system details:
[tadej@nginx_host ~]$ rpm -q nginx pcp pcp-pmda-nginx
nginx-1.8.0-10.fc22.x86_64
pcp-3.10.6-1.fc22.x86_64
pcp-pmda-nginx-3.10.6-1.fc22.x86_64

> In either case, then next time pmmgr reidentifies the target host (or
> is restarted), pmlogconf may or may not run, and these metrics should
> be amongst the ones polled.

I can confirm this for postgresql metrics. After activating the
postgresql PMDA on the database host and restarting pmmgr on the
monitoring host, the metrics started being polled.

Thanks!

Tadej

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