How it works...
In the example of executing scripts on Sentinel events, we set up a Python script to automatically send out notification emails whenever there is a new Sentinel event. This is called notification-script in Sentinel configuration. The arguments that are passed to the script are <event_type> and <event_description>. This feature is often used to notify the administrator or system ops of any critical events. You might want to add filters or set notification levels in the script so only specified events will be notified.
In the example of executing scripts on failover, we set up a shell script to automatically update the RDB persistence configuration whenever failover happens. This is called client-reconfig-script in Sentinel ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access