diff options
author | David Disseldorp <ddiss@suse.de> | 2011-09-02 17:43:13 +0200 |
---|---|---|
committer | David Disseldorp <ddiss@suse.de> | 2011-09-06 14:01:18 +0200 |
commit | 927abee4c130567ce89253c603c2b83596f25e6a (patch) | |
tree | f0b205c70a87ab5a5d2a6f4fcaaf4b5ced70a8f0 /ctdb/utils | |
parent | 88406169bde10a145e81585da775c56281f7f56e (diff) | |
download | samba-927abee4c130567ce89253c603c2b83596f25e6a.tar.gz |
pmda: document in README how to add a new metric
(This used to be ctdb commit b63333fb81aadc451df47c0c3c038e6165f0eac2)
Diffstat (limited to 'ctdb/utils')
-rw-r--r-- | ctdb/utils/pmda/README | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/ctdb/utils/pmda/README b/ctdb/utils/pmda/README index cd262de70cd..f8dbbbccac4 100644 --- a/ctdb/utils/pmda/README +++ b/ctdb/utils/pmda/README @@ -60,5 +60,25 @@ Troubleshooting + After installing or restarting the agent, the PMCD log file ($PCP_LOG_DIR/pmcd/pmcd.log) and the PMDA log file - ($PCP_LOG_DIR/pmcd/ctdb.log) should be checked for any warnings + ($PCP_LOG_DIR/pmcd/pmda_ctdb.log) should be checked for any warnings or errors. + + +Adding a New Metric +=================== + +This section walks through the development task of adding a new metric to the +CTDB PMDA. + + + Define the metric in the pmns file with a unique metric id. See the pmns(4) + man page for details. + + + Add a description of the metric to the help file. + + + Taking note of the previously assigned metric id, add a new entry to the + metrictab structure in pmda_ctdb.c. See the pmdaInit(3) man page for + details. + + + Ensure the counter is already a member of the ctdb_statistics structure. + Finally, add code to pmda_ctdb_fetch_cb() to handle fetch requests for the + newly defined metric. |