Skip to content

Commit 1a4c154

Browse files
committed
Add prometheus example queries
1 parent f781f0a commit 1a4c154

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,23 @@ Application Options:
120120
Help Options:
121121
-h, --help Show this help message
122122
```
123+
124+
125+
Prometheus queries
126+
------------------
127+
128+
Current oncall person
129+
```
130+
pagerduty_schedule_oncall{scheduleID="$SCHEDULEID",type="startTime"}
131+
* on (userID) group_left(userName) (pagerduty_user_info)
132+
```
133+
134+
Next shift
135+
```
136+
bottomk(1,
137+
min by (userName, time) (
138+
pagerduty_schedule_final_entry{scheduleID="$SCHEDULEID",type="startTime"}
139+
* on (userID) group_left(userName) (pagerduty_user_info)
140+
) - time() > 0
141+
)
142+
```

0 commit comments

Comments
 (0)