Hi,
I have searched all the corners i can find for an answer but to no avail so i will ask here and i am sorry if this is answered elsewhere.
I am trying to add a dbquery that just simply count lines in a table, the agent is configured for dbquery using mssql.ddr.
The account and query is working so thats not a problem but i can not get the agent to connect to sql server.
In the config i have:
SubAgent = dbquery.nsm
Database = id=db1;driver=mssql.ddr;server=***;dbname=***;login=***;password=***
Query = query1:db1:30:select count(*) from ***
The log says only: [INFO ] Subagent "dbquery.nsm" loaded successfully
No entry what so ever about any error or connection for the query
So my question is how and where can i find more detail log on what the agent and subagents are doing so i can find a source for the problem, when i try to manually query via netxms management console i get "Cannot get current parameter value: Communication failure".
Tried both DB.Query() and DB.QueryResult() same problem.
I tried agent 1.2.16 and 2.0-M2
Add "DebugLevel=6" to nxagentd.conf and restart service (also I suggest to change "LogFile" parameter from "{syslog}" to some file on the disk, if it's not done yet - for example "LogFile=c:\netxms\agent.log").
With this debug level you'll get most of DBQUERY related debug messages.
That worked but seems like some earlier version pushed install with -D 0 on the service though so the debuglevel config did not work at first but uninstalled and installed new and now it works.
Now to the main problem it seems like it ignores the database setting no entry in debug log about this, all i get is:
[INFO ] Subagent "dbquery.nsm" loaded successfully
Then nothing until it tries query and get:
[DEBUG] [session:0] Requesting table "DB.Query(db1,"select Count(*) from ***")"
[DEBUG] DBQUERY: H_DirectQueryTable: no connection handle for database db1
EDIT:
Problem solved i have missed "*DBQUERY" in the config above Database