| To: | chandana@xxxxxxxxxxxxx |
|---|---|
| Subject: | Re: [pcp] Apache agent issue |
| From: | Nathan Scott <nathans@xxxxxxxxxx> |
| Date: | Tue, 20 Mar 2012 09:49:20 +1100 (EST) |
| Cc: | pcp@xxxxxxxxxxx |
| In-reply-to: | <4F67B1A5.4010100@xxxxxxxxxxxxx> |
Hello Nathan,No worries, something like... pmda = some_inst ( pmcd.agent.status != 0 ) -> print 1 min "Restarting %i PMDA automatically" & shell 1 min "pmstore pmcd.control.sighup 1"; test bed for both apache and mysql. I will try the mysql_auto_reconnect option and see.Great, let us know how it goes - thanks. Also, according to the MySQL PMDA, you can put config variables in /var/lib/pcp/pmdas/mysql/mysql.conf. I tried this, but it did not work.The dot-slash one is for developers testing code in a src tree, in a production install it would map to /var/log/pcp/pmcd (wherever the pmda log file ends up), from memory because pmcd chdir's to there before starting and pmdas (IIRC). # Configuration files for overriding the above settingsIts 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? 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). cheers. -- Nathan |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [pcp] Apache agent issue, Chandana De Silva |
|---|---|
| Next by Date: | Re: [pcp] Apache agent issue, Chandana De Silva |
| Previous by Thread: | Re: [pcp] Apache agent issue, Chandana De Silva |
| Next by Thread: | Re: [pcp] Apache agent issue, Chandana De Silva |
| Indexes: | [Date] [Thread] [Top] [All Lists] |