GithubHelp home page GithubHelp logo

isabella232 / job-kill-handler-addon Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rundeck-plugins/job-kill-handler-addon

0.0 0.0 0.0 127 KB

Track PIDs of processes executed a node, and issue a kill command for processes at job finish.

Groovy 100.00%

job-kill-handler-addon's Introduction

Rundeck Kill Handler Add-On

Basic Usage

This add-on allows to track the PIDs of processes executed on a remote node, and then issue a kill command for those PIDs when the job finish.

To enable, install the add-on and setup the Capture Process IDs log filter on your job. This filter will register any PID written to the execution output log according to the configured pattern.

For example, using the default configuration, you can print this string to the output log to register PID 2345 on the current node:

RUNDECK:PID:2345

Then to enable the killing of these processes at execution finish, enable the Kill tracked processes after execution execution plugin. This plugin will connect to each node after execution finish and issue a kill command for each of the tracked PIDs of that node. You can also configure the plugin to attempt to kill children processes of the registered PIDs.

Operating System Support

Currently this plugin has been successfully tested on the following target node operating systems:

  • Ubuntu 18.04
  • Centos 6.10

The plugin should work correctly with any Linux node which complies with the following:

  • Node definition indicates unix osFamily
  • Target operating system supports posix process session ids (SID), specifically the pkill -s command.

Some BSD-like operating systems (like macOS) don't support process SID nor the -s flag for pkill, hence the "Kill Children" option will not work. Windows operating systems are not currently supported by this plugin.

Building and Installing

To build the plugin, run the gradle build command:

./gradlew clean build

The resulting artifact will be found at build/libs/job-kill-handler-VERSION.jar

For installing, copy the jar artifact to $RDBASE/server/addons directory. After restarting rundeck you should see the plugins available.

job-kill-handler-addon's People

Contributors

ahormazabal avatar gschueler avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.