Thanks!
Would you believe it, but I've just started to merge generate_port_link into generate_entity_link. (we're trying to do away with "entity-type" specific functions).
Don't worry though, I'll merge generate_ap_link and generate_ap_url at the same time.
And now...
This part:
$ap=accesspoint_by_id($id);
$device = device_by_id_cache($ap['device_id']);
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] ."/".
safename("arubaap-$ap[name].$ap[radio_number].nummonclients.rrd");
Should be done in auth.inc.php, a 'graph category', like "port" or "sensor" is a grouping of things where the id passed is related to the same thing.
Are the different RRDs optional? Is there scope to merge any of them? Each RRD file we write involves at least a read to read the pointer, and a write to write the pointer, on top of the data writing.
Why are you using numeric oids? this is weird :
$type =$aruba_apstats["1.3.6.1.4.1.14823.2.2.1.5.2.1.5.1.2.$radioid"][''];
And I just noticed, but the table should be called accesspoints, as the id field is "accesspoint_id" (it makes it easier to do a lot of other things later). It'd also be a good idea to make sure the same term is used everywhere in the code, i.e. ap vs accesspoint vs access_point, it gets hard to guess 
Could you also attach a couple of rows from your database from the accesspoints table, and the matching rrds in a .tar.gz? So i can put them on the dev install and see how it looks.
I don't think anyone else has every committed anything which creates a new entity category before. It's hard work :>
adam.
with the rest of the files (I hope)