Hi,
I had a similar requirement from one of my customers. We ended up using the AOS 8 APIs instead of SNMP as it was more efficient.
Attached is a sample Python code which I have used to demo similar functionality. You just need to change the MAIN.py file lines 10-12 to reflect your setup. You can call the MM or the controller directly and parse the output of the commands. In this example, I am running show global-user-table list and show ap database long against MM and saving a subset of the returned JSON data. In your case, you can remove the show global-user-table list section, and change the commands to show ap database status up or show ap database status down...
Below is a sample of the print output of the code. The code also saves the results in two CSV files.
As for the SNMP OID, you might want to look at this OID .1.3.6.1.4.1.14823.2.2.1.5.2.1.4 but I am not sure if this works on MM (it works on controller)