Open Drakokorian opened 4 months ago
At the moment the repository databases doesn't know that the collection has been disabled. It would make sense to send this information and disable it automatically.
As a workaround, you can run a query similar to the one below:
DELETE dbo.CollectionDates
WHERE Reference IN('SlowQueries','SlowQueriesStats')
AND SnapshotDate < DATEADD(mi,-1440,GETUTCDATE())
This will remove the last collection information for SlowQueries for instances that haven't updated in one day. This will make it like the collection was never enabled and it won't alert on it anymore. You can adjust the threshold and Reference as required.
Alternative workaround: The threshold information is stored in the CollectionDatesThreshold table so writing a script to update that table is another option. A NULL Warning/Critical threshold can be used to disable. The InstanceID comes from the dbo.Instances table.
This would also be true for the updating the connection ID in the config if updated it counts as new server rather than updating the current one.
The ConnectionID should be fixed for the life of the instance. It's set to @@SERVERNAME
but you can override this to something unique as required in the config. If you just want to change how it appears in the UI, you can configure a display name in the GUI.
If you change the ConnectionID it will become a new instance unless you change the ConnectionID in the repository database before restarting the service to pick up the change.
There wouldn't be a way to know the difference between changing the ConnectionID for an existing instance or deleting the old connection and adding a new one. I'm not sure if we can handle this. It should be possible to send the schedule information back to the repository though and use this to exclude snapshot age alerts where a collection has become disabled.
That makes sense, thank you
If you remove a threshold i.e slow queries/any setting from the config file from the server to be monitored, it should not alert on snapchat age for that server. While you can change the root settings to ignore for the instance doing it for 150 servers is time consuming, plus you may change that setting in the future to enable it.
Feature request is: checking to see if the setting is enabled for that server then alert or not on it.