pcp
[Top] [All Lists]

Re: [pcp] JSON PMDA

To: David Smith <dsmith@xxxxxxxxxx>
Subject: Re: [pcp] JSON PMDA
From: Nathan Scott <nathans@xxxxxxxxxx>
Date: Sun, 29 Mar 2015 22:52:44 -0400 (EDT)
Cc: pcp <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <54F9F92D.4010202@xxxxxxxxxx>
References: <54F9F92D.4010202@xxxxxxxxxx>
Reply-to: Nathan Scott <nathans@xxxxxxxxxx>
Thread-index: uNWzSN3Z11tOCUX5XpE1V0wu2H3OMA==
Thread-topic: JSON PMDA
Hi David,

Noticed a couple of little things when we were looking at that install
failure you saw recently...

            # pmParseUnitsStr() doesn't handle unicode
            utf8_units = units.encode("utf-8")

this has been resolved below the API since you encountered this I think,
so you should be able to safely remove that now and pass native strings
around directly.  Please let me know if not the case, cos there's a bug
lurking there still then.

Also, the strategy for generating pmids and indom ids ...

            self.__pmda.indom_idx += 1
            self.__metric_idx += 1
            self.cluster_idx += 1

... needs to be deterministic, else bugs - see mail re dmcache/dmthin a
little earlier for more details.  IOW, restarting/reconfiguring the PMDA
needs to ensure the same IDs are generated for the same metrics/indoms.

cheers.

--
Nathan

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