<?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[Sending Alarms via webhook]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">wondering what are the options to send alarms via webhook ?<br />
Should I just call curl as a command on the management server?<br />
Feel like doing it via scripts could provide more flexibility?<br />
I have checked  <a href="https://www.netxms.org/documentation/nxsl-latest/#class-webservice" rel="nofollow ugc">https://www.netxms.org/documentation/nxsl-latest/#class-webservice</a> but I do not understand how that's supposed to work.</p>
<p dir="auto">Grateful for nudging me in the right direction.<br />
thank you</p>
]]></description><link>https://forum.netxms.org/topic/7810/sending-alarms-via-webhook</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 07:23:20 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/7810.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 08 Nov 2023 15:06:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Sending Alarms via webhook on Thu, 09 Nov 2023 15:10:52 GMT]]></title><description><![CDATA[<p dir="auto">Great, thank you, got it to work.<br />
Really appreciate your helpful response.</p>
]]></description><link>https://forum.netxms.org/post/32971</link><guid isPermaLink="true">https://forum.netxms.org/post/32971</guid><dc:creator><![CDATA[szabolcs]]></dc:creator><pubDate>Thu, 09 Nov 2023 15:10:52 GMT</pubDate></item><item><title><![CDATA[Reply to Sending Alarms via webhook on Thu, 09 Nov 2023 10:40:49 GMT]]></title><description><![CDATA[<p dir="auto">Yes, doing this from script is better as you can control web service reply. To use web services from script, you have to create a web service definition under Configuration-&gt;Web service definition. For example let's create one named "example" with url <a href="http://example.com" rel="nofollow ugc">http://example.com</a></p>
<p dir="auto">Web services are called via an agent, typically agent which is running along with the server is used. Configuration file of that agent should have</p>
<pre><code>EnableWebServiceProxy=yes
</code></pre>
<p dir="auto">Now if you do "Execute script" on your server node and try the following script:</p>
<pre><code>result = $node-&gt;callWebService("example", "GET");
println(result-&gt;success);
println(result-&gt;errorMessage);
println(result-&gt;agentErrorCode);
println(result-&gt;httpResponseCode);
println(result-&gt;document);
</code></pre>
<p dir="auto">It will perform GET request and would print the result.</p>
<p dir="auto">Alternative way is to use getWebService(webSvcName) method on node, this would create WebService object which has get(), post(), etc methods.</p>
<p dir="auto">You can use GetServerNode() function instead of $node to get your netxms server node.</p>
]]></description><link>https://forum.netxms.org/post/32968</link><guid isPermaLink="true">https://forum.netxms.org/post/32968</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Thu, 09 Nov 2023 10:40:49 GMT</pubDate></item></channel></rss>