FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
sysdig-sdk-python/examples/list_sysdig_captures.py at master · sysdiglabs/sysdig-sdk-python · GitHub
This repository was archived by the owner on May 7, 2026. It is now read-only.
sysdiglabs
/
sysdig-sdk-python
Public archive
Notifications
You must be signed in to change notification settings
Fork
42
Star
69
Code
Issues
12
Pull requests
17
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
sysdig-sdk-python
/
examples
/
list_sysdig_captures.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
41 lines (33 loc) · 777 Bytes
Breadcrumbs
sysdig-sdk-python
/
examples
/
list_sysdig_captures.py
Copy path
File metadata and controls
executable file
·
41 lines (33 loc) · 777 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env python
#
# Print the list of sysdig captures.
#
import
sys
from
sdcclient
import
SdcClient
#
# Parse arguments
#
if
len
(
sys
.
argv
)
!=
2
:
print
((
'usage: %s <sysdig-token>'
%
sys
.
argv
[
0
]))
print
(
'You can find your token at https://app.sysdigcloud.com/#/settings/user'
)
sys
.
exit
(
1
)
sdc_token
=
sys
.
argv
[
1
]
#
# Instantiate the SDC client
#
sdclient
=
SdcClient
(
sdc_token
)
#
# Fire the request.
#
ok
,
res
=
sdclient
.
get_sysdig_captures
()
#
# Show the list of metrics
#
if
ok
:
captures
=
res
[
'dumps'
]
else
:
print
(
res
)
sys
.
exit
(
1
)
for
capture
in
captures
:
print
((
"Folder %s, Name %s, Host: %s, Size: %d, Status: %s"
%
(
capture
[
'folder'
],
capture
[
'name'
],
capture
[
'agent'
][
'hostName'
],
capture
[
'size'
],
capture
[
'status'
])))
Back
|
FazBrowse Home
|
New Git URL