j6s / mailcow-exporter

MIT License
58 stars 12 forks source link

Optimization suggestion #13

Closed alexandrepossebom closed 11 months ago

alexandrepossebom commented 2 years ago

I have around 8.000 mailbox, take a look the difference to use reduced instead all endpoint for mailboxes:

All:

2022/09/03 09:25:55 https://mailserver/api/v1/get/mailq/all
2022/09/03 09:25:55 https://mailserver/api/v1/get/mailbox/all
2022/09/03 09:26:30 https://mailserver/api/v1/get/quarantine/all
2022/09/03 09:26:30 https://mailserver/api/v1/get/status/containers
2022/09/03 09:26:30 https://mailserver/api/v1/get/logs/rspamd-stats
2022/09/03 09:26:30 https://mailserver/api/v1/get/domain/all

Reduced:

2022/09/03 09:24:30 https://mailserver/api/v1/get/mailq/all
2022/09/03 09:24:30 https://mailserver/api/v1/get/mailbox/reduced
2022/09/03 09:24:34 https://mailserver/api/v1/get/quarantine/all
2022/09/03 09:24:34 https://mailserver/api/v1/get/status/containers
2022/09/03 09:24:34 https://mailserver/api/v1/get/logs/rspamd-stats
2022/09/03 09:24:34 https://mailserver/api/v1/get/domain/all

the reduced version has all the statistics necessary for the correct functioning of your application

j6s commented 2 years ago

Interesting, I did not know about these endpoints - mainly as my instance only has about 10 or 15 mailboxes.

I'll check out these endpoints

j6s commented 2 years ago

@alexandrepossebom Can you maybe point me to documentation for these endpoints? I can only find information about /api/v1/get/mailbox/{id} with {id} set to all

alexandrepossebom commented 2 years ago

To be honest, I didn't find the documentation, I found this by looking for the network tab inside the inspection elements using the admin web interface.

j6s commented 11 months ago

I am closing this issue, since I am hesitant about using endpoints that are not meant for public consumption. I'm happy to revisit in the future