tcpcloud / Zabbix-Template-Linux-Collectd_libvirt

A Zabbix template for monitoring libvirt stats over collectd
12 stars 10 forks source link

collect script does not replace "-" with "/" #4

Closed ghost closed 9 years ago

ghost commented 10 years ago

Hello.

Here the output of collect-handler:

hn2 scripts # ./collect-libvirt-handler.pl | grep serve Use of uninitialized value $val in string eq at ./collect-libvirt-handler.pl line 15. "{#NAME}":"serve.lordcritical-libvirt-disk_octets-vda"}, "{#NAME}":"serve.lordcritical-libvirt-disk_ops-vda"}, "{#NAME}":"serve.lordcritical-libvirt-if_dropped-vnet0"}, "{#NAME}":"serve.lordcritical-libvirt-if_errors-vnet0"}, "{#NAME}":"serve.lordcritical-libvirt-if_octets-vnet0"}, "{#NAME}":"serve.lordcritical-libvirt-if_packets-vnet0"}, "{#NAME}":"serve.lordcritical-libvirt-memory-total"}, "{#NAME}":"serve.lordcritical-libvirt-virt_cpu_total"}, "{#NAME}":"serve.lordcritical-libvirt-virt_vcpu-0"}, "{#NAME}":"serve.lordcritical-libvirt-virt_vcpu-1"}, "{#NAME}":"serve.lordcritical-libvirt-virt_vcpu-2"}, "{#NAME}":"serve.lordcritical-libvirt-virt_vcpu-3"}, hn2 scripts #

Now i try to get the numbers for virt_cpu_total. With slashes it works without it doesn't.

hn2 scripts # ./collect-libvirt-handler.pl /var/run/collectd/collectd-unixsock GETVAL serve.lordcritical-libvirt-virt_cpu_total
DEBUG: command: GETVAL serve.lordcritical-libvirt/libvirt/virt_cpu_total val: serve.lordcritical-libvirt/libvirt/virt_cpu_total 0

Take a closer look here. It says libvirt twice. Must be a bug in the perl script?

Another example has different problems:

hn2 scripts # ./collect-libvirt-handler.pl /var/run/collectd/collectd-unixsock GETVAL serve.lordcritical-libvirt-if_octets-vnet0 NET-OCTETS-TX DEBUG: command: GETVAL serve.lordcritical-libvirt-if_octets-vnet0 val: serve.lordcritical-libvirt-if_octets-vnet0 Invalid id "serve.lordcritical-libvirt-if_octets-vnet0". ERROR: Command failed!

When i replace the minus with slashes it works.

hn2 scripts # ./collect-libvirt-handler.pl /var/run/collectd/collectd-unixsock GETVAL serve.lordcritical/libvirt/if_octets-vnet0 NET-OCTETS-TX DEBUG: command: GETVAL serve.lordcritical/libvirt/if_octets-vnet0 val: serve.lordcritical/libvirt/if_octets-vnet0 211.3315

hn2 scripts # perl --version

This is perl 5, version 18, subversion 2 (v5.18.2) built for x86_64-linux-thread-multi (with 25 registered patches, see perl -V for more detail)

collectd 5.4.1

cheers t.

czhujer commented 10 years ago

Hi, thanks for testing. This is issue with parsing and transformating kvm guest names. I have to create stack with same version a OS.

Can you send me results of "cat /cat/issue" and "uname -a"?

ghost commented 10 years ago

On 23. Oktober 2014 13:08:37 MESZ, Patrik Majer notifications@github.com wrote:

Hi, thanks for testing. This is issue with parsing and transformating kvm guest names. I have to create stack with same version a OS.

Can you send me results of "cat /cat/issue" and "uname -a"?


Reply to this email directly or view it on GitHub: https://github.com/tcpcloud/Zabbix-Template-Linux-Collectd_libvirt/issues/4#issuecomment-60223455

hi.

it's gentoo linux with kernel 3.17.1.

cheers t.

czhujer commented 10 years ago

ok, I check this.

cheers p.

czhujer commented 10 years ago

Hi, I found this distro is more complex installation procedure. have you (or you can send a link) virtual appliance with installed gentoo linux?

Otherwise, the repair will take longer :/

cheers Patrik

ghost commented 10 years ago

On Wednesday 29 October 2014 04:08:23 Patrik Majer wrote:

Hi,

Hello Patrick.

Can you send me your public ssh key? I then can give you access to one of my dev machines.

cheers t.

I found that distro is more complex installation procedure. have you (or you can send a link) with installed gentoo linux?

Otherwise, the repair will take longer :/

cheers Patrik


Reply to this email directly or view it on GitHub: https://github.com/tcpcloud/Zabbix-Template-Linux-Collectd_libvirt/issues/4# issuecomment-60905646

czhujer commented 10 years ago

no problem... ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIBicqrOM6TbpZDMDac4FuZDYsY9Npg6wI2M8TWm6mMxeJbIY9Okd5k1nz4mN6GRgB+dpH3C6z9SpXGlyf0SFmcf/f5+c0M2SL4GyzL3aJ+ZwZj/evHZII3UJupn570Xj8sw2cyNXHd1lbLqbvqL9Y4GQY1urd0IFaQvSaqio+Cr7Q== czhujer

ghost commented 10 years ago

On Thursday 30 October 2014 00:10:15 Patrik Majer wrote:

no problem... ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIBicqrOM6TbpZDMDac4FuZDYsY9Npg6wI2M8TWm6mMxeJbIY9O kd5k1nz4mN6GRgB+dpH3C6z9SpXGlyf0SFmcf/f5+c0M2SL4GyzL3aJ+ZwZj/evHZII3UJupn570 Xj8sw2cyNXHd1lbLqbvqL9Y4GQY1urd0IFaQvSaqio+Cr7Q== czhujer

Okay. Could you give me your email address please? I don't like to post hostnames to github.

cheers t.

czhujer commented 9 years ago

all issues with gentoo, json formatting and libvirt guests names have been solved in https://github.com/czhujer/Zabbix-Template-Linux-Collectd_libvirt/tree/devel