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
    state = STATE_OK
    perfdata = ''
    devices = {}
    # return a list of devices from LibreNMS
    result = lib.librenms.get_data(args, '/api/v0/devices?type=active')
    if args.DEVICE_GROUP:
        device_group = lib.librenms.get_data(args, '/api/v0/devicegroups/' + urllib.parse.quote(args.DEVICE_GROUP))
        device_group_device_ids = [device['device_id'] for device in device_group['devices']]
    # build an internal device list with some valuable properties
    for device in result['devices']:
        if device['disable_notify']:
            continue
        hostname = lib.librenms.get_prop(device, 'hostname')
        if args.DEVICE_HOSTNAME and hostname not in args.DEVICE_HOSTNAME:
            continue
        devtype = lib.librenms.get_prop(device, 'type')
        if args.DEVICE_TYPE and devtype not in args.DEVICE_TYPE:
            continue
        device_id = lib.librenms.get_prop(device, 'device_id', 'int')
        if args.DEVICE_GROUP and device_id not in device_group_device_ids:
            continue
        hardware = lib.librenms.get_prop(device, 'hardware')
        location = lib.librenms.get_prop(device, 'location')
        sysos = lib.librenms.get_prop(device, 'os')
        sysname = lib.librenms.get_prop(device, 'sysName')
        if not sysname:
            sysname = lib.librenms.get_prop(device, 'sysDescr')
        devices[device_id] = {}
        devices[device_id]['device_id'] = device_id
        devices[device_id]['devtype'] = devtype
        devices[device_id]['hardware'] = hardware
        devices[device_id]['hostname'] = hostname
        devices[device_id]['location'] = location
        devices[device_id]['os'] = sysos
        devices[device_id]['sys'] = sysname
        devices[device_id]['sensors'] = []
    # return a list of sensors from LibreNMS
    result = lib.librenms.get_data(args, '/api/v0/resources/sensors')
    # enrich devices by sensor data
    for sensor in result['sensors']:
        device_id = lib.librenms.get_prop(sensor, 'device_id', 'int')
        if device_id not in devices:
            continue
        devices[device_id]['sensors'].append({
            'sensor_current': sensor['sensor_current'],
            'sensor_descr': sensor['sensor_descr'],
            'sensor_lastupdate': sensor['lastupdate'],
            'sensor_limit': sensor['sensor_limit'],
            'sensor_limit_low': sensor['sensor_limit_low'],
            'sensor_prev': sensor['sensor_prev'],
            })
    # create output
    table_values = []
    for device in devices.values():
        for sensor in device['sensors']:
            table_values.append({
                'devtype': device['devtype'],
                'hardware': device['hardware'],
                'hostname': device['hostname'],
                'location': device['location'],
                'os': device['os'],
                'sensor_descr': sensor['sensor_descr'],
                'sensor_lastupdate': sensor['sensor_lastupdate'],
                'sensor_limit': '{}/{}'.format(sensor['sensor_limit_low'], sensor['sensor_limit']),
                'sensor_value': '{} ({})'.format(sensor['sensor_current'], sensor['sensor_prev']),
                'sys': device['sys'],
            })
    if len(table_values) > 0:
        msg = 'Everything is ok.\n\n'
        if not args.LENGTHY:
            msg += lib.base.get_table(
                table_values,
                ['hostname', 'sys', 'sensor_descr', 'sensor_value', 'sensor_limit'],
                header=['Hostname', 'SysName', 'Sensor', 'Val (prev)', 'Limit low/high'],
            )
        else:
            msg += lib.base.get_table(
                table_values,
                ['hostname', 'sys', 'hardware', 'devtype', 'os', 'location', 'sensor_descr', 'sensor_value', 'sensor_limit', 'sensor_lastupdate'],
                header=['Hostname', 'SysName', 'Hardware', 'Type', 'OS', 'Location', 'Sensor', 'Val (prev)', 'Limit low/high', 'Last Update'],
            )
    else:
        msg = 'Everything is ok (although no health data returned).'
    perfdata += lib.base.get_perfdata('device_count', len(devices), None, None, None, 0, None)
    # over and out
    lib.base.oao(msg, state, perfdata)