diff --git a/agent.yaml.template b/agent.yaml.template index 4252a8c6..9bd8d704 100644 --- a/agent.yaml.template +++ b/agent.yaml.template @@ -46,12 +46,12 @@ Api: # DEPRECATED - please use max_measurement_buffer_size instead # Maximum number of messages (batches of measurements) to buffer when unable to communicate # with the monasca-api (-1 means no limit) - max_buffer_size: 1000 + max_buffer_size: {args.max_buffer_size} # Maximum number of measurements to buffer when unable to communicate with the monasca-api # (-1 means no limit) max_measurement_buffer_size: {args.max_measurement_buffer_size} # Maximum number of messages to send at one time when communication with the monasca-api is restored - backlog_send_rate: 1000 + backlog_send_rate: {args.backlog_send_rate} # Publish extra metrics to the API by adding this number of 'amplifier' dimensions. # For load testing purposes only; set to 0 for production use. diff --git a/docs/Agent.md b/docs/Agent.md index 5a41a3dc..b4174e4f 100644 --- a/docs/Agent.md +++ b/docs/Agent.md @@ -112,6 +112,8 @@ All parameters require a '--' before the parameter such as '--verbose'. Run `mon | skip_detection_plugins | Skip provided space separated list of detection plugins. | system | | overwrite | This is an optional parameter to overwrite the plugin configuration. Use this if you don't want to keep the original configuration. If this parameter is not specified, the configuration will be appended to the existing configuration, possibly creating duplicate checks. **NOTE:** The agent config file, agent.yaml, will always be overwritten, even if this parameter is not specified. | | | detection_args | Some detection plugins can be passed arguments. This is a string that will be passed to the detection plugins. | "hostname=ping.me" | +| max_measurement_buffer_size | Integer value for the maximum number of measurements to buffer locally while unable to connect to the monasca-api. If the queue exceeds this value, measurements will be dropped in batches. A value of '-1' indicates no limit | 100000 | +| backlog_send_rate | Integer value of how many batches of buffered measurements to send each time the forwarder flushes data | 1000 | ### Providing Arguments to Detection plugins When running individual detection plugins you can specify arguments that augment the configuration created. In some instances the arguments just provide additional diff --git a/monasca_setup/main.py b/monasca_setup/main.py index db22d646..2de6b2b2 100644 --- a/monasca_setup/main.py +++ b/monasca_setup/main.py @@ -268,10 +268,18 @@ def parse_arguments(parser): "Useful for load testing; not for production use.", default=0) parser.add_argument('-v', '--verbose', help="Verbose Output", action="store_true") parser.add_argument('--dry_run', help="Make no changes just report on changes", action="store_true") + parser.add_argument('--max_buffer_size', + help="Maximum number of batches of measurements to" + " buffer while unable to communicate with monasca-api", + default=1000) parser.add_argument('--max_measurement_buffer_size', - help='Maximum number of measurements to buffer when unable to communicate' - ' with the monasca-api', + help="Maximum number of measurements to buffer when unable to communicate" + " with the monasca-api", default=-1) + parser.add_argument('--backlog_send_rate', + help="Maximum number of buffered batches of measurements to send at" + " one time when connection to the monasca-api is restored", + default=1000) return parser.parse_args()