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)
    # init some vars
    msg = ''
    state = STATE_OK
    perfdata = ''
    # fetch data
    # https://docs.wildfly.org/23/Admin_Guide.html
    data = {
        'operation': 'read-resource',
        'include-runtime': 'true',
        # /core-service/platform-mbean/type/memory
        'address': [{'core-service': 'platform-mbean'}, {'type': 'memory'}],
        'json': 1,
    }
    res = lib.wildfly.get_data(args, data)
    mem_used = res['heap-memory-usage']['used']
    mem_committed = res['heap-memory-usage']['committed']
    mem_max = res['heap-memory-usage']['max']
    used_percent = round((float(mem_used) / float(mem_max) * 100), 2)
    used_state = lib.base.get_state(used_percent, args.WARN, args.CRIT, 'ge')
    committed_percent = round((float(mem_committed) / float(mem_max) * 100), 2)
    committed_state = lib.base.get_state(committed_percent, args.WARN, args.CRIT, 'ge')
    msg += 'Heap used: {}% ({} of {}){}, Heap committed: {}% ({} of {}){}, '.format(
        used_percent, lib.human.bytes2human(mem_used), lib.human.bytes2human(mem_max), lib.base.state2str(used_state, prefix=' '),
        committed_percent, lib.human.bytes2human(mem_committed), lib.human.bytes2human(mem_max), lib.base.state2str(committed_state, prefix=' '),
    )
    state += lib.base.get_worst(used_state, committed_state)
    perfdata += lib.base.get_perfdata('heap-used-percent', used_percent, '%', args.WARN, args.CRIT, 0, 100)
    perfdata += lib.base.get_perfdata('heap-committed-percent', committed_percent, '%', args.WARN, args.CRIT, 0, 100)
    perfdata += lib.base.get_perfdata('heap-used', mem_used, 'B', None, None, 0, mem_max)
    perfdata += lib.base.get_perfdata('heap-max', mem_max, 'B', None, None, 0, mem_max)
    perfdata += lib.base.get_perfdata('heap-committed', mem_committed, 'B', None, None, 0, mem_max)
    mem_used = res['non-heap-memory-usage']['used']
    mem_committed = res['non-heap-memory-usage']['committed']
    mem_max = res['non-heap-memory-usage']['max']
    used_percent = round((float(mem_used) / float(mem_max) * 100), 2)
    used_state = lib.base.get_state(used_percent, args.WARN, args.CRIT, 'ge')
    committed_percent = round((float(mem_committed) / float(mem_max) * 100), 2)
    committed_state = lib.base.get_state(committed_percent, args.WARN, args.CRIT, 'ge')
    msg += 'Non-Heap used: {}% ({} of {}){}, Non-Heap committed: {}% ({} of {}){}, '.format(
        used_percent, lib.human.bytes2human(mem_used), lib.human.bytes2human(mem_max), lib.base.state2str(used_state, prefix=' '),
        committed_percent, lib.human.bytes2human(mem_committed), lib.human.bytes2human(mem_max), lib.base.state2str(committed_state, prefix=' '),
    )
    state += lib.base.get_worst(used_state, committed_state)
    perfdata += lib.base.get_perfdata('non-heap-used-percent', used_percent, '%', args.WARN, args.CRIT, 0, 100)
    perfdata += lib.base.get_perfdata('non-heap-committed-percent', committed_percent, '%', args.WARN, args.CRIT, 0, 100)
    perfdata += lib.base.get_perfdata('non-heap-used', mem_used, 'B', None, None, 0, mem_max)
    perfdata += lib.base.get_perfdata('non-heap-max', mem_max, 'B', None, None, 0, mem_max)
    perfdata += lib.base.get_perfdata('non-heap-committed', mem_committed, 'B', None, None, 0, mem_max)
    # over and out
    lib.base.oao(msg[:-2], state, perfdata, always_ok=args.ALWAYS_OK)