Community
Question: Is there a short way to get all dpes with active alert_hdl?
Is there somewhere a dynstring for all active alert_hdl configs?
Responses (2)
Not that i'm aware of, if there is or other method then described below I'm interested in this answer as well,
our current way is to get such a list is the following,
1) get all the path's "<dpe-wildcard-construction>:_alert_hdl.._type" with the dpNames() function.
For each path in reversed order,
2) get type "_type" and "_active" attributes with dpGet. ( you could speed it up by getting 1 or multiple blocks directly using the dyn-string in dpGet ) but remember the stability settings. By default limits such a dpGet() to 100 or 1000 entries. Can be adjusted via config-settings.
3) if type == DPCONFIG_NONE remove this entry from the dyn
4) else if active = false remove this entry from the dyn
The final result is your list with active alert-hdl.
Technically it should be possible to look directly in the database tables if you know where to look. ( without guarantees ).
It could be done with a query, but be carefully as the event manager cannot process other messages during the query time. This could be checked with the SQL-Query panel from the system management.
So using scripting to filter out the datapoint elements without an active alert_hdl config might be best.