Dashboard

This section describes how to use the dashboard of Spring Cloud Data Flow.spring-doc.cn

34. Introduction

Spring Cloud Data Flow provides a browser-based GUI called the Dashboard to manage the following information:spring-doc.cn

  • Apps: The Apps tab lists all available applications and provides the controls to register and unregister them.spring-doc.cn

  • Runtime: The Runtime tab provides the list of all running applications.spring-doc.cn

  • Streams: The Streams tab lets you list, design, create, deploy, and destroy Stream Definitions.spring-doc.cn

  • Tasks: The Tasks tab lets you list, create, launch, schedule, and destroy Task Definitions.spring-doc.cn

  • Jobs: The Jobs tab lets you perform batch job related functions.spring-doc.cn

Upon starting Spring Cloud Data Flow, the dashboard is available at:spring-doc.cn

For example, if Spring Cloud Data Flow is running locally, the dashboard is available at localhost:9393/dashboard.spring-doc.cn

If you have enabled HTTPS, the dashboard is available at localhost:9393/dashboard. If you have enabled security, a login form is available at localhost:9393/dashboard/#/login.spring-doc.cn

The default Dashboard server port is 9393.

The following image shows the opening page of the Spring Cloud Data Flow dashboard:spring-doc.cn

The Spring Cloud Data Flow Dashboard
Figure 10. The Spring Cloud Data Flow Dashboard

35. Apps

The Applications tab of the dashboard lists all the available applications and provides the controls to register and unregister them (if applicable). You can import a number of applications at once by using the Bulk Import Applications action.spring-doc.cn

The following image shows a typical list of available applications within the dashboard:spring-doc.cn

List of available applications
Figure 11. List of Available Applications

35.1. Bulk Import of Applications

Applications can be imported in numerous ways which are available on the "Applications" page. For bulk import, the application definitions are expected to be expressed in a properties style, as follows:spring-doc.cn

<type>.<name> = <coordinates>

The following examples show typical application definitions:spring-doc.cn

task.timestamp=maven://org.springframework.cloud.task.app:timestamp-task:1.2.0.RELEASE
processor.transform=maven://org.springframework.cloud.stream.app:transform-processor-rabbit:1.2.0.RELEASE

In the "Import application coordinates from an HTTP URI location" section, you can specify a URI that points to a properties file stored elsewhere, it should contain properties formatted as shown in the previous example. Alternatively, by using the Apps as Properties textbox in the "Import application coordinates from a properties file" section , you can directly list each property string. Finally, if the properties are stored in a local file, the Import a File option opens a local file browser to select the file. After setting your definitions through one of these routes, click Import Application(s).spring-doc.cn

The following image shows an example page of one way to bulk import applications:spring-doc.cn

Bulk Import Applications
Figure 12. Bulk Import Applications

36. Runtime

The Runtime tab of the Dashboard application shows the list of all running applications. For each runtime applicaiton, the state of the deployment and the number of deployed instances is shown. A list of the used deployment properties is available by clicking on the application ID.spring-doc.cn

The following image shows an example of the Runtime tab in use:spring-doc.cn

List of running applications
Figure 13. List of Running Applications

37. Streams

The Streams tab has two child tabs: Definitions and Create Stream. The following topics describe how to work with each one:spring-doc.cn

37.1. Working with Stream Definitions

The Streams section of the Dashboard includes the Definitions tab that provides a listing of stream definitions. There you have the option to deploy or undeploy those stream definitions. Additionally, you can remove the definition by clicking on Destroy. Each row includes an arrow on the left, which you can click to see a visual representation of the definition. Hovering over the boxes in the visual representation shows more details about the applications, including any options passed to them.spring-doc.cn

In the following screenshot, the timer stream has been expanded to show the visual representation:spring-doc.cn

List of Stream Definitions
Figure 14. List of Stream Definitions

If you click the details button, the view changes to show a visual representation of that stream and any related streams. In the preceding example, if you click details for the timer stream, the view changes to the following view, which clearly shows the relationship between the three streams (two of them are tapping into the timer stream):spring-doc.cn

Stream Details Page
Figure 15. Stream Details Page

37.2. Creating a Stream

The Streams section of the Dashboard includes the Create Stream tab, which makes the Spring Flo designer available. The designer is a canvas application that offers an interactive graphical interface for creating data pipelines.spring-doc.cn

In this tab, you can:spring-doc.cn

  • Create, manage, and visualize stream pipelines by using DSL, a graphical canvas, or bothspring-doc.cn

  • Write pipelines by using DSL with content-assist and auto-completespring-doc.cn

  • Use auto-adjustment and grid-layout capabilities in the GUI for simpler and interactive organization of pipelinesspring-doc.cn

You should watch this screencast that highlights some of the "Flo for Spring Cloud Data Flow" capabilities. The Spring Flo wiki includes more detailed content on core Flo capabilities.spring-doc.cn

The following image shows the Flo designer in use:spring-doc.cn

Flo for Spring Cloud Data Flo
Figure 16. Flo for Spring Cloud Data Flow

37.3. Deploying a Stream

The stream deploy page includes tabs that provide different ways to set up the deployment properties and deploy the stream. The following screenshots show the stream deploy page for foobar (time | log).spring-doc.cn

You can define deployments properties by using:spring-doc.cn

  • Form builder tab: a builder that helps you to define deployment properties (deployer, application properties, and so on)spring-doc.cn

  • Free text tab: a free text area (for key-value pairs)spring-doc.cn

You can switch between both views.spring-doc.cn

The form builder offers stronger validation of the inputs.
Form builder
Figure 17. The following image shows the form builder
Free text
Figure 18. The following image shows the same properties in the free text

37.4. Accessing Stream Logs

Once the stream applications are deployed, their logs can be accessed from the Stream summary page, as the following image shows:spring-doc.cn

Stream Logs

37.5. Creating Fan-In and Fan-Out Streams

In the Fan-in and Fan-out chapter, you can learn how to support fan-in and fan-out use cases by using named destinations. The UI provides dedicated support for named destinations as well:spring-doc.cn

Fan-in and Fan-out example
Figure 19. Flo for Spring Cloud Data Flow

In this example, we have data from an HTTP Source and a JDBC Source that is being sent to the sharedData channel, which represents a fan-in use case. On the other end we have a Cassandra Sink and a File Sink subscribed to the sharedData channel, which represents a fan-out use case.spring-doc.cn

37.6. Creating a Tap Stream

Creating taps by using the Dashboard is straightforward. Suppose you have a stream consisting of an HTTP Source and a File Sink and you would like to tap into the stream to also send data to a JDBC Sink. To create the tap stream, connect the output connector of the HTTP Source to the JDBC Sink. The connection is displayed as a dotted line, indicating that you created a tap stream.spring-doc.cn

Tap stream example
Figure 20. Creating a Tap Stream

The primary stream (HTTP Source to File Sink) will be automatically named, in case you did not provide a name for the stream, yet. When creating tap streams, the primary stream must always be explicitly named. In the preceding image, the primary stream was named HTTP_INGEST.spring-doc.cn

By using the Dashboard, you can also switch the primary stream so that it becomes the secondary tap stream.spring-doc.cn

Switch tap stream to primary stream
Figure 21. Change Primary Stream to Secondary Tap Stream

Hover over the existing primary stream, the line between HTTP Source and File Sink. Several control icons appear, and, by clicking on the icon labeled Switch to/from tap, you change the primary stream into a tap stream. Do the same for the tap stream and switch it to a primary stream.spring-doc.cn

End result of switching the tap stream to a primary stream
Figure 22. End Result of Switching the Primary Stream
When interacting directly with named destinations, there can be "n" combinations (Inputs/Outputs). This allows you to create complex topologies involving a wide variety of data sources and destinations.

37.7. Import and Export Streams

The Import/Export tab of the Dashboard includes a page that provides the option to import and export streams.spring-doc.cn

The following image shows the streams export page:spring-doc.cn

Stream Utils Export
Figure 23. Stream Utils Export page

When importing the streams, you have to import from a valid JSON file. You can either manually draft the file or export the file from the streams export page.spring-doc.cn

Stream Utils Import
Figure 24. Stream Utils Import page

After importing the file, you get confirmation of whether the operation completed successfully.spring-doc.cn

Stream Utils Import Result
Figure 25. Stream Utils Import Result page

38. Tasks

The Tasks tab of the Dashboard currently has three tabs:spring-doc.cn

38.1. Apps

Each application encapsulates a unit of work into a reusable component. Within the Data Flow runtime environment, applications let you create definitions for streams as well as tasks. Consequently, the Apps tab within the Tasks tab lets you create task definitions.spring-doc.cn

You can also use this tab to create Batch Jobs.

The following image shows a typical list of task applications:spring-doc.cn

List of Task Apps
Figure 26. List of Task Apps

On this screen, you can perform the following actions:spring-doc.cn

  • View details, such as the task application options.spring-doc.cn

  • Create a task definition from the respective application.spring-doc.cn

38.1.1. View Task Application Details

On this page, you can view the details of a selected task application, including the list of available options (properties) for that application.spring-doc.cn

38.2. Definitions

This page lists the Data Flow task definitions and provides actions to launch or destroy those tasks.spring-doc.cn

The following image shows the Definitions page:spring-doc.cn

List of Task Definitions
Figure 27. List of Task Definitions

38.2.1. Create a Task Definition

The following image shows a task definition composed of the timestamp application as well as the list of task applications that can be used to create a task definiton:spring-doc.cn

List of Task Applications

On this page, you can also specify various properties that are used during the deployment of the application. Once you are satisfied with the task definition, you can click the CREATE TASK button. A dialog box then asks for a task definition name and description. At a minimum, you must provide a name for the new definition.spring-doc.cn

38.2.2. Creating Composed Task Definitions

The dashboard includes the Create Composed Task tab, which provides an interactive graphical interface for creating composed tasks.spring-doc.cn

In this tab, you can:spring-doc.cn

  • Create and visualize composed tasks by using DSL, a graphical canvas, or both.spring-doc.cn

  • Use auto-adjustment and grid-layout capabilities in the GUI for simpler and interactive organization of the composed task.spring-doc.cn

On the Create Composed Task screen, you can define one or more task parameters by entering both the parameter key and the parameter value.spring-doc.cn

Task parameters are not typed.

The following image shows the composed task designer:spring-doc.cn

Composed Task Designer
Figure 28. Composed Task Designer

38.2.3. Launching Tasks

Once the task definition has been created, you can launch the tasks through the dashboard. To do so, click the Tasks tab and select the task you want to launch by pressing Launch. The following image shows the Task Launch page:spring-doc.cn

Task Launch
Figure 29. Task Launch Page

38.2.4. Import/Export Tasks

The Import/Export page provides the option to import and export tasks. This is done by clicking the Import/Export option on the left side of page. From here, click the Export task(s): Create a JSON file with the selected tasks option. The Export Tasks(s) page appears.spring-doc.cn

The following image shows the tasks export page:spring-doc.cn

Tasks Utils Export
Figure 30. Tasks Utils Export page

Similarly, you can import task definitions. To do so, click the Import/Export option on the left side of page. From here, click the Import task(s): Import tasks from a JSON file option to show the Import Tasks page. On the Import Tasks page, you have to import from a valid JSON file. You can either manually draft the file or export the file from the Tasks Export page.spring-doc.cn

Tasks Utils Import
Figure 31. Tasks Utils Import page

After importing the file, you get confirmation on whether the operation completed successfully.spring-doc.cn

Tasks Utils Import Result
Figure 32. Tasks Utils Import Result page

38.3. Executions

The Task Executions tab shows the current running and completed task executions. From this page, you can drill down into the Task Execution details page. Furthermore, you can relaunch a Task Execution or stop a running execution.spring-doc.cn

Finally, you can clean up one or more task executions. This operation removes any associated task or batch job from the underlying persistence store. This operation can only be triggered for parent task executions and cascades down to the child task executions (if there are any).spring-doc.cn

The following image shows the Executions tab:spring-doc.cn

List of Task Executions
Figure 33. List of Task Executions

38.4. Execution Detail

For each task execution on the Task Executions tab, you can retrieve detailed information about a specific execution by clicking the Execution ID of the task execution.spring-doc.cn

List of Task Executions

On this screen, you can view not only the information from the task executions page but also:spring-doc.cn

Additionally, you can trigger the following operations:spring-doc.cn

38.4.1. Stop Executing Tasks

To submit a stop task execution request to the platform, click the drop down button next to the task execution that needs to be stopped. Now click the Stop task option. The dashboard presents a dialog box asking if you are sure that you want to stop the task execution. If so, click Stop Task Execution(s).spring-doc.cn

Stop Executing Tasks
Child Spring Cloud Task applications launched via Spring Batch applications that use remote partitioning are not stopped.

39. Jobs

The Job Executions tab of the Dashboard lets you inspect batch jobs. The main section of the screen provides a list of job executions. Batch jobs are tasks that each execute one or more batch jobs. Each job execution has a reference to the task execution ID (in the Task ID column).spring-doc.cn

The list of job executions also shows the state of the underlying Job Definition. Thus, if the underlying definition has been deleted, “No definition found” appears in the Status column.spring-doc.cn

You can take the following actions for each job:spring-doc.cn

Clicking the stop button actually sends a stop request to the running job, which may not immediately stop.

The following image shows the Jobs tab:spring-doc.cn

List of Job Executions
Figure 34. List of Job Executions

39.1. Job Execution Details

After you have launched a batch job, the Job Execution Details page shows information about the job.spring-doc.cn

The following image shows the Job Execution Details page:spring-doc.cn

Job Execution Details
Figure 35. Job Execution Details

The Job Execution Details page contains a list of the executed steps. You can further drill into the details of each step’s execution by clicking the magnifying glass icon.spring-doc.cn

39.2. Step Execution Details

The Step Execution Details page provides information about an individual step within a job.spring-doc.cn

The following image shows the Step Execution Details page:spring-doc.cn

Step Execution History
Figure 36. Step Execution Details

The Step Execution Details screen provides a complete list of all Step Execution Context key-value pairs.spring-doc.cn

For exceptions, the Exit Description field contains additional error information. However, this field can have a maximum of 2500 characters. Therefore, in the case of long exception stack traces, trimming of error messages may occur. When that happens, check the server log files for further details.

39.3. Step Execution History

Under Step Execution History, you can also view various metrics associated with the selected step, such as duration, read counts, write counts, and others across all of its executions. For each metric there are 5 attributes:spring-doc.cn

  • Count - The number of step executions that the metric could have participated. It is not a count for the number of times the event occurred during each step execution.spring-doc.cn

  • Min - The minimum value for the metric across all the executions for this step.spring-doc.cn

  • Max - The maximum value for the metric across all the executions for this step.spring-doc.cn

  • Mean - The mean value for the metric across all the executions for this step.spring-doc.cn

  • Standard Deviation - The standard deviation for the metric across all the executions for this step.spring-doc.cn

The Step Execution contains the following metrics:spring-doc.cn

  • Commit Count - The max, min, mean, and standard deviation for the number of commits of all the executions for the given step.spring-doc.cn

  • Duration - The max, min, mean, and standard deviation for the duration of all the executions for the given step.spring-doc.cn

  • Duration Per Read - The max, min, mean, and standard deviation for the duration per read of all the executions for the given step.spring-doc.cn

  • FilterCount - The max, min, mean, and standard deviation for the number of filters of all the executions for the given step.spring-doc.cn

  • Process Skip Count - The max, min, mean, and standard deviation for the process skips of all the executions for the given step.spring-doc.cn

  • Read Count - The max, min, mean, and standard deviation for the number of reads of all the executions for the given step.spring-doc.cn

  • Read Skip Count - The max, min, mean, and standard deviation for the number of read skips of all the executions for the given step.spring-doc.cn

  • Rollback Count - The max, min, mean, and standard deviation for the number of rollbacks of all the executions for the given step.spring-doc.cn

  • Write Count - The max, min, mean, and standard deviation for the number of writes of all the executions for the given step.spring-doc.cn

  • Write Skip Count - The max, min, mean, and standard deviation for the number of skips of all the executions for the given step.spring-doc.cn

40. Scheduling

You can create schedules from the SCDF Dashboard for the Task Definitions. See the Scheduling Batch Jobs section of the microsite for more information.spring-doc.cn

41. Auditing

The Auditing page of the Dashboard gives you access to recorded audit events. Audit events are recorded for:spring-doc.cn

The following image shows the Audit Records page:spring-doc.cn

List of available audit records
Figure 37. List Overview of Audit Records

By clicking the show details icon (the “i” in a circle on the right), you can obtain further details regarding the auditing details:spring-doc.cn

Details of a single audit record
Figure 38. List Details of an Audit Record

Generally, auditing provides the following information:spring-doc.cn

The written value of the audit data property depends on the performed audit operation and the action type. For example, when a schedule is being created, the name of the task definition, task definition properties, deployment properties, and command line arguments are written to the persistence store.spring-doc.cn

Sensitive information is sanitized prior to saving the Audit Record, in a best-effort manner. Any of the following keys are being detected and their sensitive values are masked:spring-doc.cn