Skip to content

Commit

Permalink
Merge pull request #93 from rtkwlf/AWN-194635
Browse files Browse the repository at this point in the history
AWN-194635
  • Loading branch information
laiba-zaman authored Apr 4, 2023
2 parents 61ae9bd + 5a1d2e8 commit f3b2232
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions en/google/dataflow/dataflow-hanged-jobs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[![CloudSploit](https://cloudsploit.com/img/logo-new-big-text-100.png "CloudSploit")](https://cloudsploit.com)

# GOOGLE / Dataflow / Dataflow Hanged Jobs
## Quick Info

| | |
|-|-|
| **Plugin Title** | Dataflow Hanged Jobs |
| **Cloud** | GOOGLE |
| **Category** | Datflow |
| **Description** | Ensure that Cloud Dataflow jobs are not in same state for more than defined amount of time. |
| **More Info** | Cloud Dataflow jobs transit between different states and normally reach terminal state. If they stay in same state for abnormal amount of time, job administrator should stop such jobs to save unnecessary cost. |
| **GOOGLE Link** | https://cloud.google.com/sdk/gcloud/reference/dataflow/jobs/cancel |
| **Recommended Action** | Cancel/stop Dataflow jobs which are in same state for more than set amount of time. |

## Detailed Remediation Steps
1. The 'gcloud dataflow jobs cancel' commandlet cancels all jobs that match the command line arguments.

2. To cancel jobs, log into the Google Cloud Console and open a cloud shell instance. See [Using Cloud Shell](#https://cloud.google.com/shell/docs/using-cloud-shell) for more details on access.

3. Run the command in the following manner, replacing the variables with values corresponding to your organization:
```
gcloud dataflow jobs cancel JOB_ID [JOB_ID …] [--force] [--region=REGION_ID] [GCLOUD_WIDE_FLAG …]
```

4. This variant is also available:
```
gcloud beta dataflow jobs cancel
```

0 comments on commit f3b2232

Please sign in to comment.