From 07920f608d93aae465ea93e46c975bfaf294f86e Mon Sep 17 00:00:00 2001 From: skafandri Date: Thu, 24 Oct 2024 08:58:03 +0100 Subject: [PATCH 1/3] [CPCLOUD-4535] Update API host and path --- agent360/agent360.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agent360/agent360.py b/agent360/agent360.py index 2d25233..b5b44b3 100755 --- a/agent360/agent360.py +++ b/agent360/agent360.py @@ -134,7 +134,7 @@ def hello(proto='https'): except AttributeError: hostname = socket.getfqdn() server_id = urlopen( - proto + '://' + agent.config.get('data', 'api_host') + '/hello.php', + proto + '://' + agent.config.get('data', 'api_host') + '/hello', data=urlencode({ 'user': user_id, 'hostname': hostname, @@ -327,7 +327,7 @@ def _config_init(self): 'subprocess': 'no', 'user': '', 'server': '', - 'api_host': 'ingest.monitoring360.io', + 'api_host': 'api.monitoring360.io', 'api_path': '/v2/server/poll', 'log_file': '/var/log/agent360.log', 'log_file_mode': 'a', From 0f349b66d5b512927684613e1eabbde11233d1a8 Mon Sep 17 00:00:00 2001 From: skafandri Date: Thu, 24 Oct 2024 11:02:43 +0100 Subject: [PATCH 2/3] [CPCLOUD-4535] Update API host and path --- agent360/agent360.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/agent360/agent360.py b/agent360/agent360.py index b5b44b3..c55a6d8 100755 --- a/agent360/agent360.py +++ b/agent360/agent360.py @@ -134,7 +134,7 @@ def hello(proto='https'): except AttributeError: hostname = socket.getfqdn() server_id = urlopen( - proto + '://' + agent.config.get('data', 'api_host') + '/hello', + proto + '://' + agent.config.get('data', 'hello_api_host') + '/hello', data=urlencode({ 'user': user_id, 'hostname': hostname, @@ -327,7 +327,8 @@ def _config_init(self): 'subprocess': 'no', 'user': '', 'server': '', - 'api_host': 'api.monitoring360.io', + 'hello_api_host': 'api.monitoring360.io', + 'ingest_api_host': 'ingest.monitoring360.io', 'api_path': '/v2/server/poll', 'log_file': '/var/log/agent360.log', 'log_file_mode': 'a', @@ -519,7 +520,7 @@ def _data(self): Take and collect data, send and clean if needed ''' logging.info('%s', threading.currentThread()) - api_host = self.config.get('data', 'api_host') + api_host = self.config.get('data', 'ingest_api_host') api_path = self.config.get('data', 'api_path') max_age = self.config.getint('agent', 'max_data_age') max_span = self.config.getint('agent', 'max_data_span') From d0eab1ade4a52e8bf3b5d541a75abaeb53d630bd Mon Sep 17 00:00:00 2001 From: skafandri Date: Thu, 24 Oct 2024 12:08:07 +0100 Subject: [PATCH 3/3] [CPCLOUD-4535] Update API host and path --- agent360/agent360.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agent360/agent360.py b/agent360/agent360.py index c55a6d8..da51bb1 100755 --- a/agent360/agent360.py +++ b/agent360/agent360.py @@ -327,8 +327,8 @@ def _config_init(self): 'subprocess': 'no', 'user': '', 'server': '', + 'api_host': 'ingest.monitoring360.io', 'hello_api_host': 'api.monitoring360.io', - 'ingest_api_host': 'ingest.monitoring360.io', 'api_path': '/v2/server/poll', 'log_file': '/var/log/agent360.log', 'log_file_mode': 'a', @@ -520,7 +520,7 @@ def _data(self): Take and collect data, send and clean if needed ''' logging.info('%s', threading.currentThread()) - api_host = self.config.get('data', 'ingest_api_host') + api_host = self.config.get('data', 'api_host') api_path = self.config.get('data', 'api_path') max_age = self.config.getint('agent', 'max_data_age') max_span = self.config.getint('agent', 'max_data_span')