Conversation
|
|
||
|
|
||
| -callback send_missing_db_alert(DbName :: binary()) -> | ||
| Output :: string(). |
There was a problem hiding this comment.
I'd encode the fact that we don't use the result of these functions, we call them only for their implementation. so perhaps insist on false atom in all cases or say any() and document that the result of the function is ignored.
|
|
||
|
|
||
| send_missing_db_alert(_DbName) -> | ||
| "no-op". |
| {ok, nil}. | ||
|
|
||
| check_shards() -> | ||
| [send_sensu_event(Item) || Item <- custodian:summary()]. |
There was a problem hiding this comment.
this is a cut too far imo. we still want to log the descriptive error message to couch_log. the pluggable module allows a sysadmin to send that message (or one of its own invention) to some other system.
There was a problem hiding this comment.
Hah, I didn't even notice that logging cleverly interleaved in the case statement. In any case, I've returned them, and changed the send_event/3 callback to DRY things up a bit.
| couch_log:warning("~s", [Description]), | ||
| "--warning" | ||
| end, | ||
| ?CUSTODIAN_MONITOR:send_event(Name, Level, Description). |
There was a problem hiding this comment.
think we should send Count itself, the transformation to Level is sensu-specific. 😬
rnewson
left a comment
There was a problem hiding this comment.
nice! please squash before merging!
Enable build time configurable monitor for custodian and remove custom sensu events.
2496735 to
313ef4b
Compare
Overview
Enable build time configurable monitor for custodian and remove custom
sensu events.
Testing recommendations
Related Issues or Pull Requests
Checklist
rel/overlay/etc/default.ini