I've set up the following test.
My query returns a single character string. If this string is empty then I don't need to fire any alert. If it has the value then I need to send an e-mail with this value. I need to perform this test once every day. When I set it up then I didn't get any e-mail before data was returned by the query. Then I received my e-mails with retrieved by query character string. But then, when there was no any data from the query anymore, I continued to receive e-mails with "bad" status and an empty string as the result of query. Probably, my test was set up incorrectly. How would you recommend me to make settings to this test?
Thank you.
Test Settings
I used ODBC Query. The text copy of this test is below.
Thanks.
;-----------------------------------------------------------------------------
;- HostMonitor`s export/import file -
;- Generated by HostMonitor at 5/20/2005 1:55:56 PM -
;- Source file: C:\Program Files\HostMonitor\HostMon.hml -
;- Generation mode: Selected_Tests -
;-----------------------------------------------------------------------------
; ------- Test #01 -------
Method = ODBC
;--- Common properties ---
;DestFolder = Critical Tests\
Title = ODBC: Expiration Alert
Comment = Alerts when the subscription is to expire.
RelatedURL =
ScheduleMode= Regular
Schedule = Once at 8
Interval = 1860
Alerts = E-mail (After 1)
ReverseAlert= No
UnknownIsBad= No
UseCommonLog= Yes
PrivLogMode = Default
CommLogMode = Default
;--- Test specific properties ---
Datasource = <irrelevant>
Login = <irrelevant>
Password = <irrelevant>
Timeout = 10
SQLQuery = exec p_Expiration_Alert
CheckField = DifferentFrom
FieldRow = 1
FieldCol = 1
Value = ''
EmptyStatus = 2
;-----------------------------------------------------------------------------
; Exported 1 tests
Thanks.
;-----------------------------------------------------------------------------
;- HostMonitor`s export/import file -
;- Generated by HostMonitor at 5/20/2005 1:55:56 PM -
;- Source file: C:\Program Files\HostMonitor\HostMon.hml -
;- Generation mode: Selected_Tests -
;-----------------------------------------------------------------------------
; ------- Test #01 -------
Method = ODBC
;--- Common properties ---
;DestFolder = Critical Tests\
Title = ODBC: Expiration Alert
Comment = Alerts when the subscription is to expire.
RelatedURL =
ScheduleMode= Regular
Schedule = Once at 8
Interval = 1860
Alerts = E-mail (After 1)
ReverseAlert= No
UnknownIsBad= No
UseCommonLog= Yes
PrivLogMode = Default
CommLogMode = Default
;--- Test specific properties ---
Datasource = <irrelevant>
Login = <irrelevant>
Password = <irrelevant>
Timeout = 10
SQLQuery = exec p_Expiration_Alert
CheckField = DifferentFrom
FieldRow = 1
FieldCol = 1
Value = ''
EmptyStatus = 2
;-----------------------------------------------------------------------------
; Exported 1 tests