From e68c8391eaee77db31fb5ec0a2f7b00c02d80f81 Mon Sep 17 00:00:00 2001 From: Thomas Bechtold Date: Wed, 6 Feb 2019 11:08:22 +0100 Subject: [PATCH] docs: Be consistent with config options in the init_config paragraph Currently this paragraph is not very readable due to a lot of variable names which are sometimes written with ", and sometimes without. Mark these variables now as inline code (with backticks) to make the paragraph more readable. Change-Id: I6c06d50404e570db8e791da89a0f95f98597798e --- docs/Plugins.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/Plugins.md b/docs/Plugins.md index 37b0c2e8..1f66c46d 100644 --- a/docs/Plugins.md +++ b/docs/Plugins.md @@ -262,13 +262,13 @@ instances: ``` #### init_config -In the init_config section you can specify an arbitrary number of global name:value pairs that will be available on every run of the check in self.init_config. -Here you can specify a collection frequency specific to the plugin by setting collect_period. -The global frequency at which all plugins are run is specified by the variable "check_frequency" defined in https://github.com/openstack/monasca-agent/blob/master/docs/Agent.md. -Under normal and default conditions when a plugin runs all the metrics are collected and sent. For example, if check_frequency=30, by default the plugin will be run every 30 seconds and the metrics will be sent. -The variable "collect_period" allows each plugins collect period to be further adjusted to a value greater than the frequency at which the plugin is run specified by "check_frequency", such that when the collection run starts, the plugin might not be called. For example, if check_frequency=30 and collect_period=600, the plugin will be called and metrics sent every 600 seconds. This allows fewer metrics to be sent. -The "collect_period" should be evenly divisible by the "check_frequency". For example, if you want the plugin to collect and send metrics every 600 seconds (10 minutes), and the global check_frequency=30, then the collect_period should be set to 600. -If the "collect_period" is not evenly divisible by the "check_frequency" then the "collect_period" will get rounded up to the nearest multiple of the "check_frequency". For example, if the collect_period=45 and the global check_frequency=30, then the "collect_period" will get rounded up to 60 and the plugin will get called and send metrics every 60 seconds. +In the `init_config` section you can specify an arbitrary number of global name:value pairs that will be available on every run of the check in `self.init_config`. +Here you can specify a collection frequency specific to the plugin by setting `collect_period`. +The global frequency at which all plugins are run is specified by the variable `check_frequency` defined in https://github.com/openstack/monasca-agent/blob/master/docs/Agent.md. +Under normal and default conditions when a plugin runs all the metrics are collected and sent. For example, if `check_frequency=30`, by default the plugin will be run every 30 seconds and the metrics will be sent. +The variable `collect_period` allows each plugins collect period to be further adjusted to a value greater than the frequency at which the plugin is run specified by `check_frequency`, such that when the collection run starts, the plugin might not be called. For example, if `check_frequency=30` and `collect_period=600`, the plugin will be called and metrics sent every 600 seconds. This allows fewer metrics to be sent. +The `collect_period` should be evenly divisible by the `check_frequency`. For example, if you want the plugin to collect and send metrics every 600 seconds (10 minutes), and the global `check_frequency=30`, then the `collect_period` should be set to 600. +If the `collect_period` is not evenly divisible by the `check_frequency` then the `collect_period` will get rounded up to the nearest multiple of the `check_frequency`. For example, if the `collect_period=45` and the global `check_frequency=30`, then the `collect_period` will get rounded up to 60 and the plugin will get called and send metrics every 60 seconds. #### instances The instances section is a list of instances that this check will be run against. Your actual check() method is run once per instance. The name:value pairs for each instance specify details about the instance that are necessary for the check.