Size of messages may vary based on the number of metrics the
agent is generating, limiting by measurements will be more stable.
Store messages as json strings when queuing to save space
Change-Id: If6dc0a272a26ac951a5d8823dafd32cab69a3981
http check is not detecting changes when search_pattern was changed
but url keeps the same.
Add unit test for modify_config
Change-Id: I0762e963429ec9e5c7df0d9aef7e9ef1b9b57626
Allow the value of sub_collection_warn to be configurable using
monasca_setup. However, use the name plugin_collect_time_warn
as the configuration option since that is easier to understand
Change-Id: I769ec9dd1dcfb1fba5a6da9b59cf03376707c4a6
This is to handle the case of long running plugins that
added together can exceed the collection frequency. Running
the plugins on multiple threads should bring the collection
time down close to the longest running plugin
A Thread pool is created and used if the new parameter
collector_threads is greater than 1
Due to the Global Interpreter Lock, this will only work well
if the checks are I/O bound which seems to be the case so far
Changed the logging messages to reference plugins instead of
checks to match the usage in docs/Agent.md
Plugins are run in reverse order of last collection time.
Plugins that are still running at the end of a collection cycle
are skipped in the next cycle. If all of the pool threads are
blocked too long by plugins, the collector will exit
Plugins are always run in the thread pool even if pool_size is
1 so that the other changes above still work
Change-Id: Ib50f7fe50a26c949a0066baa3d73ff4a25a8de84
Use user that monasca-agent run as for creating
plugins configuration files as well as agent.yaml
instead of 'root' user.
Change-Id: I34691607a983b5b84a825f2ba2a6ce595a8d2c4d
When using monasca-setup -r -d <plugin name>, if there is no -a with
arguments, all the checks with built_by=<plugin name> will be removed.
If there are input arguments passed with -a <args>, remove this one specific
check if it 100% matches the input args.
Change-Id: I7c78d44770a1619d0302e698a8c06493bfd296b4
== is for value equality
"is" is for reference equality
During testing in padawan, agent was always restarting
even there were no changes and turned out misusing "is"
was the problem.
Change-Id: Ibb63c6675974259981bb92c3aa17945b25e631c3
Add collector_restart_interval in agent.yaml
Fix a table format in agent documentation
Add boundary check for the value of collector_restart_interval
Delete --collector_restart_interval and --sub_collection_warn
from monasca-setup
Change-Id: I909e392ed04bc5b2aebc5875860dd6725a00711f
In monasca agent, detect protocol changes on urls in http check.
If the protocal changed, remove the old instance in http_check.yaml and
merge in the new one.
Change-Id: I16a1ee10cfad0bcdd624328cf4a54a34a8038f36
Restart the collector every 24 hours by default will
prevent the collection time growing over 15 seconds
Change-Id: I8e26ba703d13adaa685e397e9dbec749b2ed843d
Add collection time in millisecond for each check in log file (DEBUG).
If the collection time for a single check is larger than the threshold value
for warning (5second as default), a warning message will be created in log file.
Change-Id: Ieb4949fbdd6b3db79de13b52abe2a367afceaa9e
In addition to configuring monitoring plugins, the monasca-setup code
currently attempts to automatically configure and start users and services,
which may not be desirable if other mechanisms are used for this, so add
"--install_plugins_only" option to disable all changes to user and service
configuration.
Change-Id: I79d2f9dc8ac17895918620e7a062441bdde93477
The ability to remove config is useful when calling monasca-setup via
Ansible.
Various refactoring for the main method to make things cleaner.
Fixed overwrite.
Change-Id: I37805e3ef68d794f7cba8fc40e7156e67118b556
Changed some places to templates to make it possible to change agent
user using monasca_setup. There is one place that it is still
hard coded
The deb creation now uses a hardcoded mon-agent user instead of
monasca-agent
Change-Id: I8f2ee8903289d74c0397ccf911701c89e7a1b691
For the agent I just modified to the config to use the new standard location for custom checks.
For monasca-setup I added automatic plugin detection.
Fixed config compare so order changes don't register as a config change.
Change-Id: I7ab17c894bb0496e30d7f5aa5a1b1cf9684bdf87
Skip config writing and restart if there are no changes to the config.
Added names to various config instances to aid in repeat runs of setup.
Change-Id: Idd29f8abe29b4889868a9044116cbdcdfdba6262
Converted the config file to yaml and updated the config processing logic to match.
Cleaned up some deprecated config item processing.
Change-Id: I8c5d9ad841b22d20825608ac9f2c82d8011b04f0
Changed the IO, Disk and Network classes to not use a subprocess.
They now use psutil to get the metrics. Also, changed the linux
system metrics classes to subclass the AgentCheck class instead
of the old-style Check class. Added additional configuration
and changed monasca-setup to support that. Fixed some Python
2.6 incompatible string formatting issues.
Change-Id: I1f8b65bf48e48e2c598aa4950c194fbae2f9e337
Removed all the lsb helper utils from the sysv init script
Added a better error message for template missing.
Added the ability to skip the definition of the monasca_api_url
Made check frequency configurable and added an option to monasca setup
Also set the forwarder flush interval to be calculated based on check
frequency.
Modified monasca-setup so it can work with non-standard paths.
Change-Id: If8916e17bf42ffb804fa6c79166149a9fd33c553
Updated the plugin code to handle the dimensions from the agent config,
the plugin config and dimensions defined in the code correctly.
Also removed the old-style plugin configuration code from several of
the plugins and added a command-line option to monasca-setup to pass
the log_level if desired instead of hard-coding it in the config.
This will make it easier to test in debug mode. Fixed an issue
with the Swift detection plugin.
Change-Id: I679457e5e1f302b0cdc87b0f0f799a42a9fa0ba4
Added a bunch of swift diagnostic commands.
Added postfix checking back in but warned when root access is not
granted.
Ported over ntp check from the datadog agent and added detection.
Moved detection plugin list out of the main of monasca-setup just so it
looks tidy.
Change-Id: I9a76d0cc009545d30df60c17f65a1db6e8329b63