diff --git a/ibm_ace/CHANGELOG.md b/ibm_ace/CHANGELOG.md index c8682df4f0e6c..2801b62feed1b 100644 --- a/ibm_ace/CHANGELOG.md +++ b/ibm_ace/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +***Added***: + +* Add hostname as part of the subscription substring ([#15189](https://github.com/DataDog/integrations-core/pull/15189)) + ## 2.0.0 / 2023-08-10 ***Changed***: diff --git a/ibm_ace/datadog_checks/ibm_ace/subscription.py b/ibm_ace/datadog_checks/ibm_ace/subscription.py index d73a23d963c46..d98e074209e11 100644 --- a/ibm_ace/datadog_checks/ibm_ace/subscription.py +++ b/ibm_ace/datadog_checks/ibm_ace/subscription.py @@ -15,6 +15,11 @@ from .flows import get_statistics from .resources import get_resource +try: + import datadog_agent +except ImportError: + from datadog_checks.base.stubs import datadog_agent + # https://www.ibm.com/docs/en/app-connect/12.0?topic=performance-resource-statistics # https://www.ibm.com/docs/en/app-connect/12.0?topic=data-message-flow-accounting-statistics-collection-options SNAPSHOT_UPDATE_INTERVAL = 20 @@ -22,8 +27,9 @@ def get_unique_name(check_id, topic_string): # https://www.ibm.com/docs/en/ibm-mq/9.2?topic=reference-crtmqmsub-create-mq-subscription#q084220___q084220SUBNAME + hostname = datadog_agent.get_hostname() data = topic_string.encode('utf-8') - return f'datadog-{check_id}-{hashlib.sha256(data).hexdigest()}' + return f'datadog-{check_id}-{hostname}-{hashlib.sha256(data).hexdigest()}' class Subscription(ABC):