diff --git a/agent.yaml.template b/agent.yaml.template index 1b10d633..f46ca04e 100644 --- a/agent.yaml.template +++ b/agent.yaml.template @@ -80,7 +80,7 @@ Main: pool_full_max_retries: {args.pool_full_max_retries} # Threshold value for warning on collection time of each check (in seconds) - sub_collection_warn: 6 + sub_collection_warn: {args.plugin_collect_time_warn} # Collector restart interval (in hours) collector_restart_interval: 24 diff --git a/docs/Agent.md b/docs/Agent.md index 19439373..5a41a3dc 100644 --- a/docs/Agent.md +++ b/docs/Agent.md @@ -98,6 +98,7 @@ All parameters require a '--' before the parameter such as '--verbose'. Run `mon | check_frequency | How often to run metric collection in seconds | 60 | | num_collector_threads | Number of threads to use in collector for running checks | 1 | | pool_full_max_retries | Maximum number of collection cycles where all of the threads in the pool are still running plugins before the collector will exit| 4 | +| plugin_collect_time_warn | Number of seconds a plugin collection time exceeds that causes a warning to be logged for that plugin| 6 | | keystone_url | This is a required parameter that specifies the url of the keystone api for retrieving tokens. It must be a v3 endpoint. | http://192.168.1.5:35357/v3 | | dimensions | A comma separated list of key:value pairs to include as dimensions in all submitted metrics| region:a,az:1 | | service | This is an optional parameter that specifies the name of the service associated with this particular node | nova, cinder, myservice | diff --git a/monasca_setup/main.py b/monasca_setup/main.py index 73ebb118..e0bad90e 100644 --- a/monasca_setup/main.py +++ b/monasca_setup/main.py @@ -211,6 +211,9 @@ def parse_arguments(parser): "in the pool are still running plugins before the " + "collector will exit and be restart", type=validate_positive, default=4) + parser.add_argument('--plugin_collect_time_warn', help="Number of seconds a plugin collection time exceeds " + + "that causes a warning to be logged for that plugin", + type=validate_positive, default=6) parser.add_argument('--dimensions', help="Additional dimensions to set for all metrics. A comma separated list " + "of name/value pairs, 'name:value,name2:value2'") parser.add_argument('--ca_file', help="Sets the path to the ca certs file if using certificates. " +