pcp
[Top] [All Lists]

Prepare to be assimilated^Wanalysed; resistance is futile

To: PCP <pcp@xxxxxxxxxxx>
Subject: Prepare to be assimilated^Wanalysed; resistance is futile
From: Nathan Scott <nathans@xxxxxxxxxx>
Date: Thu, 27 Jun 2013 23:49:31 -0400 (EDT)
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <1715044262.9523595.1372389213645.JavaMail.root@xxxxxxxxxx>
Reply-to: Nathan Scott <nathans@xxxxxxxxxx>
Thread-index: Kjws7m4Pzx23Uz4ULiG8C+xfNEUwPQ==
Thread-topic: Prepare to be assimilated^Wanalysed; resistance is futile
Hi all,

Just wanted to draw your attention to a recent large commit
landing in the dev branch.  This commit takes several steps
toward complete automation of pmie and pmlogger for a local
host setup.

The approach taken uses the existing support for pmieconf in
the pmie_check.sh script.  Previously, we installed a default
pmie configuration file however, which overrides this because
no pmieconf magic string is found in that config (IOW, even
though the logic is there from when this was done on IRIX, it
wasn't being enabled anymore).  As back then, a subset of the
rules become activated by default, and they log to syslog by
default.

This concept has been added to pmlogger_check.sh too now - it
invokes pmlogconf in the situation where the specified config
file does not exist (the old config.default is also removed
from the rpms/debs/...), or if it is annotated as a pmlogconf
managed config.

For Linux hosts, crontab entries are automatically installed
for daily log rotation and checking (both pmlogger & pmie).

Stan is undertaking an investigation into the sets of metrics
that tools like Linux-sar and collectl currently log, with an
eye to updating the default pmlogconf-generated set of logged
metrics.

So, other remaining work here - we should start to move away
from storing config.<tool> pmlogger scripts in the tree (and
installed below /etc/pcp/pmlogger) and move toward pmlogconf
for all logging needs, so that things become automated (e.g.
./Install a new agent => automatically start logging metrics
deemed important).  Likewise for pmie and pmieconf.

There has also been some concern that having automatically-
modified/updated configuration files below /etc will cause
heartache for some sysadmins.  These files are arranged such
that they identify sections which can be auto-transmoglified,
and other sections which contain secret sysadmin business ...
but even that may not be enough to sway the purists.  Discuss
please - offer alternatives, patches, discussion, ideas, etc,
etc, and lets come up with something great.

Please review carefully, its a fairly big step.  In addition,
Frank has some great ideas about using Avahi to allow pmcd to
announce itself on a network, such that the next assimilation
step of automating setup of centralised pmie/logger machines
for a local network can also be performed!  Just some Red Hat
internal chatter on that so far, but lets widen the discussion
to that kind of idea too, as its all closely related.  Perhaps
Frank could give an overview, else I'll summarise early next
week when I have a free minute - its pretty cool stuff though,
I'm really keen to see it in action!

cheers.

ps: I currently have a clean QA run with these changes, so I'm
also keen to hear of any fallout in that department - thanks!

--
Nathan



commit 9cdfde093a6a2db48c049055267d2c92cdc62541
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date:   Thu Jun 27 19:24:24 2013 +1000

    Generate the default pmlogger and pmie configuration files
    
    This implements a number of changes around generating default
    configuration files using pmieconf and pmlogconf, as we move
    toward more automated enabling of monitoring/logging.
    
    Firstly, the existing pmieconf-integration-in-pmie_check is
    revisted, and some minor sh code cleanups made, refactoring
    some code a little particularly around pmieconf invocation,
    and removing some dated assumptions (eg around pmieconf not
    being installed, older pmie versions, etc).
    
    Next, pmlogger_check is given the same treatment, by adding
    support for running pmlogconf here, for configuration files
    that are either missing or begin with #pmlogconf magic.
    
    We then move on to enabling a local (primary) logger and a
    local pmie process by default, with the default generated
    configuration files (we no longer ship config.default files).
    
    Finally, crontab entries for checking, restarting and daily
    general care-and-feeding of pmie and pmlogger are installed
    somewhere cron automagically finds 'em (Linux only, else in
    the same location as before).
    
    Bwahahah ... self-awareness is imminent (cancel that - wait
    till you hear Frank's Avahi plan, hive-mind is imminent!)


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