zabbix_bot.py
def _dnsjedi_chunks_left(zabbix_config):
    """Returns the chunks left for each clustermanager.

    :param zabbix_config: the zabbix configuration
    :type zabbix_config: dict
    :return: message to send back
    """
    lines = []
    clustermanagers = zabbix.get_itemvalues_for_group(
        zabbix_config, 'Clustermanagers',
        ['cms.chunks_left',
         ])

    if clustermanagers is not None:
        for name, value in sorted(clustermanagers.items()):
            left = value[0]
            lines.append(
                "{0:10s}: {1:>5s} chunks left".format(
                    name, left))
    return "<br />".join(lines)
Returns the chunks left for each clustermanager.

    :param zabbix_config: the zabbix configuration
    :type zabbix_config: dict
    :return: message to send back
    
Returns the chunks left for each clustermanager.
Returns the chunks left for each clustermanager .
def _dnsjedi_chunks_left(zabbix_config):
    lines = []
    clustermanagers = zabbix.get_itemvalues_for_group(
        zabbix_config, 'Clustermanagers',
        ['cms.chunks_left',
         ])
    if clustermanagers is not None:
        for name, value in sorted(clustermanagers.items()):
            left = value[0]
            lines.append(
                "{0:10s}: {1:>5s} chunks left".format(
                    name, left))
    return "<br />".join(lines)
def _dnsjedi_chunks_left ( zabbix_config ) : lines = [ ] clustermanagers = zabbix . get_itemvalues_for_group ( zabbix_config , 'Clustermanagers' , [ 'cms.chunks_left' , ] ) if clustermanagers is not None : for name , value in sorted ( clustermanagers . items ( ) ) : left = value [ 0 ] lines . append ( "{0:10s}: {1:>5s} chunks left" . format ( name , left ) ) return "<br />" . join ( lines )
Returns the chunks left for each clustermanager.
Returns the chunks left for each clustermanager .
"""Returns the chunks left for each clustermanager.

    :param zabbix_config: the zabbix configuration
    :type zabbix_config: dict
    :return: message to send back
    """
message to send back
message to send back
zabbix_config
the zabbix configuration
the zabbix configuration