cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

This product reached the end of support date on March 31, 2021.

Generic execution plugin - add weird character to cmd

Hello,

I'm trying to use the generic execution plugin to launch some curl command but it seems it's adding some weird character encoding in my command.

This is the command I'm trying to execute (only rawdata, no variable):

curl -g -k https://stg.esg/SILVA_00008_EmEve... --data-urlencode "source=Dynatrace-NE" --data-urlencode "message_key=NoVariable" --data-urlencode "description=NoVariable" --data-urlencode "node=whatever" --data-urlencode "severity=1" --data-urlencode "state=1" --data-urlencode "u_proposed_assignment_group=APM_NE" --data-urlencode "u_short_description=Dynatrace+TEST+Alert"

When I execute the command manually on my system, my remote system receive the following paramters:

source=Dynatrace-NE&message_key=NoVariable&description=NoVariable&node=whatever&severity=1&state=1&u_proposed_assignment_group=APM_NE&u_short_description=Dynatrace%2BTEST%2BAlert

when executed via the plugin:

source=Dynatrace-NE%22&"message_key=NoVariable%22&"description=NoVariable%22&"node=whatever%22&"severity=1%22&"state=1%22&"u_proposed_assignment_group=APM_NE%22&"u_short_description=Dynatrace%2BTEST%2BAlert%22

Any idea of what is going wrong here?

2 REPLIES 2

andreas_grabner
Dynatrace Guru
Dynatrace Guru

It seems the values are getting URL encoded. %22 is the encoding for ". So - I wonder how you call the Generic Execution Plugin and how you pass these values. Seems that some special characters like " (quote) gets URL Encoded

Hi Andreas, I though about something like that but I never figured how to have it properly working.

I did surrender on this and I limited the use of this plugin to simply call a shell script and then that's this shell script which properly format my curl call.