def METHOD_NAME(app):
    """
    Run probes and push collected metrics in a queue.
    """
    logger.info("Starting monitoring collector.")
    config = app.config
    logger.info("Gathering host information.")
    discover = app.discover.ensure_latest()
    system_info = host_info(discover)
    logger.info("Load the probes to run.")
    probes = load_probes(
        config.monitoring,
        config.temboard.home
    )
    with app.postgres.dbpool() as pool:
        instance = instance_info(pool, app.config.monitoring.dbnames, discover)
        data = run_probes(probes, pool, [instance])
    # Prepare and send output
    output = dict(
        datetime=now(),
        hostinfo=system_info,
        instances=remove_passwords([instance]),
        data=data,
        version=__VERSION__,
    )
    logger.info("Add data to metrics table.")
    db.add_metric(
        config.temboard.home,
        'monitoring.db',
        time.time(),
        output
    )
    logger.info("Collect done.")
    try:
        logger.debug("temboard_agent_version=%s", __VERSION__)
        logger.debug("hostinfo=%s", system_info)
        for record in iter_metrics_for_logfmt(data):
            # up=1 is a marker to grep logfmt lines
            logger.debug(
                "up=1 %s",
                " ".join('%s=%s' % i for i in record.items()),
            )
    except Exception:
        logger.exception("Failed to log metrics.")