Hello, guys.
I have a script which monitor the interface’s traffic, and when detects a supposed link saturation, runs a script in another router through SSH:
:if ([:len [/file find name=SaturatedLink.txt]] > 0) do={
} else={
/interface monitor-traffic sfpplus1 once do={
:if ($“rx-bits-per-second” > 100000 or $“rx-packets-per-second” > 9) do={
:log info “**** The link is saturated. " ;
/file print file=SaturatedLink;
/system ssh 10.10.10.1 user=admin “/system script run ChangeRoutes”;
/file remove [find name=SaturatedLink.txt];
:log info " Command executed ****” ;
}
}
}
When I run this script through the terminal (/system script run XPTO), it works. But when I run it through the scheduler or via GUI (system > script > run script), it does’nt work. I’ve ever configured the pair of SSH keys, and the SSH login does’nt prompt me a password anymore.
Please, could anyone help me?