Ad Widget

Collapse

zabbix_get on proxy and zabbix_agentd on client reports different

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • royalliege
    Junior Member
    • Dec 2018
    • 6

    #1

    zabbix_get on proxy and zabbix_agentd on client reports different

    Hello,

    I have written a python script to monitor allocation on vgdocker and added it as an item to Zabbix. Although I get the right value with zabbix_agentd on client server(dockerserver); zabbix_get on proxy server generates error:


    I ran the command with zabbix user (su -s /bin/bash zabbix)
    $ zabbix_agentd -t vg.allocated.pool[Allocated]
    vg.allocated.pool[Allocated] [t|25.36]
    $ zabbix_agentd -V
    zabbix_agentd (daemon) (Zabbix) 4.0.3
    Revision 87993 20 December 2018, compilation time: Dec 20 2018 11:29:54


    # zabbix_get -s dockerserver -k "vg.allocated.pool[Allocated]"
    Traceback (most recent call last):
    File "/etc/zabbix/zabbix_agentd.d/vgdocker.py", line 29, in <module>
    get_connection(parse_args.state_name)
    File "/etc/zabbix/zabbix_agentd.d/vgdocker.py", line 21, in get_connection
    poolused = allocated_pool.split()[-1][:-1]
    IndexError: list index out of range
    # zabbix_get -V
    zabbix_get (Zabbix) 4.0.3
    Revision 87993 20 December 2018, compilation time: Dec 20 2018 11:29:54


    Could you assist me what to check?

    Thanks,


    Edit: Solved by changing sudo permission to run the whole script rather than vgdisplay command.
    Last edited by royalliege; 18-07-2019, 14:45. Reason: Solved
Working...