View previous topic :: View next topic |
Author |
Message |
grussell
Joined: 21 Jan 2010 Posts: 36
|
Posted: Thu Jan 21, 2010 2:29 am Post subject: Get ODBC error into email? |
|
|
We are using an ODBC driver to push the log results to an SQL database. We’ve setup the option to notify us via email should the system be unable to publish the log.
But how do we get the error message generated by the SQL server/ODBC driver into the email? I have gone through the macro variables but can’t see an option?
For instance – the SQL database may return “unable to convert string to int….” or "timeout" ..etc – how do we get this into the email? I can see the message in the bottom message bar of HostMonitor?
Thanks,
Gavin. |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12806 Location: USA
|
Posted: Thu Jan 21, 2010 12:38 pm Post subject: |
|
|
Logging errors recorded into system log file specified on System Log page in the Options dialog. If you are using text file for system log then you may setup Text Log test method to check for some specific error and assign "Send e-mail" action to the test.
On the other hand, if you want to check connection to SQL server and send e-mail in case of some problem, you should use ODBC Query test.
Regards
Alex |
|
Back to top |
|
|
grussell
Joined: 21 Jan 2010 Posts: 36
|
Posted: Tue Jan 26, 2010 10:33 am Post subject: Unclear |
|
|
Thanks for your response - it didn't quite answer my question.
I am wondering how we get the last system error into a variable to be used within an alert email?
Thanks. |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12806 Location: USA
|
Posted: Tue Jan 26, 2010 1:52 pm Post subject: |
|
|
If you are using text file for system log then you may setup Text Log test method to check for some specific error and assign "Send e-mail" action to the test.
Otherwise I do not see any option.
Regards
Alex |
|
Back to top |
|
|
grussell
Joined: 21 Jan 2010 Posts: 36
|
Posted: Fri Jan 29, 2010 5:44 am Post subject: Suggestion |
|
|
ok - then a useful feature request would be a variable that holds the details of the last system error.
Thanks |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12806 Location: USA
|
Posted: Fri Jan 29, 2010 12:24 pm Post subject: |
|
|
And how you can use this variable? Start some action every 5 min?
Regards
Alex |
|
Back to top |
|
|
grussell
Joined: 21 Jan 2010 Posts: 36
|
Posted: Sat Jan 30, 2010 12:38 pm Post subject: |
|
|
In the "Options" under "Log settings" I have "Execute alert profile when log inaccessible" generating an "Email"
I would want to use this variable in this alert email so I receive an email telling me the SQL error that preventing the log from being written.
Thanks |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12806 Location: USA
|
Posted: Sat Jan 30, 2010 3:45 pm Post subject: |
|
|
Ok, we implement this option in next version.
Regards
Alex |
|
Back to top |
|
|
grussell
Joined: 21 Jan 2010 Posts: 36
|
Posted: Thu Mar 11, 2010 3:43 pm Post subject: |
|
|
Is this in 8.50 now?
Thanks |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12806 Location: USA
|
Posted: Thu Mar 11, 2010 4:45 pm Post subject: |
|
|
Yes.
Quote:
==================
New %HM_LastLoggingError% macro variable can be used as parameter of the actions. It represents description of last logging error (if any); can be useful for actions triggered by HostMonitor when it cannot save data into the log
==================
http://www.ks-soft.net/hostmon.eng/news.htm
Regards
Alex |
|
Back to top |
|
|
|