diff --git a/yarn/assets/configuration/spec.yaml b/yarn/assets/configuration/spec.yaml index 0f44b78719fe8..739106c570eae 100644 --- a/yarn/assets/configuration/spec.yaml +++ b/yarn/assets/configuration/spec.yaml @@ -19,13 +19,11 @@ files: The ResourceManager port can be found in the yarn-site.xml conf file under the property yarn.resourcemanager.webapp.address - required: true value: example: http://localhost:8088 type: string - name: cluster_name description: A friendly name for the cluster. - required: true value: example: default_cluster type: string diff --git a/yarn/datadog_checks/yarn/config_models/defaults.py b/yarn/datadog_checks/yarn/config_models/defaults.py index dc1091d35145d..4f112b144d53d 100644 --- a/yarn/datadog_checks/yarn/config_models/defaults.py +++ b/yarn/datadog_checks/yarn/config_models/defaults.py @@ -48,6 +48,10 @@ def instance_aws_service(field, value): return get_default_field_value(field, value) +def instance_cluster_name(field, value): + return 'default_cluster' + + def instance_collect_app_metrics(field, value): return True @@ -136,6 +140,10 @@ def instance_read_timeout(field, value): return get_default_field_value(field, value) +def instance_resourcemanager_uri(field, value): + return 'http://localhost:8088' + + def instance_service(field, value): return get_default_field_value(field, value) diff --git a/yarn/datadog_checks/yarn/config_models/instance.py b/yarn/datadog_checks/yarn/config_models/instance.py index c10077fad8e89..e6eb4a4e5a2ac 100644 --- a/yarn/datadog_checks/yarn/config_models/instance.py +++ b/yarn/datadog_checks/yarn/config_models/instance.py @@ -41,7 +41,7 @@ class Config: aws_host: Optional[str] aws_region: Optional[str] aws_service: Optional[str] - cluster_name: str + cluster_name: Optional[str] collect_app_metrics: Optional[bool] collect_node_metrics: Optional[bool] connect_timeout: Optional[float] @@ -64,7 +64,7 @@ class Config: proxy: Optional[Proxy] queue_blacklist: Optional[Sequence[str]] read_timeout: Optional[float] - resourcemanager_uri: str + resourcemanager_uri: Optional[str] service: Optional[str] skip_proxy: Optional[bool] split_yarn_application_tags: Optional[bool] diff --git a/yarn/datadog_checks/yarn/data/conf.yaml.example b/yarn/datadog_checks/yarn/data/conf.yaml.example index e6a70a4db6d93..f987007b514e9 100644 --- a/yarn/datadog_checks/yarn/data/conf.yaml.example +++ b/yarn/datadog_checks/yarn/data/conf.yaml.example @@ -45,7 +45,8 @@ init_config: # instances: - ## @param resourcemanager_uri - string - required + - + ## @param resourcemanager_uri - string - optional - default: http://localhost:8088 ## The YARN check retrieves metrics from YARNS's ResourceManager. This ## check must be run from the Master Node and the ResourceManager URI must ## be specified below. The ResourceManager URI is composed of the @@ -56,12 +57,12 @@ instances: ## The ResourceManager port can be found in the yarn-site.xml conf file under ## the property yarn.resourcemanager.webapp.address # - - resourcemanager_uri: http://localhost:8088 + # resourcemanager_uri: http://localhost:8088 - ## @param cluster_name - string - required + ## @param cluster_name - string - optional - default: default_cluster ## A friendly name for the cluster. # - cluster_name: default_cluster + # cluster_name: default_cluster ## @param application_tags - mapping - optional ## Set up tags retrieved from the application data to be applied to the