1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 02:51:03 +00:00
Commit graph

36 commits

Author SHA1 Message Date
Steve Baroti
cc5e06ec15 kvm_*: improve field names for Proxmox, Centos
fixed graphing failures for VM deployed on legacy Centos 6.9 virtualization
platforms (script uses the Proxmox entries), in the case of VM domain names
beggining with digits (first field name character must be [a-ZA-Z_])

used "Validate field names" Python stanza from documentation ("How to write
plugins", "Notes on field names") to improve the clean_vm_name function, thus
munin kvm graph creation succeeded for VM with names starting with digits,
like "150-121-Apache", deployed on Centos 6.9 virtualization platforms.
2022-08-27 11:48:42 -04:00
Steve Baroti
d00a5ab56b kvm_*: improve field names
fixed graph failure for VM names starting with digits

used "Validate filednames" Python stanza from docs to improve
clean_vm_name functions, helping graph creations for VM with names
starting with digits, like "150-121-Apache".

remember: each data source in a plugin must be identified by a field
name (in this case VM names). The characters must be [a-zA-Z0-9_],
while the first character must be [a-zA-Z_].
2022-06-22 16:43:40 +02:00
Lars Kruse
c293e35216 kvm_io: fix graph failure for specific VM names
Thanks, Michael Grote!

Closes: #1291
2022-04-01 22:55:52 +02:00
Alois
367a4b3727
munin-libvirtpy now in python3 (#1258)
* works on debian bullseye
* flake8 compatiblity ckecked
* print errors to file=sys.stderr
2021-11-17 14:32:32 +01:00
Alois
b76174718e
kvm_io now in python3 (#1254)
* works on debian bullseye with this modification.
* removed all codestyle issues, checked with "pycodestyle" on debian bullseye, besides two "line too long"
* "config" param must not have newlines to avoid a warning in munin-update.log
2021-11-16 23:13:03 +01:00
Alois
b6912e7649 Update kvm_cpu
the line length change doesn't make the world better... without pyflakes I already wondered, why there is an additional linebreak. now it needs two additional one to stay below 99 
changes here are tested and work on Python 3.7.3 (debian buster).
2021-03-10 12:19:28 +01:00
Alois
acdaeb6d11 Update kvm_cpu
in python3 filter returns an object, not an list. I think a list is required here? at least the plugin works as soon as list(...) is added.
need to change from pid to pid.decode, as pid is binary and not a string.
2021-03-10 12:19:28 +01:00
Alois
9ecd634f86 Update munin-libvirtpy
if config has sys.exit(1) the plugin config does not work.
2021-03-04 16:07:02 +01:00
Lars Kruse
bde90ba910 Plugin kvm_cpu: migrate to Python3, format documentation 2020-11-26 02:19:48 +01:00
Lars Kruse
a7139bcaee Unify shebang for python scripts 2020-10-28 23:38:41 +01:00
Bianco Veigel
6b4a3124c7 switch to python3 2020-09-11 13:15:43 +02:00
Bianco Veigel
2385a6f570 refactoring and python3 compatibility 2020-09-07 19:13:39 +02:00
Bianco Veigel
8cb47cbfbb remove empty line from config 2020-08-30 20:57:50 +02:00
Bianco Veigel
225a9156df add proxmox comment 2020-08-17 02:41:02 +02:00
Bianco Veigel
00f8fce4f8 prevent duplicate graphs and unify line style 2020-08-17 02:41:02 +02:00
Bianco Veigel
113008b06d use name from commandline parameter for kvm 2020-08-17 02:41:02 +02:00
Lars Kruse
8713eb3722 Fix spelling mistakes in comments and descriptions
Thanks, codespell!
2020-03-26 04:23:21 +01:00
Benoît S
c4a08bfa53 libvirt/kvm_*: Simple regex to match VM name
On Debian Stretch the cmdline is something like:
qemu-system-x86_64-enable-kvm-nameguest=vmname,debug-threads=on-S-[…]
Without null characters:
qemu-system-x86_64 -enable-kvm -name guest=vmname,debug-threads=on[…]

We need to match only guest=vmname, so the regex
"^.*guest=([a-zA-Z0-9.-_-]*).*$" is simpler and match the VM name.
The precedent regex "^.*-name\x00([a-zA-Z0-9.-_-]*)\x00\-.*$" was not matching it.

BTW, It seems that \x00 does not match correctly null characters so I removed it.
2019-07-11 22:54:45 +02:00
Lars Kruse
17f784270a Whitespace cleanup
* remove trailing whitespace
* remove empty lines at the end of files
2018-08-02 02:33:25 +02:00
Lars Kruse
33e95e6ff9 Review and unify category assignments of plugins 2018-08-01 23:56:56 +02:00
Lars Kruse
e0b74c69d7 kvm_net: add technical details to 'graph_info' 2018-06-10 22:04:39 +02:00
Lars Kruse
e0df6aa788 kvm_net: improve the network interface name parser and admit its limits
The network interface parser of this plugin was overly specific before.
It relied on a specific format of the arguments handed over to kvm while
starting the VM.  For example the following format was usable:

  ... -netdev tap,ifname=foo,...

But kvm/qemu support a variety of ways for configuring network
interfaces via the commandline.  E.g. libvirt does not use the "ifname"
parameter above.  Thus VMs running on a host controlled via libvirt
cannot be tracked with this plugin.

This limititation is now clearly documented in the header of the plugin.
2018-06-10 22:04:39 +02:00
Lars Kruse
b6c6a02efe kvm_net: update VM name parsing
The old parser seemed to rely on a simple "-name foo" argument format of
kvm/qemu. The changed parser also accepts the following formats:
* name,foo=bar,baz=bot
* guest=name,foo=bar
2018-06-10 22:04:39 +02:00
Lars Kruse
54330cc3e6 kvm_net: simplify argument handling 2018-06-10 22:04:39 +02:00
Lars Kruse
89e4dd6420 kvm_net: avoid shell when using Popen 2018-06-10 22:04:39 +02:00
Lars Kruse
aa8f1a59c4 kvm_net: fix python code style issues 2018-06-10 22:04:39 +02:00
Lars Kruse
a9059703a6 kvm_net: switch to perldoc documentation header 2018-06-10 22:04:39 +02:00
Lars Kruse
3267bbd0ef kvm_net: switch to python3 2018-06-10 22:04:39 +02:00
Lars Kruse
67cc769c87 kvm_net: use print function for python3-compatibility 2018-06-10 22:04:39 +02:00
Lars Kruse
f6080f5f8e kvm_net: unify whitespace 2018-06-10 22:04:39 +02:00
Lars Kruse
7f98e21f2b kvm_net: unify quoting 2018-06-10 17:51:34 +02:00
Lars Kruse
e87d3a6b3c kvm_net: remove unused function 'find_vms_tap' 2018-06-10 17:51:34 +02:00
Jan Egil Vestbø
67d6e559ec Read correct values from /proc/net/dev 2017-09-30 17:44:16 +02:00
Jan Egil Vestbø
621744a6f0 Includes more kvm-processes 2017-09-30 17:42:37 +02:00
Lars Kruse
4b2fcbf8b9 replace hard-coded paths (e.g. '/var/lib/munin/plugin-state') with '$MUNIN_PLUGSTATE'
see http://guide.munin-monitoring.org/en/latest/plugin/env.html
2017-04-18 23:32:55 +02:00
dipohl
f5b816df9e Plugin-Gallery: get better 2nd level headings 2017-02-23 19:53:57 +01:00