Lelik13a/Zabbix-LXC

Bug

alphaonex86 opened this issue · 5 comments

Hello, the output is very strange, it's a bug?:

odroid-c2-1 zabbix # ./lxcdiscover.pl
{
"data":[

    {
            "{#CTID}":"bulbapedia                       catchchallenger-cdn-datapack     catchchallenger-cdn-datapack-3   catchchallenger-gateway-2        catchchallenger-gateway-5        catchchallenger-gateway-pkmn     catchchallenger-login-3          catchchallenger-login-proxy-2   ",
            "{#CTSTATUS}":"RUNNING",
            "{#VENAME}":"odroid-c2-1"
    },
    {
            "{#CTID}":"catchchallenger-server-5         catchchallenger-server-bot       catchchallenger-server-imageprod catchchallenger-site-1           haproxy                          i2p                              nagios                           pkmn-i2p                        ",
            "{#CTSTATUS}":"RUNNING",
            "{#VENAME}":"odroid-c2-1"
    },
    {
            "{#CTID}":"portable-datacenter-site         reverseproxy-ipv4toipv6-1        zabbix                           ",
            "{#CTSTATUS}":"RUNNING",
            "{#VENAME}":"odroid-c2-1"                                                                                                                                                                                                                                      
    }                                                                                                                                                                                                                                                                      
    ]                                                                                                                                                                                                                                                                      

}

Lxc 2.0

With "-1" arguements: "{#CTID}":"catchchallenger-site-1 ", ... Extra space at the end

Ok, I see. I will correct it.

From my lxc + munin work:
#don't use lxc-ls + ls-info + RUNNING: huge performance improvements 8s -> 0.01s
guest_names=find /sys/fs/cgroup/cpuacct/lxc/ -maxdepth 1 -mindepth 1 -type d -printf '%f\n' | sort -u

Fix this and some others. Thanks.