From 3ddf5aa9a088ee6fe65f9069d1e9ac522bbbcacc Mon Sep 17 00:00:00 2001 From: Simon Dodsley Date: Thu, 3 Aug 2023 21:00:46 -0400 Subject: [PATCH] Add UserAgent to Pure Storage FA logins and gets Closes: #616 Change-Id: I40b443bc97e787ac857ff948d239d30344eb49ac --- cmk/special_agents/agent_pure_storage_fa.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmk/special_agents/agent_pure_storage_fa.py b/cmk/special_agents/agent_pure_storage_fa.py index f0a092b5d49..f64abf3dfac 100644 --- a/cmk/special_agents/agent_pure_storage_fa.py +++ b/cmk/special_agents/agent_pure_storage_fa.py @@ -21,6 +21,9 @@ from cmk.special_agents.utils.argument_parsing import Args, create_default_argument_parser _LOGGER = logging.getLogger("agent_pure_storage_fa") +__version__ = "2.3.0b1" + +USER_AGENT = f"checkmk-special-purefa-{__version__}" class _RestVersion(NamedTuple): @@ -172,6 +175,7 @@ def login(self, api_token: str) -> None: f"{_REST_VERSION}/login", { "Content-Type": "application/json", + "User-Agent": USER_AGENT, "api-token": api_token, }, ) @@ -218,6 +222,7 @@ def collect_section_data( f"{latest_version}/{spec.path}", headers={ "Content-Type": "application/json", + "User-Agent": USER_AGENT, "x-auth-token": self._x_auth_token, }, params=spec.params,