MMM-syslog
MMM-syslog copied to clipboard
reset or remove messages?
Hi, great module, I love it. I plan to use it with home automation. Wondering is it possible to remove notifications, either automatically after some period or by triggering some url that will remove them? Thanks!
No currently but feel free to send a pull request!One could return an id as answer for 'http://MIRROR_IP:MIRROR_PORT/syslog?type=INFO&message=YOUR_MESSAGE' and then do something like 'http://MIRROR_IP:MIRROR_PORT/syslog/remove/
Your proposal sound a little bit over the top for me. What I think would be sufficent would be a way to get rid of "old" messages. I see some possible solutions: a) Use your proposal and provide an "API" to remove them b) Use an expiration date. Could be a config entry stating that messages older than (today - messagedate) would be deleted OR simply not shown. This could be done on a per-type basis. You then could e.g. "hide" INFO messages older than 5 days, WARNINGS older than 30 days and ERROR never. Just my two cents.
I made a simple solution and could provide a patch for testing/verification...
@paviro: not interested?
I would like to remove old messages too. Was this resolved please?
still open ?
I know this thread is a bit ancient - but I like the idea of removing individual messages. Instead of returning an ID to the caller, an easier way would be to have the caller set an ID. eg if you pass ID=frondoor, and then set a Warning , you then pass the ID when you want to clear the Warning. This requires less complexity from the calling system, removing the need to manage the returned IDs.
@paviro This module is not part of your current focus, would that be a fair statement?
Hey yes sadly it is :/ I don’t really have time for coding at the moment. Feel free to fork! I am also willing to give someone access on this repo if you are willing to continue maintaining it :)