marmotdata/flink
Discover jobs and their vertices from an Apache Flink JobManager
The Flink plugin discovers jobs from an Apache Flink JobManager. Each job becomes a Pipeline, each vertex of its job graph a Task, with CONTAINS edges from the Pipeline to its Tasks and DEPENDS_ON edges between Tasks taken from the job plan. The timestamps Flink keeps for a job's state changes are recorded as run history.
It reads the JobManager REST API (/config, /jobs/overview, /jobs/{jid}, /jobs/{jid}/config, /jobs/{jid}/exceptions), which needs no credentials. username/password and token are for a proxy placed in front of the JobManager.
Naming
A Pipeline is named after the job. Flink lets several jobs share a name, in which case the most recently started job keeps the bare name and the others are named <name> (<jid>). A Task is named after its vertex and its MRN is mrn://asset/task/flink/<pipeline name>.<vertex name>. Set zone when you catalogue more than one JobManager, which puts it in every MRN, for example mrn://asset/pipeline/flink@prod/wordcount.
Jobs the JobManager still lists
The JobManager keeps listing finished, failed and cancelled jobs until it restarts. They are discovered by default; set include_completed: false to keep only jobs that are still running.
In the UI
Point and click, no config file needed.
- Open Runs and choose Create pipeline.
- Pick Apache Flink from the plugin list.
- Fill in the settings, set a schedule and save.
With the CLI
Save a YAML config, then run marmot ingest.
Not using plugins? Other ways to populate Marmot
Configuration
Fields marked Required must be set.
tagsList of textTags to apply to discovered assets
external_linksList of groupsExternal links to show on all assets
nameTextDisplay name for the link
iconTextIcon identifier for the link
urlTextURL to the external resource
filterGroup of settingsFilter discovered assets by name (regex)
includeList of textInclude patterns for resource names (regex)
excludeList of textExclude patterns for resource names (regex)
zoneTextTells this system apart from others of the same technology and becomes part of every asset's MRN
hostText RequiredJobManager REST URL, for example http://localhost:8081
usernameTextUsername for basic auth, when a proxy in front of the JobManager requires it
passwordSecretPassword for basic auth
tokenSecretBearer token, when a proxy in front of the JobManager requires it
verify_sslYes or noVerify the JobManager's TLS certificate
include_tasksYes or noDiscover each job vertex as a Task asset
include_run_historyYes or noRecord each job's state changes as run history
include_completedYes or noInclude the finished, failed and cancelled jobs the JobManager still lists
Assets emitted
Metadata this plugin attaches to each discovered asset.
Pipeline
The metadata fields the Flink plugin emits for Pipeline assets (one per job).
Task
The metadata fields the Flink plugin emits for Task assets (one per job vertex).