From f9a75c4e473558101ced660c6448a6e505f5d007 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Fri, 5 Jul 2024 05:26:50 +1000 Subject: [PATCH] Revert "WIP: docs, openmetrics" This reverts commit 2cdde889bb17a5c54909669e398fddf87c61c5d1. Unintended WIP commit. --- INSTALL.md | 2 +- src/pcp2openmetrics/pcp2openmetrics.py | 2 +- src/pmproxy/src/webapi.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 8330095f78..4d20b62cd8 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -208,7 +208,7 @@ $ dpkg -i *.deb **rpm install** (RedHat, SuSE and their derivative distributions) ``` $ cd pcp-/build/rpm -$ sudo rpm -U `ls -1 *.rpm | sed -e '/\.src\.rpm$/d'` +$ sudo rpm -U `echo *.rpm | sed -e '/\.src\.rpm$/d'` ``` **tarball install** (where we don't have native packaging working yet) ``` diff --git a/src/pcp2openmetrics/pcp2openmetrics.py b/src/pcp2openmetrics/pcp2openmetrics.py index d5a3346fe2..4d8f50726e 100755 --- a/src/pcp2openmetrics/pcp2openmetrics.py +++ b/src/pcp2openmetrics/pcp2openmetrics.py @@ -314,7 +314,6 @@ def connect(self): if pmapi.c_api.pmSetContextOptions(self.context.ctx, self.opts.mode, self.opts.delta): raise pmapi.pmUsageErr() - self.context.pmNewZone("UTC") def validate_config(self): """ Validate configuration options """ @@ -391,6 +390,7 @@ def write_openmetrics(self, timestamp): # Silent goodbye, close in finalize() return + self.context.pmNewZone("UTC") ts = self.context.datetime_to_secs(self.pmfg_ts(), PM_TIME_SEC) if self.prev_ts is None: diff --git a/src/pmproxy/src/webapi.c b/src/pmproxy/src/webapi.c index e452f7e385..049b3ec74f 100644 --- a/src/pmproxy/src/webapi.c +++ b/src/pmproxy/src/webapi.c @@ -631,7 +631,7 @@ on_pmwebapi_done(sds context, int status, sds message, void *arg) msg = sdscatfmt(msg, "\"context\":%S,", context); msg = sdscat(msg, "\"success\":true}\r\n"); } else { - msg = sdsnewlen("# EOF", 5); + msg = sdsempty(); } } baton->suffix = NULL;