@filipp-sudanov said in ISP Connectivity Monitoring with ICMP:
It's probably taking the first line of the output that was obtained via ssh. In this case it's !!!!!, which might be interpreted as 0 if the DCI is Integer.
If you check history for this DCI, raw value column might have some clue.
if your router supports i command which allows to filter the output, you can do something like this:
ping 8.8.8.8 repeat 3 timeout 1 | i Success
This would limit the output just to one line, which then can be parsed using transformation script. Note that I limited number of requests and timeout as by default there's 4 second limitation between netxms server and agent - result should be returned within that time.
If above is not possible, the other approach is to call ssh command from NXSL script. In this case all lines of output are received (as array) and we can parse this array to extract data:
r = $node.executeSSHCommand("ping 8.8.8.8 repeat 3 timeout 1");
avg = -1;
for (s : r) {
m = s match "Success rate is .* round-trip min/avg/max = .*/(.*)/.*";
if (m) avg = m[1];
}
return avg;
You can either put this script into script library and use it in Script DCI; or you can make Internal DCI with metric Dummy and put this into transformation script.
Thank you soo much Filipi, Am going to test this and come back. I know am quite new to NetXMS and learning. I will try this out..Thank you