Replies: 1 comment 1 reply
-
Been having a think about this and not sure what the best approach is yet. If it was just one monitor monitoring a number of things, and that one monitor would fail if any of the entities were bad (for whatever value of bad), that would be fine. The wrinkle is needing one monitor to manifest as multiple monitors at runtime so they can alert individually. Currently my thinking is around having the "main" monitor (which you configure to point at HASS and with a tag to select entities with, or something) and that monitor "injects" additional monitors in to simplemonitor behind the scenes based on what it discovers. Something a bit like the compund monitor but in reverse maybe. It's likely to need changes to the main SimpleMonitor class to support it I think, something like having a
Similarly alerting and logging would need to handle that too, probably with some caching so that the list of sub monitors doesn't change between running tests and reporting outcomes (i.e. HASS finds a new matching entity during that time). Bit rambly, but that's a bit of a brain dump to start things rolling :) Out of interest, what's the use case? I'm a fan of HASS myself! |
Beta Was this translation helpful? Give feedback.
-
I am considering writing a new Monitor that would look at specific entities in Home Assistant (an entity is, grosso modo, something that you switch or that you get some value of). I would filter the monitored entities by labels ("tags" - they are part of the attributes of an entity).
My problem is that I have one monitor that monitors many endpoints, retrieved dynamically. Each of the endpoints is a single, independent monitoring point (ie. an alert should be raised for each of them failing, individually).
I am at the "rough design" phase now and my main concern is how to manage this situation: one monitor and many monitored things.
I welcome any ideas, or suggestions in the discussion.
Beta Was this translation helpful? Give feedback.
All reactions