|
View previous topic :: View next topic |
Author |
Message |
Grabarczyka
Joined: 04 Aug 2004 Posts: 8
|
Posted: Mon Feb 07, 2005 1:19 pm Post subject: Write to database using SQL query action |
|
|
Hello
In our company, we joined AHM with additional web application. In AHM, in case of test changes status BAD-> OK or OK ->BAD, we use "SQL query" action, which writes a few parameters (Reply, current date and time, testname etc.) to Oracle database. Everything is working properly if oracle database resides on the same machine, where AHM is installed. Problem appeares in case database server is on the other machine or in remote site. In case of the link between locations (AHM and Oracle) fails, I don't know, if the information is loged to Oracle database or not. The question is: Are there in AHM any possibilities to retrive the status of "SQL Query" used in action profile and then in case of "SQL query" fails store data in eg text files? After connection is up, rewrite all information to databse? Currently we use 15 instances of AHM (we plan to have about 50) and this is realy important for use, to have such possibilities. |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12795 Location: USA
|
Posted: Mon Feb 07, 2005 5:15 pm Post subject: |
|
|
Quote: | Are there in AHM any possibilities to retrive the status of "SQL Query" used in action profile and then in case of "SQL query" fails store data in eg text files? After connection is up, rewrite all information to databse? |
Sorry, this is impossible.
However you may setup additional test to check ODBC link. Then you may setup 2 "advanced" actions (http://www.ks-soft.net/hostmon.eng/mframe.htm#actions.htm#advancedaction):
- 1st "SQL Query" action will record data into database when SQL Server is accessible. Use condition like ('%Status%'<>'%LastStatus%') and ('::ODBCTestName::%SimpleStatus%'=='UP')
- 2nd "Execute external program" or "SQL Query" action should record data into local log (text file or ODBC). Condition may look like ('%Status%'<>'%LastStatus%') and ('::ODBCTestName::%SimpleStatus%'=='DOWN')
This way all records will be stored. The only problem - import data from local logs into central database when link is up. You will need to create some script and setup HostMonitor to execute the script every time ODBC link is recovered.
Regards
Alex |
|
Back to top |
|
|
|
|
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
|