Skip to content

Commit

Permalink
Plugin docker_: fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
sumpfralle committed Feb 23, 2021
1 parent be4ad90 commit 98aeca5
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions plugins/docker/docker_
Original file line number Diff line number Diff line change
Expand Up @@ -451,29 +451,29 @@ def cpu(client, mode):


def network(client, mode):
if mode == "config":
print("graph_title Docker containers network usage")
print("graph_args --base 1024 -l 0")
print("graph_vlabel bits in (-) / out (+) per ${graph_period}")
print("graph_category virtualization")
print("graph_info This graph shows docker container network usage.")
print("graph_total Total network usage")
for container in client.all_containers:
fieldname = clean_fieldname(container.name)
print("{}_down.label {}_received".format(fieldname, container.name))
print("{}_down.type DERIVE".format(fieldname))
print("{}_down.min 0".format(fieldname))
print("{}_down.graph no".format(fieldname))
print("{}_down.cdef {}_down,8,*".format(fieldname, fieldname))
print("{}_up.label {}".format(fieldname, container.name))
print("{}_up.draw LINESTACK1".format(fieldname))
print("{}_up.type DERIVE".format(fieldname))
print("{}_up.min 0".format(fieldname))
print("{}_up.negative {}_down".format(fieldname, fieldname))
print("{}_up.cdef {}_up,8,*".format(fieldname, fieldname))
print("{}_up.info {}".format(fieldname, container_attributes(container)))
else:
print_containers_network(client)
if mode == "config":
print("graph_title Docker containers network usage")
print("graph_args --base 1024 -l 0")
print("graph_vlabel bits in (-) / out (+) per ${graph_period}")
print("graph_category virtualization")
print("graph_info This graph shows docker container network usage.")
print("graph_total Total network usage")
for container in client.all_containers:
fieldname = clean_fieldname(container.name)
print("{}_down.label {}_received".format(fieldname, container.name))
print("{}_down.type DERIVE".format(fieldname))
print("{}_down.min 0".format(fieldname))
print("{}_down.graph no".format(fieldname))
print("{}_down.cdef {}_down,8,*".format(fieldname, fieldname))
print("{}_up.label {}".format(fieldname, container.name))
print("{}_up.draw LINESTACK1".format(fieldname))
print("{}_up.type DERIVE".format(fieldname))
print("{}_up.min 0".format(fieldname))
print("{}_up.negative {}_down".format(fieldname, fieldname))
print("{}_up.cdef {}_up,8,*".format(fieldname, fieldname))
print("{}_up.info {}".format(fieldname, container_attributes(container)))
else:
print_containers_network(client)


def memory(client, mode):
Expand Down

0 comments on commit 98aeca5

Please sign in to comment.