Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alert - based on collection date throwing Errors #1240

Open
FuriousDBA opened this issue Feb 21, 2025 · 1 comment
Open

Alert - based on collection date throwing Errors #1240

FuriousDBA opened this issue Feb 21, 2025 · 1 comment

Comments

@FuriousDBA
Copy link

FuriousDBA commented Feb 21, 2025

Hi,
I have set below Alert to track if SQL Instance is down:

Image

I know for sure that one instance is down so I should get an alert, but instead I see below errors in DBA Dash log:

Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot insert the value NULL into column 'Threshold', table 'tempdb.dbo.#ExceededThreshold__________________________________________________________________________________________________000000002CBC'; column does not allow nulls. INSERT fails.
Processing alerts of type CPU
Processing alerts of type Wait
Processing alerts of type Counter
No rules of type AGHealth to process
Processing alerts of type DriveSpace
Processing alerts of type CollectionDates
The statement has been terminated.
at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, SqlCommand command, Boolean callerHasConnectionLock, Boolean asyncClose) at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at Microsoft.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) at Microsoft.Data.SqlClient.SqlCommand.CompleteAsyncExecuteReader(Boolean isInternal, Boolean forDescribeParameterEncryption) at Microsoft.Data.SqlClient.SqlCommand.InternalEndExecuteNonQuery(IAsyncResult asyncResult, Boolean isInternal, String endMethod) at Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQueryInternal(IAsyncResult asyncResult) at Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQueryAsync(IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location ---
at DBADashService.AlertProcessing.AlertsUpdate() in D:\a\dba-dash\dba-dash\DBADashService\AlertProcessing.cs:line 151
at DBADashService.AlertProcessing.AlertsUpdate() in D:\a\dba-dash\dba-dash\DBADashService\AlertProcessing.cs:line 151
at DBADashService.AlertProcessing.AlertsUpdate() in D:\a\dba-dash\dba-dash\DBADashService\AlertProcessing.cs:line 151
at DBADashService.AlertProcessing.ProcessAlerts() in D:\a\dba-dash\dba-dash\DBADashService\AlertProcessing.cs:line 68
ClientConnectionId:74529336-ebdb-4f63-9fe3-6065c3d7ba18
Error Number:515,State:2,Class:16

@DavidWiseman
Copy link
Collaborator

Thanks for reporting this. The Threshold needs to be set to something e.g. 5 to get an alert if the CPU collection hasn't ran in 5min.

There are a couple of ways this should be improved - the error should be handled better and it shouldn't let you create this rule without the threshold.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants