NetXMS Support Forum

English Support => General Support => Topic started by: bloodlin on March 21, 2018, 01:48:14 PM

Title: Grafana cant connect to Web API
Post by: bloodlin on March 21, 2018, 01:48:14 PM
Hello!
From wiki - https://wiki.netxms.org/wiki/NetXMS_WebAPI :
5. Create a
nxapisrv.properties
file and place it in the property file location of your web server and specify the NetXMS Server address with the
NXServer=
property.
Where i can put nxapisrv.properties?
I have Debian 9 server with tomcat server

Thanks.
Title: Re: Grafana cant connect to Web API
Post by: huskybob on May 22, 2018, 07:05:49 AM
guys please can you help me,

I need your help with my Grafan installation on a Windows 10 System

I have the latest NetXMS System installed with a MySQL Database on Windows 10 and it is working perfectly however i am having a problem getting Grafana to work on the same system

I am using NetXMS " Jetty  "  for http

I deployed the NetXMS WebAPI using the same guide https://wiki.netxms.org/wiki/Deploy_NetXMS_WebAPI_using_the_WebUI_Windows_installer_(Windows_only!).

When i use the URL : http://mynetxms.ip:8080/webapi/ all i get is " {"description":"Internal error","error":46} "

I have unziped the Grafana Files in C:\grafana

I have edited the " c:\grafana\conf\custom.ini " file

protocoal = http
http_port = 8080
domain = localhost

What else do i need to do to get Grafana to function on the Windows 10 System ?  :D
Title: Re: Grafana cant connect to Web API
Post by: Victor Kirhenshtein on May 22, 2018, 11:10:26 AM
Hi,

at least you should have Grafana on different port - it has it's own HTTP server build in, and setting it to port 8080 will conflict with NetXMS REST API server.

Best regards,
Victor
Title: Re: Grafana cant connect to Web API
Post by: huskybob on May 23, 2018, 12:48:21 AM
Victor Kirhenshtein thank you for your help, much appreciated

i have changed the grafana http port to 8181
started the grafana engine and success!
grafana is working

now for the data-source creation

1. New = MYGRAFANA ( Default )
2. Type = NETXMS
3. HTTP URL = http://mynetxmsip:8080
4. Access = SERVER
5. Auth = Basic Auth with Credentials
6. Basic Auth Details = my NetXMS username and NetXMS password
7. SAVE & TEST

There is an exclamation mark error!

It does save the settings

Restarted both NetXMS Server and Grafana Server

I do not think that Grafana is working correctly

Any ideas?  :D



Title: Re: Grafana cant connect to Web API
Post by: Victor Kirhenshtein on May 23, 2018, 02:10:09 PM
Do you see incoming client connection in server log when attempt to save Grafana data source? Can you login with same user from web UI?

Best regards,
Victor
Title: Re: Grafana cant connect to Web API
Post by: huskybob on May 27, 2018, 09:09:08 AM
Victor Kirhenshtein thank you for your reply

" Do you see incoming client connection in server log when attempt to save Grafana data source? Can you login with same user from web UI? "

will that be the login user for Grafana Web UI or the NetXMS Web UI or the WEBAPI ?
http://localhost:8181 ( Grafana Web UI )
http://localhost:8080 ( NetXMS Web UI )
http://localhost:8080/webapi ( NetXMS Web API - {"description":"Internal error","error":46} )

sorry just need to confirm   :D