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.
Get ODBC error into email?
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
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
Suggestion
ok - then a useful feature request would be a variable that holds the details of the last system error.
Thanks
Thanks

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
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