a72f907eef
This patch adds a plugin that reads metrics from JSON files. This makes it very easy to integrate with Monasca -- instead of writing a new plugin, simply write your metrics to a file. The advantage of this mechanism is that: - It's simple and easy to understand - It is asynchronous with Monasca Agent. There are two technical advantages to this: - Your check does not need to run at same frequency as the agent. - If your check blocks, this does not affect other checks in the agent because the agent is not blocked. - You can create the metrics as a side effect of doing other stuff. For example, a server process can write the JSON file while it is processing requests. With the normal plugin architecture, you need to write code that talks to your server process to access the metrics. - You can write the check code in any language. Change-Id: I1e998fa677e16cc04d46edd46d0e6433131825e7 |
||
---|---|---|
.. | ||
checks_d | ||
detection | ||
__init__.py | ||
common.py | ||
README.md | ||
test_aggregator.py | ||
test_config.py | ||
test_keystone.py | ||
test_metrics.py | ||
test_modify_config.py | ||
test_process.py | ||
test_service_plugin.py | ||
test-agent.yaml |
Tests for the mon agent.
Run with nosestests -w tests
For many tests to work an agent.yaml must be in either /etc/monasca/agent/agent.yaml or in the working directory.
Many tests require specific applications enabled in order for the test to run, these are skipped by default. See https://nose.readthedocs.org/en/latest/plugins/skip.html for details.