monocker icon indicating copy to clipboard operation
monocker copied to clipboard

Minimise Notifications count

Open tamimology opened this issue 2 years ago • 2 comments

When using the LABEL_ENABLE: 'true' in the container, and labeling the needed containers to be monitored with monocker.enable: true the notification is received as follows

WhatsApp Image 2023-10-25 at 19 52 29

rather, I believe it should only show how many containers are being monitored without sending a separate notification for each monitored container (as taken from logs to be able to remove what is not needed in my opinion).

2023-10-25T01:30:09.445778237Z 
2023-10-25T01:30:09.446831215Z > [email protected] start
2023-10-25T01:30:09.447008570Z > node index.js
2023-10-25T01:30:09.447103200Z 
2023-10-25T01:30:14.039916156Z -------------------------------------------------------
2023-10-25T01:30:14.044394725Z  Monocker - MONitor dOCKER container states
2023-10-25T01:30:14.045216807Z  Developed by Matt Petersen - Brisbane Australia
2023-10-25T01:30:14.045753541Z  
2023-10-25T01:30:14.046333911Z  Version: 2.7.0
2023-10-25T01:30:14.046916435Z -------------------------------------------------------
2023-10-25T01:30:14.047785779Z  
2023-10-25T01:30:14.048902320Z Monitoring started 
2023-10-25T01:30:14.049112795Z      - Messaging platform: pushover
2023-10-25T01:30:14.049217411Z      - Polling period: 10 seconds 
2023-10-25T01:30:14.049431976Z      - Only offline state monitoring: false
2023-10-25T01:30:14.049559614Z      - Only include labelled containers: true 
2023-10-25T01:30:14.049655489Z      - Do not monitor 'Exited': false
2023-10-25T01:30:14.049748950Z      - Disable Startup Messages: false
2023-10-25T01:30:14.658897679Z      - Currently monitoring 19 (running) containers

This will prevent spamming the notification platform in case of more containers are being monitored. specially, everytime monocker is loaded

tamimology avatar Oct 25 '23 08:10 tamimology

good idea. i will look at that

petersem avatar Dec 28 '23 04:12 petersem

I think that it would be nice to have an option to simply merge messages into one if these are sent in some time window, e.g. 10 seconds.

rybycy avatar Jan 25 '24 12:01 rybycy

@tamimology @rybycy I have significantly reduced the number of messages send. I suggest you raise the poll interval to around 20 or 30, which will allow all messages in that poll interval to be grouped. Update your containers from the latest Monocker version on docker hub.

image

petersem avatar May 14 '24 16:05 petersem

Perfect Setting it to 30 did the job🤗

Screenshot_20240515_172440_Pushover.png

tamimology avatar May 15 '24 07:05 tamimology