MS-SQL ODBC query gives wrong info

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
efiten
Posts: 19
Joined: Mon Feb 13, 2012 8:26 am

MS-SQL ODBC query gives wrong info

Post by efiten »

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
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

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.
efiten
Posts: 19
Joined: Mon Feb 13, 2012 8:26 am

Post by efiten »

Ok, this works great, thanks !

The next issue is the following :
The return value is :
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
select LastModified from UpdateRecord where UpdateType=50
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

Ok, this works great, thanks !
You are welcome!
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
efiten
Posts: 19
Joined: Mon Feb 13, 2012 8:26 am

Post by efiten »

Thanks for the fast reply, it works perfect ! :lol:
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

You are welcome :)
Post Reply