Forum Discussion
3 Replies
what do you mean with EXPECT language? a specific string that should be returned?
with external monitors you can do what you want, so you can configure to trigger only on a specific string.
- Aaron_WalkerNimbostratus
Hi
I have an bash script which runs fine from the CLI - but when I copy it into an external monitor and attach it to a pool the script fails when evaluating EXPECT commands.
Am guessing there is a difference in the way external monitor and cli handles bash/expect scripts?
i.e the following is called from my bash script:
#!/usr/bin/expect -f
spawn ssh -q -t -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no sv_admin@172.20.49.40
expect "password:"
send "xxxx\r"
expect "pts"
log_file -noappend /var/run/PTS1_cpu_values
send "show system resources 66 | grep PTSD\r"
expect pts
send "exit\r"
Fails when called from an external monitor....?
external health monitors shouldn't have any output to standard output, doesnt this one have quite some output?