Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P6148
traffic-clusterssh.py
Active
Public
Actions
Authored by
•
ema
on Oct 18 2017, 10:28 AM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F10291198: traffic-clusterssh.py
Oct 18 2017, 10:28 AM
2017-10-18 10:28:46 (UTC+0)
Subscribers
None
#!/usr/bin/python
import
cumin
from
cumin.query
import
Query
config
=
cumin
.
Config
()
def
query_and_print
(
label
,
query
):
hosts
=
Query
(
config
)
.
execute
(
query
)
for
host
in
hosts
:
print
(
'{} {}'
.
format
(
label
,
host
))
for
dc
in
[
'eqiad'
,
'esams'
,
'codfw'
,
'ulsfo'
]:
for
cache
in
[
'text'
,
'upload'
,
'misc'
]:
label
=
'{}_{}'
.
format
(
cache
,
dc
)
query_and_print
(
label
,
'A:cp-{}'
.
format
(
label
))
label
=
'lvs-{}'
.
format
(
dc
)
query_and_print
(
label
,
'A:{}'
.
format
(
label
))
Event Timeline
•
ema
created this paste.
Oct 18 2017, 10:28 AM
2017-10-18 10:28:46 (UTC+0)
Log In to Comment