Project

General

Profile

Feature #7119

Updated by Christina Meno about 10 years ago

Modify cthulhu to run plugins. let the rpc interface retrieve plugin results.
At some frequency (property on the status check class) invoking the status check salt module on * minions.

After a time we say that all responses that are going to arrive have we invoke the status-processor
input dict minion_id: status check output json serializable python object
This is noticed by the PluginMonitor of cthulhu and added to the state which can be queried via RPC interface

Status processors are responsible for how to expose this state.

/api/plugins/acmeplugin/<named object> -> RpcInterface.plugin_get -> PluginMonitor.get_data -> <AcmeStatusProcessor instance>.get(<named object>)

/api/plugins/acmeplugin/<named object> would be the item that appeared as the ‘url’ attribute in the frontend config object.

scheduling - optional diamond collector gets run by period specced in the plugin conf file. Is it subject to default data retention?

API: Exceptions in plugin backend code

When an exception occurs in a status processor, store the exception and ensure that API responses to the data URL are 500s which contain an exception description object. This should be distinct from the case where there is no data available. Status processors can explicitly raise exceptions to get this 500 handling in the frontend. The format of the JSON body of the 500 will be a documented part of the API so that the frontend knows what to do with it.

Back