KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

MS-SQL ODBC query gives wrong info

 
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting
View previous topic :: View next topic  
Author Message
efiten



Joined: 13 Feb 2012
Posts: 12

PostPosted: Mon Feb 13, 2012 8:50 am    Post subject: MS-SQL ODBC query gives wrong info Reply with quote

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
View user's profile Send private message
KS-Soft Europe



Joined: 16 May 2006
Posts: 2249

PostPosted: Mon Feb 13, 2012 9:04 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
efiten



Joined: 13 Feb 2012
Posts: 12

PostPosted: Mon Feb 13, 2012 9:21 am    Post subject: Reply with quote

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
View user's profile Send private message
KS-Soft Europe



Joined: 16 May 2006
Posts: 2249

PostPosted: Mon Feb 13, 2012 10:01 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
efiten



Joined: 13 Feb 2012
Posts: 12

PostPosted: Tue Feb 14, 2012 2:01 am    Post subject: Reply with quote

Thanks for the fast reply, it works perfect !
Back to top
View user's profile Send private message
KS-Soft Europe



Joined: 16 May 2006
Posts: 2249

PostPosted: Tue Feb 14, 2012 8:21 am    Post subject: Reply with quote

You are welcome
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index