Hi
I have 2 issues with my http protocol
The first:
QAction no load after params change value:
<Sessionid="1"name="API Status">
<Connectionid="1"name="Check Ping">
<Requestverb="GET"url="/api/v1/system/network/ping">
</Request>
<ResponsestatusCode="2">
<Contentpid="3"></Content>
</Response>
</Connection>
</Session>
<Timerid="1">
<Name>Fast Timer (10s)</Name>
<Timeinitial="true">10000</Time>
<Interval>75</Interval>
<Content>
<Group>2</Group>
</Content>
</Timer>
<Groupid="2">
<Name>Fast Polling</Name>
<Description>Fast Polling 10s</Description>
<Type>poll</Type>
<Content>
<Session>1</Session>
</Content>
</Group>
<Paramid="2">
<Name>StatusCodePingCheck</Name>
<Description>Status Code API</Description>
<Type>dummy</Type>
</Param>
<Paramid="3">
<Name>PingCheckResponse</Name>
<Description>Ping Check Response</Description>
<Type>dummy</Type>
</Param>
LOG:
2025/06/03 23:03:31.374|SLProtocol - 1084 - Titan-Live - copy|19012|CTimer::Execute|DBG|6|1 groups to execute
2025/06/03 23:03:31.374|SLProtocol - 1084 - Titan-Live - copy|19012|CTimer::TimerThreadFunc|DBG|6|Waiting for last group to be finished.
2025/06/03 23:03:31.378|SLProtocol - 1084 - Titan-Live - copy|8832|CGroup::Execute|DBG|6|Start executing group 2 (interval = 75) (depth=1)
2025/06/03 23:03:31.379|SLProtocol - 1084 - Titan-Live - copy|8832|CProtocol::LogHttpRequest|INF|3|<- 23:03:31 - GET http://172.28.20.201:80/api/v1/system/network/ping
2025/06/03 23:03:31.391|SLProtocol - 1084 - Titan-Live - copy|8832|CProtocol::ProcessHttpResult|INF|3|HTTP/1.1 200 OK
2025/06/03 23:03:31.392|SLProtocol - 1084 - Titan-Live - copy|8832|CParameter::SetValue|DBG|2|-> StatusCodePingCheck set value to VT_BSTR : HTTP/1.1 200 OK (HTTP/1.1 200 OK)
2025/06/03 23:03:31.392|SLProtocol - 1084 - Titan-Live - copy|8832|CParameter::SetValue|DBG|2|
2025/06/03 23:03:31.393|SLProtocol - 1084 - Titan-Live - copy|8832|CParameter::SetValue|DBG|2|-> PingCheckResponse set value to VT_BSTR : {"ping": "ok"} ({"ping": "ok"})
2025/06/03 23:03:31.393|SLProtocol - 1084 - Titan-Live - copy|8832|CParameter::SetValue|DBG|2|
2025/06/03 23:03:31.469|SLProtocol - 1084 - Titan-Live - copy|8832|CGroup::Execute|DBG|6|Finished executing group 2
2025/06/03 23:03:31.470|SLProtocol - 1084 - Titan-Live - copy|19012|CTimer::TimerThreadFunc|DBG|6|Last group finished.
Session working ok and get : {
"ping": "ok"
}
But no tigger QAction when params 3 have value.
The second issue:
I run manually Qaction:
using System;
using Newtonsoft.Json.Linq;
using Skyline.DataMiner.Scripting;
public static class QAction
{
publicstaticvoid Run(SLProtocol protocol)
{
try
{
string json = protocol.GetParameter(3)?.ToString();
protocol.Log("Value jsonnnnn:" + json,LogLevel.LogEverything);
var jsonObject = JObject.Parse(json);
if (jsonObject.TryGetValue("ping", out JToken pingToken))
{
string pingValue = pingToken.ToString();
if (string.Equals(pingValue, "ok", StringComparison.OrdinalIgnoreCase))
{
protocol.SetParameter(Parameter.apihealth, 1); // OK
}
else
{
protocol.SetParameter(Parameter.apihealth, 0); // FAIL
}
}
else
{
protocol.SetParameter(Parameter.apihealth, 0);
}
}
catch (Exception ex)
{
protocol.Log($"QA{protocol.QActionID}|{protocol.GetTriggerParameter()}|Run|Exception:{Environment.NewLine}{ex}", LogType.Error, LogLevel.NoLogging);
protocol.SetParameter(Parameter.apihealth, 0); // Por seguridad: asumimos FAIL
}
}
}
For some reason params 3 is null
but in log appear :
2025/06/03 23:03:31.379|SLProtocol - 1084 - Titan-Live - copy|8832|CProtocol::LogHttpRequest|INF|3|<- 23:03:31 - GET http://172.28.20.201:80/api/v1/system/network/ping
2025/06/03 23:03:31.391|SLProtocol - 1084 - Titan-Live - copy|8832|CProtocol::ProcessHttpResult|INF|3|HTTP/1.1 200 OK
2025/06/03 23:03:31.392|SLProtocol - 1084 - Titan-Live - copy|8832|CParameter::SetValue|DBG|2|-> StatusCodePingCheck set value to VT_BSTR : HTTP/1.1 200 OK (HTTP/1.1 200 OK)
2025/06/03 23:03:31.392|SLProtocol - 1084 - Titan-Live - copy|8832|CParameter::SetValue|DBG|2|
2025/06/03 23:03:31.393|SLProtocol - 1084 - Titan-Live - copy|8832|CParameter::SetValue|DBG|2|-> PingCheckResponse set value to VT_BSTR : {"ping": "ok"} ({"ping": "ok"})
2025/06/03 23:03:31.393|SLProtocol - 1084 - Titan-Live - copy|8832|CParameter::SetValue|DBG|2|
2025/06/03 23:03:31.469|SLProtocol - 1084 - Titan-Live - copy|8832|CGroup::Execute|DBG|6|Finished executing group 2
Thanks
Hi,
I can see values in both parameters, but the API Health parameter is linked to a QAction. The QAction should send 1
to API Health if it detects "ping": "ok"
, and 0
if it detects null
or an error.
However, I don’t know how to trigger the QAction to analyze the first value and show the result in the API Health parameter.

Hi,
It seems that the session is correctly fetching the data, and your configuration to trigger the QAction also seems correct to me.
I suspect that something in the QAction itself is going wrong.
The logs of the element itself should give you more information.
These can be found at C:Skyline DataminerLogging<elementName>.txt.
Could you before you even fetch the value of parameter 3 add a log message (e.g. 'protocol.Log("My unique log message", LogType.Error, LogLevel.NoLogging);')
You should be able to see this log message appear in that log file every time the QAction is triggered (so in your case once at startup since the value of parameter 3 is the same every time and the QAction won't retrigger).
If that succeeds, I suggest you add logging messages after every step to see what goes wrong.
I hope this will give you a way to proceed.
Let me know if you keep having problems.
Kind regards,