From e0b74c69d705136984a6f4fbc18f1b94736fb45b Mon Sep 17 00:00:00 2001 From: Lars Kruse Date: Sun, 10 Jun 2018 22:04:14 +0200 Subject: [PATCH] kvm_net: add technical details to 'graph_info' --- plugins/libvirt/kvm_net | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/plugins/libvirt/kvm_net b/plugins/libvirt/kvm_net index 15cb6ef5..6a0a8024 100755 --- a/plugins/libvirt/kvm_net +++ b/plugins/libvirt/kvm_net @@ -65,13 +65,19 @@ def config(vm_names): @param vm_names : a list of "cleaned" vms' name """ - base_config = """graph_title KVM Network I/O -graph_vlabel Bytes rx(-)/tx(+) per second -graph_category Virtualization -graph_info This graph shows the network I/O of the virtual machines -graph_args --base 1024 - """ - print(base_config) + print("graph_title KVM Network I/O") + print("graph_vlabel Bytes rx(-)/tx(+) per second") + print("graph_category virtualization") + print("graph_args --base 1024") + print("graph_info This graph shows the network I/O of the virtual " + "machines. It is only usable for VMs that were started in a very " + "specific way. If you see no values in the diagrams, then you " + "should check, if the command \"ps -ef | grep 'netdev.*ifname='\" " + "returns one line of output for every running VM. If there is no " + "output, then you need to change the setup of your VMs or you need " + "to use a different munin plugin for monitoring the network traffic " + "(e.g. 'libvirt').") + print() for vm in vm_names: print("%s_in.label %s" % (vm, vm)) print("%s_in.type COUNTER" % vm)