tcpcloud / Zabbix-Template-Linux-Collectd_libvirt

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

Error "Use of uninitialized value $val in string eq at ./collect-libvirt-handler.pl line 15." #5

Closed WiXZlo closed 9 years ago

WiXZlo commented 9 years ago

I use zabbix 2.4.3, debian 7. I have not worked autodiscovery. I get an error in Zabbix "Value should be a JSON object." The script gives an error "Use of uninitialized value $val in string eq at ./collect-libvirt-handler.pl line 15."

My example

# ./collect-libvirt-handler.pl 
Use of uninitialized value $val in string eq at ./collect-libvirt-handler.pl line 15.
{
    "data":[
        {
            "{#NAME}":"gw4-mikrotik-libvirt-disk_octets-sda"},
        {
            "{#NAME}":"gw4-mikrotik-libvirt-disk_ops-sda"},
        {
            "{#NAME}":"gw4-mikrotik-libvirt-if_dropped-vnet8"},
        {
            "{#NAME}":"gw4-mikrotik-libvirt-if_dropped-vnet9"},
        {
            "{#NAME}":"gw4-mikrotik-libvirt-if_errors-vnet8"},
        {
            "{#NAME}":"gw4-mikrotik-libvirt-if_errors-vnet9"},
        {
            "{#NAME}":"gw4-mikrotik-libvirt-if_octets-vnet8"},
        {
            "{#NAME}":"gw4-mikrotik-libvirt-if_octets-vnet9"},
        {
            "{#NAME}":"gw4-mikrotik-libvirt-if_packets-vnet8"},
        {
            "{#NAME}":"gw4-mikrotik-libvirt-if_packets-vnet9"},
        {
            "{#NAME}":"gw4-mikrotik-libvirt-virt_cpu_total"},
        {
            "{#NAME}":"gw4-mikrotik-libvirt-virt_vcpu-0"},
    ]
}
czhujer commented 9 years ago

Hi, can you try this "version" https://github.com/H-Software/Zabbix-Template-Linux-Collectd_libvirt?

czhujer commented 9 years ago

more precisely, script from devel branch? https://github.com/H-Software/Zabbix-Template-Linux-Collectd_libvirt/tree/devel

michaelkuty commented 9 years ago

Thanks @czhujer merged in #7