Alerting when wireless AP counts change

Is there a method to setup an alert policy for any changes to AP counts on a Cisco wireless controller? Essentially if any APs are added or removed it would alert on that. I haven’t been able find any existing macros or templates.

I’m not even sure we record that data in the db. If we did, I don’t expect prev values to be stored so you can’t alert on changes anyway and only if the value changes from a hardcoded limit.

The APs themselves are stored in the access_points database. Is there any way to alert if a device is marked as “deleted=1” or if a new AP is added?

±---------------±--------------------±-----±----±--------±---------------+
| Field | Type | Null | Key | Default | Extra |
±---------------±--------------------±-----±----±--------±---------------+
| accesspoint_id | int(11) | NO | PRI | NULL | auto_increment |
| device_id | int(11) | NO | | NULL | |
| name | varchar(255) | NO | MUL | NULL | |
| radio_number | tinyint(4) | YES | | NULL | |
| type | varchar(16) | NO | | NULL | |
| mac_addr | varchar(24) | NO | | NULL | |
| deleted | tinyint(1) | NO | MUL | 0 | |
| channel | tinyint(4) unsigned | NO | | 0 | |
| txpow | tinyint(4) | NO | | 0 | |
| radioutil | tinyint(4) | NO | | 0 | |
| numasoclients | smallint(6) | NO | | 0 | |
| nummonclients | smallint(6) | NO | | 0 | |
| numactbssid | tinyint(4) | NO | | 0 | |
| nummonbssid | tinyint(4) | NO | | 0 | |
| interference | tinyint(3) unsigned | NO | | NULL | |
±---------------±--------------------±-----±----±--------±---------------+

You can alert on deleted yes, do you actually see any that are shown as deleted? New ones can’t be alerted on.

I was looking into this a bit. It appears that most of the APs that are showing as deleted had their names changed, so the old one was marked as deleted and the new one was added. This means triggering on “deleted” APs would potentially cause a lot of false positives.

There’s probably some clean up that needs to happen in that code. I would think that when adding a new AP it should check both the MAC and the radio type (it stores 2.4 and 5 Ghz separately), and if it’s the same, update the existing record instead of adding a new one.

I’m not sure how to easily get the alerting that I’m after without extending the schema to support current and historical values. There’s no table specifically for wireless controllers, so there’s no place to put a “ap_count” and “ap_count_prev” column similar to how port statistics are stored. Any thoughts would be appreciated.

Other than yes it does look like this needs fixing / extending out I don’t have any suggestions until something like that is done.