Where is stored the subfolders informations

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
otip
Posts: 9
Joined: Tue Sep 10, 2013 1:28 am

Where is stored the subfolders informations

Post by otip »

Hi Again ! :)

I have separated my tests in different subfolders.

ROOT
ROOT/sub1
Test1
ROOT/sub2
Test2

Where is stored the information that test 1 is linked to sub1 and test2 to sub 2?

Is there anyway to have this information into the database by modifying :
Insert into test (eventtime, testname, status, reply, testid, testmethod) VALUES ('%DateTime%','%TestName%', '%Status%', '%Reply%', %TestID%, '%TestMethod%')

With something like :
Insert into test (SUBFOLDERSNAME, eventtime, testname, status, reply, testid, testmethod) VALUES ('%subfoldername%','%DateTime%','%TestName%', '%Status%', '%Reply%', %TestID%, '%TestMethod%').

I haven't found anything that would look like a %subfoldername% parameter.

Thank you.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Where is stored the information that test 1 is linked to sub1 and test2 to sub 2?
Information stored in HML file.
haven't found anything that would look like a %subfoldername% parameter.
http://ks-soft.net/hostmon.eng/mframe.h ... oldermacro
%Folder% - The name of the folder containing the test
%FolderID% - Represents unique ID of the folder (integer number)
%FullPath% - The full folder path name
...

Regards
Alex
otip
Posts: 9
Joined: Tue Sep 10, 2013 1:28 am

Post by otip »

Hi,

Thank you for this page that I had never seem. Although I don't see these variables when I go to Options => Primary backup => Sql Query and then check the macro variables.

These seem to be macro variable. Not usable in the sql query (am I wrong?).

I have tried this so far and it endeed didn't work:
Insert into test (eventtime, testname, status, reply, testid, testmethod,foldername) VALUES ('%DateTime%','%TestName%', '%Status%', '%Reply%', %TestID%, '%TestMethod%','%FullPath%')

Could please explain me how to keep the folder path when saving an event in the DB ?

Many thanks.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

I have tried this so far and it endeed didn't work:
What exactly error message do you see?
(have you checked HostMonitor system log file and Auditing Tool (menu View))?
HostMonitor version?
Could please explain me how to keep the folder path when saving an event in the DB ?
Use %FullPath% variable in SQL qury

Regards
Alex
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

I have tried this so far and it endeed didn't work:
Insert into test (eventtime, testname, status, reply, testid, testmethod,foldername) VALUES ('%DateTime%','%TestName%', '%Status%', '%Reply%', %TestID%, '%TestMethod%','%FullPath%')

Could you please check System Log (menu View -> System log or menu View -> Auditing tool -> Recent syslog) for ODBC errors?
%FullPath% macro variable contains backslashes (\). Some ODBC drivers (e.g. MySQL) treat it as escape symbol - this may cause SQL error.
HostMonitor supports "undocumented" option that replaces (\) with (\\) in SQL queries.
How to use:
1. Stop HostMontor
2. add ODBC_UseDoubleSlash=1 into [Misc] section of hostmon.ini
3. Start HostMonitor
otip
Posts: 9
Joined: Tue Sep 10, 2013 1:28 am

Post by otip »

Hello,

sorry this was my fault. I did not see the sentence telling to create the table first.

I thought HM would create it.

Thanks for your help.
Post Reply