From ddb28b23f170a795af4b2de5a779e0a0f6b974b3 Mon Sep 17 00:00:00 2001 From: Alex Afshar Date: Tue, 12 Sep 2023 15:55:01 -0400 Subject: [PATCH] Feature/original 123 hostname agent matrix (#126) * add hostId to agent matrix-machine agent report, addresses #123 * fix ppt stat error. see bug #99 --- VERSION | 2 +- backend/output/presentations/cxPpt.py | 2 +- backend/output/reports/AgentMatrixReport.py | 9 +++++++++ input/thresholds/DefaultThresholds.json | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index e0a34f8..8e2e751 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v1.5.9.8 \ No newline at end of file +v1.5.9.9 \ No newline at end of file diff --git a/backend/output/presentations/cxPpt.py b/backend/output/presentations/cxPpt.py index 706aec9..93866a7 100644 --- a/backend/output/presentations/cxPpt.py +++ b/backend/output/presentations/cxPpt.py @@ -326,7 +326,7 @@ def createCxPpt(folder: str): folder, str( format( - (len([x for x in successPercentageOfWorstTransaction if x == 100]) / totalApplications if totalApplications > 0 else 0) * 100, + (len([x for x in successPercentageOfWorstTransaction if x == 0]) / totalApplications if totalApplications > 0 else 0) * 100, ".0f", ) ) diff --git a/backend/output/reports/AgentMatrixReport.py b/backend/output/reports/AgentMatrixReport.py index 1b7c301..acffad9 100644 --- a/backend/output/reports/AgentMatrixReport.py +++ b/backend/output/reports/AgentMatrixReport.py @@ -103,6 +103,7 @@ def createWorkbook(self, jobs, controllerData, jobFileName): machineAgentCols.extend( [ + "hostId", "simEnabled", "historical", "reportingData", @@ -152,6 +153,12 @@ def createWorkbook(self, jobs, controllerData, jobFileName): if agent["hostName"] in hostInfo["servers"]: server = hostInfo["servers"][agent["hostName"]] + # Windows hostName is different than hostId by default, make consistent with how it shows on UI + if server["name"] != server["hostId"]: + data[cols.index("hostName")] = server["name"] + + data.append(server["hostId"] if "hostId" in server else "") + # use id shown in UI data[cols.index("machineId")] = server["id"] @@ -171,6 +178,8 @@ def createWorkbook(self, jobs, controllerData, jobFileName): data.append(json.dumps(server["tags"]) if "tags" in server else "") else: + # hostId + data.append(None) # simEnabled data.append(False) # historical diff --git a/input/thresholds/DefaultThresholds.json b/input/thresholds/DefaultThresholds.json index 67b3a2d..fdf462a 100644 --- a/input/thresholds/DefaultThresholds.json +++ b/input/thresholds/DefaultThresholds.json @@ -1,5 +1,5 @@ { - "version": "v1.5.9.8", + "version": "v1.5.9.9", "apm": { "AppAgentsAPM": { "platinum": {