pcp
[Top] [All Lists]

Re: [pcp] Apache agent issue

To: Nathan Scott <nathans@xxxxxxxxxx>
Subject: Re: [pcp] Apache agent issue
From: Chandana De Silva <chandana@xxxxxxxxxxxxx>
Date: Tue, 20 Mar 2012 10:24:52 +1100
Cc: pcp@xxxxxxxxxxx
In-reply-to: <572159052.230358.1332197360002.JavaMail.root@xxxxxxxxxxxxxxxxxxxxxx>
References: <572159052.230358.1332197360002.JavaMail.root@xxxxxxxxxxxxxxxxxxxxxx>
Reply-to: chandana@xxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1
On 03/20/2012 09:49 AM, Nathan Scott wrote:

# Configuration files for overriding the above settings
for my $file (    '/etc/pcpdbi.conf',    # system defaults (lowest priority)
        pmda_config('PCP_PMDAS_DIR') . '/mysql/mysql.conf',
Its this one you'd want - so /var/lib/pcp/pmdas/mysql/mysql.conf
What did you put in there that didn't work?  It can be any perl code,
and would typically be variable assignments (overriding one of the
3 set just beforehand - $database, $username or $password.  Oh, you
may also need the old perl trick of "1;" as the final line to indicate a
successful return status?
This is what I had:
$ cat /var/lib/pcp/pmdas/mysql/mysql.conf
my $username = 'uuuuuuu';
my $password = 'xxxxxxxxxxxx';


Also, you might want to have a look at running the pmda as non-root,
we've been doing that for postgres with some success.  It *might* be
as simple as adding $pmda->set_user('mysql'); in the PMDA just
before $pmda->run is called (see postgres for example).
Will do

cheers.

--
Nathan

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