pcp
[Top] [All Lists]

Valid metric names

To: pcp@xxxxxxxxxxx
Subject: Valid metric names
From: Martins Innus <minnus@xxxxxxxxxxx>
Date: Tue, 17 Mar 2015 11:31:51 -0400
Cc: "White, Joseph" <jpwhite4@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.5.0
Hi,
We are running into an issue with possibly having to change some metric names and want to make sure we proceeed correctly, if we need to at all.

The perfevent pmda that Joe wrote gets names for the metrics and exposes them as libpfm4 has named them. These can include some non-alpha numeric characters. We've seen things like colons, dashes, equal signs, etc. We've been running this pmda for quite a while with no ill effects and not noticing the restriction on metric names in the documentation:


A node label must begin with an alphabetic character, followed by zero or more characters drawn from the alphabet- ics, the digits and character `_Â (underscore). For alphabetic characters in a node label, upper and lower case
       are distinguished.


As far as we can tell, this doesn't seem to be enforced in the pmda or pmapi apis. We have had no issues with a wide variety of pmlogger, pmchart, etc tools.

We only noticed this while writing some pcp archive tools, where this restriction is enforced in the pmiAddMetric call of libpcp_import. I didn't see any corresponding restriction for instance names.

Are there any tools that would get tripped up by these metric names?

Can this restriction be safely removed from libpcp_import?

If not, it would probably help pmda authors to have checks for valid names in the appropriate spots. If this is done though, we have ~ 20TB of archives that these metrics are a member of. How to handle those with newer versions of pcp tools that may check for valid metric names?

Thanks for any guidance.

Martins

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