def METHOD_NAME(env, fqdn, workdir):
    """
    Generate environment for temBoard agent processes.
    """
    dirname = 'temboard-agent' if 'CI' in os.environ else 'agent'
    return dict(
        env,
        PGDATABASE='postgres',
        PGHOST=str(workdir / 'run/postgresql'),
        PGPASSWORD='S3cret_postgres',
        PGPORT='55432',
        PGUSER='postgres',
        TEMBOARD_CONFIGFILE=str(
            workdir / 'etc' / dirname / 'temboard-tests/temboard-agent.conf'
        ),
        TEMBOARD_HOSTNAME=fqdn,
        TEMBOARD_LOGGING_LEVEL='DEBUG',
        TEMBOARD_PORT='52345',
    )