You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've had an issue when trying to add new monitor via EnsureMonitor method.
If the monitor for static page exists, lets say "example.com/static_page" and I wanted to add monitor for "example.com", it would not be added. EnsureMonitor would return ID of the static_page instead of creating new one.
The text was updated successfully, but these errors were encountered:
EnsureMonitor is currently implemented in a very simple-minded way; it just uses SearchMonitors to find all monitors whose URL or friendly name matches the supplied string. If there are any results, it doesn't add the new monitor.
So we need to be a bit cleverer here, don't we? One way would be to look at the results from SearchMonitors and see if any of them have the exact URL supplied. If not, create the monitor.
If you're interested in contributing a PR for this, please do! Otherwise this would be a nice issue for anybody who wants to contribute, to pick up.
Hey,
I've had an issue when trying to add new monitor via EnsureMonitor method.
If the monitor for static page exists, lets say "example.com/static_page" and I wanted to add monitor for "example.com", it would not be added. EnsureMonitor would return ID of the static_page instead of creating new one.
The text was updated successfully, but these errors were encountered: