def METHOD_NAME():
    """The main function. Hier spielt die Musik.
    """
    # parse the command line, exit with UNKNOWN if it fails
    try:
        args = parse_args()
    except SystemExit:
        sys.exit(STATE_UNKNOWN)
    # fetch data
    # https://docs.wildfly.org/23/Admin_Guide.html
    data = {
        'operation': 'read-resource',
        'include-runtime': 'true',
        'recursive': 'true',
        # /core-service/platform-mbean/type/memory-pool
        'address': [{'core-service': 'platform-mbean'}, {'type': 'memory-pool'}],
        'json': 1,
    }
    result = lib.wildfly.get_data(args, data)
    # init some vars
    msg = ''
    state = STATE_OK
    perfdata = ''
    table_data = []
    # analyze the data
    # "Peak" values are not of interest in a monitoring scenario where values are
    # checked every minute. It is safe to ignore them.
    for name, value in result['name'].items():
        if not value['valid']:
            state = STATE_WARN
            value['name'] += ' (invalid {})'.format(lib.base.state2str(STATE_WARN))
        value['usage-calc'] = '{} / {} / {}'.format(
            lib.human.bytes2human(value['usage']['used']),
            lib.human.bytes2human(value['usage']['committed']),
            lib.human.bytes2human(value['usage']['max']),
        )
        if value['usage-threshold-exceeded']:
            state = STATE_WARN
            value['usage-calc'] += lib.base.state2str(STATE_WARN, prefix=' ')
            value['usage-calc'] += ' ({}x)'.format(value['usage-threshold-count'])
        perfdata += lib.base.get_perfdata('memory-pool-{}-usage-init'.format(name), value['usage']['init'], 'B', None, None, 0, None)
        perfdata += lib.base.get_perfdata('memory-pool-{}-usage-used'.format(name), value['usage']['used'], 'B', None, None, 0, None)
        perfdata += lib.base.get_perfdata('memory-pool-{}-usage-committed'.format(name), value['usage']['committed'], 'B', None, None, 0, None)
        perfdata += lib.base.get_perfdata('memory-pool-{}-usage-max'.format(name), value['usage']['max'], 'B', None, None, 0, None)
        if value['collection-usage']:
            value['collection-usage-calc'] = '{} / {} / {}'.format(
                lib.human.bytes2human(value['collection-usage']['used']),
                lib.human.bytes2human(value['collection-usage']['committed']),
                lib.human.bytes2human(value['collection-usage']['max']),
            )
            if value['collection-usage-threshold-exceeded']:
                state = STATE_WARN
                value['collection-usage-calc'] += lib.base.state2str(STATE_WARN, prefix=' ')
                value['collection-usage-calc'] += ' ({}x)'.format(value['collection-usage-threshold-count'])
            perfdata += lib.base.get_perfdata('memory-pool-{}-collection-usage-init'.format(name), value['collection-usage']['init'], 'B', None, None, 0, None)
            perfdata += lib.base.get_perfdata('memory-pool-{}-collection-usage-used'.format(name), value['collection-usage']['used'], 'B', None, None, 0, None)
            perfdata += lib.base.get_perfdata('memory-pool-{}-collection-usage-committed'.format(name), value['collection-usage']['committed'], 'B', None, None, 0, None)
            perfdata += lib.base.get_perfdata('memory-pool-{}-collection-usage-max'.format(name), value['collection-usage']['max'], 'B', None, None, 0, None)
        else:
            value['collection-usage-calc'] = 'N/A'
        table_data.append(value)
    if table_data:
        keys = [
            'name',
            'type',
            'usage-calc',
            'collection-usage-calc',
        ]
        headers = [
            'name',
            'Type',
            'Usage used / committed / max',
            'Collection used / committed/ max',
        ]
        msg += lib.base.get_table(table_data, keys, header=headers)
    if state == STATE_CRIT:
        msg = 'There are critical errors.\n\n' + msg
    elif state == STATE_WARN:
        msg = 'There are warnings.\n\n' + msg
    else:
        msg = 'Everything is ok.\n\n' + msg
    # over and out
    lib.base.oao(msg, state, perfdata, always_ok=args.ALWAYS_OK)