Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
It is critical that the IMAP quota is not resulting to stop receiving messages.
Proposed resolution
Monitor IMAP Quota with a regular monitoring sensor.
See imap_get_quotaroot()
Remaining tasks
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
#13 | monitor_imap_quota-2409923-13-interdiff.txt | 3.45 KB | mbovan |
#13 | monitor_imap_quota-2409923-13.patch | 6.37 KB | mbovan |
| |||
#11 | monitor_imap_quota-2409923-11-interdiff.txt | 2.08 KB | mbovan |
#11 | monitor_imap_quota-2409923-11.patch | 7.19 KB | mbovan |
| |||
#9 | monitor_imap_quota-2409923-9-interdiff.txt | 1.84 KB | mbovan |
Comments
Comment #1
miro_dietikerPromoting :-)
Comment #2
mbovan CreditAttribution: mbovan as a volunteer and for Google Summer of Code commentedAdding a patch here. This was hard to test even manually so the patch does not contain tests.
Here is the screenshot of the sensor:
As a part of this issue, I created a new submodule
inmail_monitoring
which adds a dependency to monitoring module. It can be extended with more plugins in #2399779: Monitoring sensors for inmail.Comment #4
mbovan CreditAttribution: mbovan as a volunteer and for Google Summer of Code commentedImplemented
FetcherBase::getQuota()
Comment #5
miro_dietikerMonitoring sensors are plugins + configuration with full freedom to the user in how to use the sensors. There is no reason to add a submodule - no other module provides monitoring through a submodule.
Comment #6
miro_dietikerThe patch above accidentally contains parts of the "Connect" button issue.
We usually use drop downs instead of radios.
Also, quota is more a relative thing. So the value should be percent of total.
The message can contain the effective value, but shorter please. Use "addMessage", not "setMessage".
Thus, we can use threshold exceeds for >80% usage.
Plz check how to properly register the percent value... Hope monitoring supports it. :-)
Comment #7
mbovan CreditAttribution: mbovan as a volunteer and for Google Summer of Code commentedWasn't there an idea to have Inmail as a clean module with no dependencies and move configuration+third party plugins to submodules (inmail_cfortune, inmail_collect, inmail_demo, inmail_mailmute...).
Anyhow, Monitoring seems like a specific module, so moved a sensor plugin it into the core (Inmail).
Hm.. Which parts?
Changed to drop down.
Also, updated the status with shorter message and percentage value.
Comment #9
mbovan CreditAttribution: mbovan as a volunteer and for Google Summer of Code commentedUpdated test dependencies.
Comment #11
mbovan CreditAttribution: mbovan as a volunteer and for Google Summer of Code commentedRemoved
monitoring
dependency from Inmail.Comment #12
miro_dietikerYeah? :-)
Pity there is no method that provides us plugins of a specific type..?
This needs to survive a situation when the IMAP plugin is not available on server.
A fetcher could be deleted (or none selected), thus you need to care about failed loads.
A usage>limit is technically not possible.
You simply setValue.
A user can setup a threshold >90 to critical in monitoring and things are perfect and much more flexible.
Comment #13
mbovan CreditAttribution: mbovan as a volunteer and for Google Summer of Code commentedFixed #12 1, 3, 4, 5:
#12.2: There is a
getPluginType()
but it only supports Inmail plugin types (analyzer/deliverer/handler). In this case "fetcher" would be a subtype of deliverer.Comment #15
miro_dietikerOK committing this.
Did some cleanups... Tests are completely missing, added a @todo, i guess we will revisit this sensor when in use and will then check follow-ups.