Fixes from Craig I missed in the first round.

Change-Id: Ic231fadf9113433eeaf28159541ccf37ee7d875b
This commit is contained in:
Tim Kuhlman 2015-04-28 17:13:57 -06:00
parent 3d1dc2c6d0
commit 613b111bc6
4 changed files with 16 additions and 27 deletions

View File

@ -34,5 +34,9 @@ Agent [github.com/stackforge/monasca-agent/blob/master/docs/Agent.md](https://gi
Agent Customizations [github.com/stackforge/monasca-agent/docs/Customizations.md](https://github.com/stackforge/monasca-agent/blob/master/docs/Customizations.md)
Monasca Metrics [github.com/stackforge/monasca-agent/docs/MonascaMetrics.md](https://github.com/stackforge/monasca-agent/blob/master/docs/MonascaMetrics.md)
Agent Plugin details [github.com/stackforge/monasca-agent/docs/Plugins.md](https://github.com/stackforge/monasca-agent/blob/master/docs/Plugins.md)
# License
Copyright (c) 2015 Hewlett-Packard Development Company, L.P.

View File

@ -17,7 +17,7 @@
# Architecture
The Monasca Agent is the component of the [Monasca](https://wiki.openstack.org/wiki/Monasca) monitoring system that collects metrics from the system it is running on and sends them to the Monasca API.
A metric is identified by a name and dimensions. The fields required in a metric are name, timestamp, and value. A metric can also have 0..n dimensions. Some standard dimensions are sent with all metrics that are sent by the agent.
<img src="https://github.com/stackforge/monasca-agent/raw/master/docs/monasca-agent_arch.png" alt="Monasca Agent Diagram">
@ -71,7 +71,7 @@ The agent configuration files are located in /etc/monasca/agent.
The plugin configuration files are located in /etc/monasca/agent/conf.d.
To run monasca-setup:
monasca-setup is located in `[installed prefix dir]/bin/monasca-setup` and can be run as follows:
```
sudo monasca-setup --username KEYSTONE_USERNAME --password KEYSTONE_PASSWORD --project_name KEYSTONE_PROJECT_NAME --keystone_url http://URL_OF_KEYSTONE_API:35357/v3
@ -83,13 +83,13 @@ All parameters require a '--' before the parameter such as '--verbose'. Run `mon
| ----------- | ------------ | ----------- |
| username | This is a required parameter that specifies the username needed to login to Keystone to get a token | myuser |
| password | This is a required parameter that specifies the password needed to login to Keystone to get a token | mypassword |
| project_name | This is a required parameter that specifies the name of the Keystone project name to store the metrics under | myproject |
| project_name | Specifies the name of the Keystone project name to store the metrics under, defaults to users default project. | myproject |
| project_domain_id | Project domain id for keystone authentication | |
| project_domain_name | Project domain name for keystone authentication | |
| project_id | Keystone project id for keystone authentication | |
| check_frequency | How often to run metric collection in seconds | 60 |
| keystone_url | This is a required parameter that specifies the url of the keystone api for retrieving tokens | http://192.168.1.5:35357/v3 |
| dimensions | A comma seperated list of key:value pairs to include as dimensions in all submitted metrics| region:a,az:1 |
| 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 |
| monasca_url | This is a optional parameter that specifies the url of the monasca api for retrieving tokens. By default this is obtained from the registered service in keystone. | http://192.168.1.4:8080/v2.0 |
| skip_enable | This is an optional parameter. By default the service is enabled, which requires the script run as root. Set this parameter to skip that step. | |
@ -164,7 +164,7 @@ If you did not run monasca-setup and/or there are additional plugins you would l
If a detection plugin exists for monasca-setup you can run monasca-setup with the --detection_plugins flage, ie `monasca-setup --detection-plugins kafka`.
To manully configure a plugin follow the steps below:
To manually configure a plugin follow the steps below:
Agent plugins are activated by placing a valid configuration file in the /etc/monasca/agent/conf.d/ directory. Configuration files are in YAML format, with the file extension .yaml. You may find example configuration files in /usr/local/share/monasca/agent/conf.d/
@ -215,7 +215,7 @@ A plugin config is specified something like this:
newDim: test
# Running
The monasca-setup command will create an appropriate startup script for the agent and so the agent can be run by using the standard daemon control tool for your operating system. If you have configured manually the startup script templates can be found in the
The monasca-setup command will create an appropriate startup script for the agent and so the agent can be run by using the standard daemon control tool for your operating system. If you have configured manually the startup script templates can be found in the code under the packaging directory.
# License

View File

@ -50,7 +50,7 @@ The following sections describe how one customizes the Monasca Agent by:
### Configuring Built-In Check Plugins
The built-in Python check plugin scripts are installed as part of the monasca-agent package, and are available in `[installed base dir]/monasca_agent/collector/checks_d`. A sample `yaml` configuration file for each of these plugins is available in `[prefix_dir]/share/monasca/agent/conf.d`, where the stem name of the `yaml` file matches the stem name of the corresponding Python check script.
The built-in Python check plugin scripts are installed as part of the monasca-agent package, and are available in `[installed base dir]/monasca_agent/collector/checks_d`. A sample `yaml` configuration file for each of these plugins is available in `[installed prefix dir]/share/monasca/agent/conf.d`, where the stem name of the `yaml` file matches the stem name of the corresponding Python check script.
Config files for the plugin scripts can be added directly to the standard plugin configuration directory, `/etc/monasca/agent/conf.d` or added by a `monasca-setup` plugin script that auto-detects that the checks are required and then generates and adds the appropriate config file to enable them.
@ -83,7 +83,7 @@ See [Creating a Custom Detection Plugin](#creating-a-custom-detection-plugin) fo
### Disabling Built-In Check Plugins
`monasca-setup` is run to detect local or remote manageable entities and generate `yaml` configuration files to enable the required check plugins. The setup script runs Python detection plugins to accomplish this. By default it will run all of the available detection plugins. To avoid running detection plugins first create the primary configuration by running monasca-setup with the '--system-only' argument. You can then run with the `--detection_plugins` argument followed by a space seperated list of plugins you would like to run.
`monasca-setup` is run to detect local or remote manageable entities and generate `yaml` configuration files to enable the required check plugins. The setup script runs Python detection plugins to accomplish this. By default it will run all of the available detection plugins. To avoid running detection plugins first create the primary configuration by running monasca-setup with the '--system-only' argument. You can then run with the `--detection_plugins` argument followed by a space separated list of plugins you would like to run.
## Customization Best Practices
@ -95,13 +95,12 @@ Be aware of these best practices before defining new metrics and adding custom p
Here are some best practices concerning appropriate use of metrics:
- Be aware of [naming conventions](#https://github.com/stackforge/monasca-agent/blob/master/docs/MonascaMetrics) with metrics.
- Be aware of [naming conventions](#https://github.com/stackforge/monasca-agent/blob/master/docs/MonascaMetrics.md) with metrics.
- Considerations affecting system performance
- Before installing and configuring a custom check plugin, be certain that you have identified consumers who will actually make use of the metric.
- Before defining a new metric, make sure that a metric that is essentially the same hasn't already been defined. If it has, use that definition. Re-use is good!
- Only include metric dimensions that are required by the consumers of the metric. Don't include extra dimensions simply because someone may someday be interested in them.
- Follow the common and openstack naming conventions, as appropriate, when defining metrics.
- Include only the necessary dimensions in your metric definitions. Measurement data stored in the database stays there for some value of "forever".
- Include value_meta data only when necessary, e.g. when the metric value returned with a measurement can only be understood in the context of the text included in the value_meta. In your plugins, be as economical as possible with the text returned as value_meta. Like other measurement data, value_meta is stored in the database "forever".
### Custom Plugin Best Practices

View File

@ -1,22 +1,8 @@
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
- [Monasca Agent Documentation](#monasca-agent-documentation)
- [Working with document updates](#working-with-document-updates)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
# Monasca Agent Documentation
For full documentation visit [wiki.openstack.org/wiki/Monasca](https://wiki.openstack.org/wiki/Monasca)
For project launchpad visit [launchpad.net/monasca](https://launchpad.net/monasca)
Github [github.com/stackforge/monasca-agent/blob/master/docs/](https://github.com/stackforge/monasca-agent/blob/master/docs/)
ReadTheDocs [monasca-agent.readthedocs.org/en/latest/](http://monasca-agent.readthedocs.org/en/latest/)
Please refer to the [project readme](https://github.com/stackforge/monasca-agent) for Agent documentation.
For full Monasca documentation visit [wiki.openstack.org/wiki/Monasca](https://wiki.openstack.org/wiki/Monasca)
# Working with document updates