An execution is a representation of the activity of a running or completed command or job. The data about the execution is used in rundeck to monitor the progress of a job or command and later for reporting about what happened.
Each execution contains any output generated by commands or job steps, a record of the nodes where they occurred and the start/end time and status for each step.
An execution represents the state of a command or job execution. Users can view an execution while it is in one of two states, running or completed. Each execution is identified by an ID and is addressable by a unique URL. You can share this URL to other Rundeck users and all see a common view of the execution.
The Rundeck graphical interface lets you watch the progress of an execution in a number of ways - summary, monitor, log view or status bar - depending on the level of detail you desire.
Jobs can complete either successfully, with a failure, partial success or have been aborted. The execution state consists of metadata about the steps, nodes where steps are running, log output, and any inputs and options the job runner has provided. The state also contains information about start and end time, and who started it.
Besides the graphical interface, it is also possible to view an execution via the API or command line tool.
Whether executing a job or a command, Rundeck provides a consistent interface to the execution.
There are small differences between the two though and the Rundeck graphic interface indicates this through a few changes to the appearance in the web pages.
Job executions show the Job name and group and display an icon that looks like a book. An Action menu provides actions to modify the job.
The summary view is the left most tab in the execution page and provides a simplified view of the execution state. The summary view is useful if you have a long running job and it is not important to view detail about its progress nor the log messages.
The summary page displays a box score style table containing counters about node step executions.
The screenshot below displays the elements of the summary view for a running execution.
Elapsed Time progress bar. The average elapsed time is calculated from the previous executions of the job. If the elapsed time is within the average duration, the bar is colored blue. If the elapsed time exceeds the average the bar turns orange.
Activity for this job provides historical views to this kind of execution.
The screenshot below displays the elements of the summary view for a completed execution.
Depending on the execution state, you can view the execution by node and step.
While the execution is running you can monitor progress organized by node and step. All nodes part of the execution are displayed with their steps shown below. The following screenshot displays the notable aspects.
After the execution completes, the Monitor tab name changes to “Report”. The Report view is similar to the Monitor view, displaying node and step information.
Output generated by the steps are displayed in the “Log Output” tab. While the execution is running, new messages are appended to the end of the view simulating a log tail.
The output view is controlled by view options (1). Click the “View Options” link to reveal the controls. The screenshot above shows the default settings turned on.
Ansi Color Mode, if enabled, shows any ANSI-escaped colors in the output text. If disabled, the colors are not shown.
The example below shows a screenshot of just Time and Node information selected.
This results in the following display.
Press the “Raw” link to display just the log messages without any execution metadata.
- Web stopped (pid=8685) using method: web:stop - Web stopped (pid=8928) using method: web:stop - Web started (pid=15088) - Web started (pid=15331)
The Raw link does not contain any execution state metadata and only the output written to standard out and standard error (displayed in brown).
Part of the execution model consists of the definition. For jobs this includes any steps and for Commands this contains the command string. Besides steps, the definition includes the nodes filter expression and the matched nodes. You can also note, that workflow strategy, error handling and concurrency settings are also visible.
If a command execution needs repeating you may wish to save it as a Job. Of course, this assumes you have the appropriate ACL privilege allowing job edit.
Press the “Save as a Job…” button to open the job editor and place the command string as the first step.
It will be entered in the workflow portion of the job edit form as shown below.
Press the Action menu button and choose “Edit this Job..” to open the job definition in the Job editor.
To execute the job again press the “Run Again…” button.
Note, the current definition is executed not the one stored in the execution.
If you have access, you can delete the execution by clicking “Delete this Execution” and confirming.