<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[WebAPI Problem (Setup for Grafana with NetXMS 2.2.7)]]></title><description><![CDATA[<p dir="auto">Hi Guys.</p>
<p dir="auto">I'm having trouble setting up the WebAPI for use with Grafana (v5.2.2). When I try to setup the Data Source with the below parameters (screenshot attached):</p>
<p dir="auto">URL:     <a href="http://fahad-dell-desktop.fy.it.cx:8100/" rel="nofollow ugc">http://fahad-dell-desktop.fy.it.cx:8100/</a>    (I have set it to use 8100 during setup. )<br />
Access: Server (default)<br />
Basic Auth (checked)<br />
With Credentials (checked)<br />
(all SSL/TLS related options unchecked)<br />
User: admin<br />
Password: &lt;entered correctly&gt;</p>
<p dir="auto">I ran a packet capture on my Grafana server to capture the request and response and they are posted below:</p>
<p dir="auto"><strong>Request:</strong></p>
<pre><code>POST /sessions HTTP/1.1
Host: fahad-dell-desktop.fy.it.cx:8100
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.42 Safari/537.36
Content-Length: 0
Accept: application/json, text/plain, */*
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9,fr;q=0.8
Authorization: Basic &lt;Hash Removed form Post&gt;
Content-Type: application/json;charset=utf-8
Origin: http://ubuntu-server.fy.it.cx:3100
Referer: http://ubuntu-server.fy.it.cx:3100/datasources/edit/1
X-Forwarded-For: 192.168.100.202, 192.168.100.202
X-Grafana-Nocache: true
X-Grafana-Org-Id: 1
</code></pre>
<p dir="auto"><strong>Response</strong></p>
<pre><code>HTTP/1.1 405 HTTP method POST is not supported by this URL
Date: Tue, 21 Aug 2018 12:07:27 GMT
Content-Type: text/html; charset=ISO-8859-1
Cache-Control: must-revalidate,no-cache,no-store
Content-Length: 364
Server: Jetty(9.2.19.v20160908)

&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/&gt;
&lt;title&gt;Error 405 HTTP method POST is not supported by this URL&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;&lt;h2&gt;HTTP ERROR 405&lt;/h2&gt;
&lt;p&gt;Problem accessing /sessions. Reason:
&lt;pre&gt;    HTTP method POST is not supported by this URL&lt;/pre&gt;&lt;/p&gt;&lt;hr&gt;&lt;i&gt;&lt;small&gt;Powered by Jetty://&lt;/small&gt;&lt;/i&gt;&lt;hr/&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>
<p dir="auto">It's evident that Grafana is correctly trying to Post to the /sessions URL (as mentioned in the wiki <a href="https://wiki.netxms.org/wiki/Web_service_API" rel="nofollow ugc">https://wiki.netxms.org/wiki/Web_service_API</a>) but the WebAPI is saying POST is not an allowed method for /sessions.</p>
<p dir="auto"><strong>UPDATE</strong><br />
OK so it turns out my Web API war file wasn't set up correctnly (typo in jetty-web.xml). Fixing that resolved the issue.</p>
<hr />
<p dir="auto"><img src="/assets/uploads/files/smf/0000000004176-Screen_Shot_2018-08-21_at_15.07.36.png" alt="Screen Shot 2018-08-21 at 15.07.36.png" class="img-markdown  img-fluid" width="1142" height="1754" /></p>
]]></description><link>https://forum.netxms.org/topic/5670/webapi-problem-setup-for-grafana-with-netxms-2.2.7</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 18:51:23 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/5670.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 21 Aug 2018 12:13:13 GMT</pubDate><ttl>60</ttl></channel></rss>