9corp/9volt

Ability to manage check configuration via API

Closed this issue · 4 comments

Ability to add/remove checks via an API endpoint in 9volt.

Some quick thoughts:

  • Since the cfg functionality is already in the application, it should be fairly simple to adapt/update it to work for the API as well
  • Treat the addition/update for a check as an UPSERT
  • Allow adding/deleting an array of checks at the same time

Egh. So while it's relatively easy to adapt the existing cfgutil code to work via an API handler, the result is pretty gross. The proper way to do this would be to refactor the cfgutil pkg:

  • put the cfgutil dal methods into the main dal
  • update cfgutil validate to work in both cases -- with yaml blobs or json blobs (currently interface{} vs []byte)

i've got the functionality done in a branch, but I'm not terribly happy with it.

Except for low level validation, this has been done. Full CRUD is now supported for /monitor and /alerter endpoints.

Let's close this thing off!