1. Home
  2. Cluster Monitoring
  3. How do I trigger a script when a node comes up?

How do I trigger a script when a node comes up?

Is it possible to setup a trigger event (run a script) upon node becoming UP and available?

Yes, this is possible.

You can define a custom action which will run the custom-script and assign it to the pass action of the “DeviceIsUP” health check:

# cmsh
% monitoring actions
% add custom-action
% set command /path/to/custom/script
% set runon node
% commit
% setup healthconf default # assuming you're using the default category
% use deviceisup
% set passactions custom-action
% commit

Updated on August 14, 2020

Related Articles

Leave a Comment