Project

General

Profile

Feature #7119

BE: Modify cthulhu to run plugins.

Added by Christina Meno about 10 years ago. Updated about 10 years ago.

Status:
Resolved
Priority:
Normal
Category:
Backend (REST API)
Target version:
% Done:

100%

Spent time:
Source:
other
Tags:
Backport:
Reviewed:
Affected Versions:

Description

Modify cthulhu to run plugins.
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.

History

#1 Updated by Christina Meno about 10 years ago

  • Description updated (diff)

#2 Updated by Christina Meno about 10 years ago

  • Parent task set to #7070

#3 Updated by Christina Meno about 10 years ago

  • Parent task deleted (#7070)

#4 Updated by Christina Meno about 10 years ago

  • Tracker changed from Subtask to Feature

#5 Updated by Christina Meno about 10 years ago

  • % Done changed from 0 to 10
  • translation missing: en.field_story_points changed from 5.0 to 8.0

#6 Updated by Christina Meno about 10 years ago

  • Target version changed from v1.2 Backlog to v1.2-dev1
  • % Done changed from 10 to 20
  • Estimated time set to 10.00 h

#7 Updated by Christina Meno about 10 years ago

  • Subject changed from Expose plugin results via API to Modify cthulhu to run plugins.
  • Description updated (diff)
  • % Done changed from 20 to 40

#8 Updated by Christina Meno about 10 years ago

  • Status changed from New to In Progress

#9 Updated by Neil Levine about 10 years ago

  • Subject changed from Modify cthulhu to run plugins. to BE: Modify cthulhu to run plugins.

#10 Updated by Christina Meno about 10 years ago

  • % Done changed from 40 to 90
  • Estimated time deleted (10.00 h)

#11 Updated by Christina Meno about 10 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 90 to 100

Also available in: Atom PDF