Agent action encode
-
Trying to create an action that runs a script but as soon as i have char åäö in parameter it seems like it fails to run the process, have agent in debuglevel 6 and no error shows up it runs process and it shows PID for it.
I have verified that everything i can think of is utf8
made debug script that logs to file if run Action=debug:/agent/script/ping.sh --message "$1"
$node.executeAgentCommand("debug","test") runs fine and log files are created
$node.executeAgentCommand("debug","testå") is executed according to agent log and gets PID but no logs are created and i can't figure any more deeper way to debugRunning agent 5.2.6 on Debian 12 in docker
if i run script in docker cli it works with åäö only fails when agent runs the script.
Any tips or known issues?
-
Something as simple as
Action=debug:echo "$1" >> /tmp/a.txt
works for me with these letters. But I did not try in Docker, can you check if this works there?Can you show your ping.sh script?
-
#!/bin/sh # /agent/script/ping.sh LOG=/agent/script/logs mkdir -p "$LOG" TS="$(date -u +%Y%m%dT%H%M%SZ)" { echo "----- $TS -----" echo "PWD: $(pwd)" echo "USER: $(id)" echo "ARGV_STR: $*" } >> "$LOG/ping.txt" printf '%s\n' "$@" | od -An -t x1 >> "$LOG/ping-bytes.hex" 2>/dev/null || truei tried Action=debug:echo "$1" >> /agent/script/a.txt also to have it as simple as possible and
$node.executeAgentCommand("debug","test") creates a.txt containing test
$node.executeAgentCommand("debug","testå") does not create a.txt, not error in agent log just "Execution of external action debug (echo "testå" >> /agent/script/a.txt) started"If i run echo "testå" >> /agent/script/a.txt manually in same docker agent is running a.txt is created as utf8 and containing testå
-
-
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login