zabbix_bot.py
def _dnsjedi_chunks_forecast(zabbix_config):
    """Returns the chunks forecast 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.co_queue_len_forecast',
         ])

    if clustermanagers is not None:
        for name, value in sorted(clustermanagers.items()):
            logging.debug('%s: %s', name, value[0])
            time_left = _dnsjedi_forecast_format(value[0])
            lines.append(
                "{0}: {1}".format(
                    name, time_left))
    return "<br />".join(lines)
Returns the chunks forecast for each clustermanager.

    :param zabbix_config: the zabbix configuration
    :type zabbix_config: dict
    :return: message to send back
    
Returns the chunks forecast for each clustermanager.
Returns the chunks forecast for each clustermanager .
def _dnsjedi_chunks_forecast(zabbix_config):
    lines = []
    clustermanagers = zabbix.get_itemvalues_for_group(
        zabbix_config, 'Clustermanagers',
        ['cms.co_queue_len_forecast',
         ])
    if clustermanagers is not None:
        for name, value in sorted(clustermanagers.items()):
            logging.debug('%s: %s', name, value[0])
            time_left = _dnsjedi_forecast_format(value[0])
            lines.append(
                "{0}: {1}".format(
                    name, time_left))
    return "<br />".join(lines)
def _dnsjedi_chunks_forecast ( zabbix_config ) : lines = [ ] clustermanagers = zabbix . get_itemvalues_for_group ( zabbix_config , 'Clustermanagers' , [ 'cms.co_queue_len_forecast' , ] ) if clustermanagers is not None : for name , value in sorted ( clustermanagers . items ( ) ) : logging . debug ( '%s: %s' , name , value [ 0 ] ) time_left = _dnsjedi_forecast_format ( value [ 0 ] ) lines . append ( "{0}: {1}" . format ( name , time_left ) ) return "<br />" . join ( lines )
Returns the chunks forecast for each clustermanager.
Returns the chunks forecast for each clustermanager .
"""Returns the chunks forecast 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