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
    # Resource to get usage data for [cpu|memory|disk|sessions|lograte].
    url = 'https://{}/api/v2/monitor/system/resource/usage?resource=mem&interval=1-min&access_token={}'.format(args.HOSTNAME, urllib.parse.quote(args.PASSWORD))
    result = lib.base.coe(lib.url.fetch_json(url, insecure=args.INSECURE, no_proxy=args.NO_PROXY, timeout=args.TIMEOUT))
    stats = {}
    stats['usage_percent'] = result['results']['mem'][0]['current']
    # try to get the global configured memory warning thresholds from Forti OS
    # if success, use them, otherwise our from args.WARN etc.
    url = 'https://{}/api/v2/cmdb/system/global?access_token={}'.format(args.HOSTNAME, urllib.parse.quote(args.PASSWORD))
    thresholds = lib.base.coe(lib.url.fetch_json(url, insecure=args.INSECURE, no_proxy=args.NO_PROXY, timeout=args.TIMEOUT))
    warn = thresholds['results'].get('memory-use-threshold-green', args.WARN)
    crit = thresholds['results'].get('memory-use-threshold-red', args.CRIT)
    state = lib.base.get_state(stats['usage_percent'], warn, crit, _operator='gt')
    # build the message
    msg = '{}%'.format(stats['usage_percent'])
    perfdata = lib.base.get_perfdata('usage_percent', stats['usage_percent'], '%', warn, crit, 0, 100)
    # over and out
    lib.base.oao(msg, state, perfdata, always_ok=args.ALWAYS_OK)