| View previous topic :: View next topic |
| Author |
Message |
efiten
Joined: 13 Feb 2012 Posts: 12
|
Posted: Mon Feb 13, 2012 8:50 am Post subject: MS-SQL ODBC query gives wrong info |
|
|
I use the HM 9.10 Enterprise with several RMA.
I want to do an SQL query with Active-RMA.
I made an ODBC entry, and hostmonitor can connect to the MS-SQL database via the active RMA client.
But, the reply of that SQL-query is not the value, but the respond-time in ms, ans the status is "host is alive".
Is this normal behaviour, or is there a way to get the value of that query ?
Erwin |
|
| Back to top |
|
 |
KS-Soft Europe
Joined: 16 May 2006 Posts: 2249
|
Posted: Mon Feb 13, 2012 9:04 am Post subject: |
|
|
| Quote: | | Is this normal behaviour, or is there a way to get the value of that query ? |
This is normal behaviour when alert condition is not set.
You should enable "Alert when field in...." option using "ODBC Query test" dialog. |
|
| Back to top |
|
 |
efiten
Joined: 13 Feb 2012 Posts: 12
|
Posted: Mon Feb 13, 2012 9:21 am Post subject: |
|
|
Ok, this works great, thanks !
The next issue is the following :
The return value is :
| Quote: | | 13-2-2012 15:29:07 |
Now I'm trying to setup a rule, so that the result is BAD when the date/time returned is older as 300 minutes...
maybe it's easier to do this in the SQL query ? I'm not that familiar into SQL query's
The query is
| Quote: | | select LastModified from UpdateRecord where UpdateType=50 |
|
|
| Back to top |
|
 |
KS-Soft Europe
Joined: 16 May 2006 Posts: 2249
|
Posted: Mon Feb 13, 2012 10:01 am Post subject: |
|
|
| Quote: | | Ok, this works great, thanks ! |
You are welcome!
| Quote: | | maybe it's easier to do this in the SQL query ? |
Yes, it's better to calculate time difference using SQL.
E.g. your SQL query may look like the following:
select DATEDIFF(n, LastModified, GETDATE()) from UpdateRecord where UpdateType=50 |
|
| Back to top |
|
 |
efiten
Joined: 13 Feb 2012 Posts: 12
|
Posted: Tue Feb 14, 2012 2:01 am Post subject: |
|
|
Thanks for the fast reply, it works perfect !  |
|
| Back to top |
|
 |
KS-Soft Europe
Joined: 16 May 2006 Posts: 2249
|
Posted: Tue Feb 14, 2012 8:21 am Post subject: |
|
|
You are welcome  |
|
| Back to top |
|
 |
|