zabbix.py
def _get_itemvalue(zapi, hostid, keys):
    """Retrieves the value for a hostid - key combination.

    :param zapi: the zabbix api reference
    :type zapi: zapi
    :param hostid: the id of the host
    :type hostid: str
    :param keys: keys to retrieve
    :type keys: str or list
    """
    if isinstance(keys, str):
        keys = [keys]

    data = []
    for key in keys:
        value = zapi.item.get(hostids=hostid, search={'key_': key})
        if value:
            data.append(value[0]['lastvalue'])

    return data
Retrieves the value for a hostid - key combination.

    :param zapi: the zabbix api reference
    :type zapi: zapi
    :param hostid: the id of the host
    :type hostid: str
    :param keys: keys to retrieve
    :type keys: str or list
    
Retrieves the value for a hostid - key combination.
Retrieves the value for a hostid - key combination .
def _get_itemvalue(zapi, hostid, keys):
    if isinstance(keys, str):
        keys = [keys]
    data = []
    for key in keys:
        value = zapi.item.get(hostids=hostid, search={'key_': key})
        if value:
            data.append(value[0]['lastvalue'])
    return data
def _get_itemvalue ( zapi , hostid , keys ) : if isinstance ( keys , str ) : keys = [ keys ] data = [ ] for key in keys : value = zapi . item . get ( hostids = hostid , search = { 'key_' : key } ) if value : data . append ( value [ 0 ] [ 'lastvalue' ] ) return data
Retrieves the value for a hostid - key combination.
Retrieves the value for a hostid - key combination .
"""Retrieves the value for a hostid - key combination.

    :param zapi: the zabbix api reference
    :type zapi: zapi
    :param hostid: the id of the host
    :type hostid: str
    :param keys: keys to retrieve
    :type keys: str or list
    """
zapi
the zabbix api reference
the zabbix api reference
hostid
the id of the host
the id of the host
keys
keys to retrieve
keys to retrieve