-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show alert timezone along with time. Before: ![image](https://github.com/lyft/opsreview/assets/895548/efad48e0-849e-4bdd-8da7-bd4908768edd) After: ![image](https://github.com/lyft/opsreview/assets/895548/ae75cbe7-491f-426d-b2e6-6c4a1a817eb4)
- Loading branch information
Showing
2 changed files
with
10 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,21 +12,21 @@ Using the opsreview tool, you can quickly compile a report on recent alerts for | |
``` | ||
> python pull_alerts.py | ||
Time: Tuesday, January 19 - 9:19 AM | ||
Time: Tuesday, January 19 - 9:19 AM +0000 | ||
Service: api | ||
Description: Failing API alarm: CRON failure | ||
URL: https://subdomain.pagerduty.com/incidents/ABC123 | ||
Notes: | ||
['[email protected]: #a - Re-ran CRON'] | ||
Time: Tuesday, January 19 - 12:03 PM | ||
Time: Tuesday, January 19 - 12:03 PM +0000 | ||
Service: api | ||
Description: Failing API alarm: CPU percent > 10 | ||
URL: https://subdomain.pagerduty.com/incidents/ABC124 | ||
Notes: | ||
['[email protected]: #na - Temporary spike in CPU, no action taken. Alert is too sensitive.'] | ||
Time: Tuesday, January 19 - 1:35 PM | ||
Time: Tuesday, January 19 - 1:35 PM +0000 | ||
Service: www | ||
Description: Failing WWW alarm: 5XX percent > 5 | ||
URL: https://subdomain.pagerduty.com/incidents/ABC125 | ||
|
@@ -57,3 +57,9 @@ Run the script. | |
```bash | ||
python pull_alerts.py | ||
``` | ||
|
||
## Timezone | ||
By default, local timezone is used to print alert time. To change default timezone use `TZ` environment variable: | ||
```bash | ||
TZ=UTC python pull_alerts.py | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters