weixin_39844284
weixin_39844284
2020-12-09 11:03

Events APIs integration

Events APIs support is required in Gd2, Currently glustereventsd is independent daemon outside Glusterd, So that it can receive client events even if Glusterd is down. In future we can embed this server also in gd2, but current plan is to add support to run existing glustereventsd with gd2.

Supported CLI operations of Events API, and details about gd2 eventsapi plugin

Enable/disable

Start managing glustereventsd from gd2

POST /v1/events/enable
POST /v1/events/disable

gluster-eventsapi reload

POST /v1/events/reload

Send SIGUSR2 to running glustereventsd in all peer nodes

gluster-eventsapi status

GET /v1/events/

Show running status of glustereventsd from all peer nodes

gluster-eventsapi webhook-add and gluster-eventsapi webhook-mod

POST /v1/events/webhook
  • Add to etcd store
  • generate webhooks.json in all peer nodes
  • Reload glustereventsd by sending SIGUSR2

gluster-eventsapi webhook-del

DELETE /v1/events/webhook
  • Delete webhook details from store
  • Regenerate webhooks.json in all peer nodes
  • Reload glustereventsd by sending SIGUSR2

gluster-eventsapi webhook-test

POST /v1/events/webhook/test

Try to reach the webhook URL from all peer nodes by sending a dummy POST request and show the status

gluster-eventsapi config-get

GET /v1/events/config

Get the config from etcd store

gluster-eventsapi config-set

POST /v1/events/config

Once set, if config requires restart then restart glustereventsd else reload.

gluster-eventsapi config-reset

DELETE /v1/events/config

Same as above.

In future, we need to store 30 minutes(or configurable) of events in etcd itself, so that consumers can consume events from single URL(GET /v1/events) instead of registering as Webhook.(Very useful if nodes do not have access to webhook URL, for example consuming events from laptop)

该提问来源于开源项目:gluster/glusterd2

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

9条回答

为你推荐

换一换