Merge "Add the --system_only option to monasca-setup."
This commit is contained in:
@@ -176,7 +176,7 @@ All parameters require a '--' before the parameter such as '--verbose'
|
||||
| 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 |
|
||||
| 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 |
|
||||
| service | This is a required parameter that specifies the name of the service associated with this particular node | nova, cinder, myservice |
|
||||
| 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 required parameter that specifies the url of the monasca api for retrieving tokens | http://192.168.1.4:8080/v2.0 |
|
||||
| config_dir | This is an optional parameter that specifies the directory where the agent configuration files will be stored. | /etc/monasca/agent |
|
||||
| log_dir | This is an optional parameter that specifies the directory where the agent log files will be stored. | /var/log/monasca/agent |
|
||||
@@ -185,6 +185,7 @@ All parameters require a '--' before the parameter such as '--verbose'
|
||||
| headless | This is an optional parameter that specifies whether monasca-setup should run in a non-interactive mode | |
|
||||
| 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. | |
|
||||
| verbose | This is an optional parameter that specifies whether the monasca-setup script will print additional information for debugging purposes | |
|
||||
| system_only | This optional parameter if set true will cause only the basic system checks to be configured all other detection will be skipped. Basic system checks include cpu, disk, load, memory, network. ||
|
||||
| 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 | |
|
||||
| amplifier | For load testing purposes, this value will multiply the number of metrics submitted in each payload. Set to 1 for one additional set of metrics, 2 for two additional sets, etc. Additional sets of metrics are identified by the 'amplifier' dimension. Set to 0 for typical production use. | 0 |
|
||||
|
||||
|
||||
@@ -68,8 +68,8 @@ class RabbitMQ(monasca_setup.detection.Plugin):
|
||||
if "nodes=" in row:
|
||||
rabbit_nodes =row.split("=")[1].strip()
|
||||
except IOError:
|
||||
log.warn("\tI/O error reading {:s}".format(rabbit_conf))
|
||||
log.warn("\tWill try to setup RabbitMQ plugin using default credentials guest:guest")
|
||||
log.warn("\tI/O error reading {:s} only basic process watching enabled".format(rabbit_conf))
|
||||
return config
|
||||
|
||||
url = rabbitmq_api_url + '/aliveness-test/%2F'
|
||||
password_mgr = urllib2.HTTPPasswordMgrWithDefaultRealm()
|
||||
@@ -86,7 +86,7 @@ class RabbitMQ(monasca_setup.detection.Plugin):
|
||||
response = request.read()
|
||||
request.close()
|
||||
if '{"status":"ok"}' in response:
|
||||
config['rabbitmq'] = {'init_config': None,'instances':
|
||||
config['rabbitmq'] = {'init_config': None, 'instances':
|
||||
[{'rabbitmq_api_url': rabbitmq_api_url,
|
||||
'rabbitmq_user': rabbit_user,
|
||||
'rabbitmq_pass': rabbit_pass,
|
||||
|
||||
@@ -87,6 +87,9 @@ def main(argv=None):
|
||||
action="store_true")
|
||||
parser.add_argument('--user', help="User name to run monasca-agent as", default='monasca-agent')
|
||||
parser.add_argument('-s', '--service', help="Service this node is associated with, added as a dimension.")
|
||||
parser.add_argument('--system_only',
|
||||
help="If set only system metrics (cpu, disk, load, memory, network) will be configured.",
|
||||
action="store_true", default=False)
|
||||
parser.add_argument('--amplifier', help="Integer for the number of additional measurements to create. " +
|
||||
"Additional measurements contain the 'amplifier' dimension. " +
|
||||
"Useful for load testing; not for production use.", default=0, required=False)
|
||||
@@ -160,7 +163,12 @@ def main(argv=None):
|
||||
|
||||
# Run through detection and config building for the plugins
|
||||
plugin_config = agent_config.Plugins()
|
||||
for detect_class in DETECTION_PLUGINS:
|
||||
if args.system_only:
|
||||
from detection.plugins.system import System
|
||||
plugins = [System]
|
||||
else:
|
||||
plugins = DETECTION_PLUGINS
|
||||
for detect_class in plugins:
|
||||
detect = detect_class(args.template_dir, args.overwrite)
|
||||
if detect.available:
|
||||
log.info('Configuring {0}'.format(detect.name))
|
||||
|
||||
Reference in New Issue
Block a user