Shell Command Action script not writing to file


Article ID: 196404


Updated On:


CA Application Performance Management Agent (APM / Wily / Introscope) CA Application Performance Management (APM / Wily / Introscope) INTROSCOPE DX Application Performance Management


We are trying to create a shell command action. The script is on the following path: /introscope/scripts/recycle_ABC/
The $1 is the user's defined field and $2 is the parameters we can choose from the right.
To validate the execution, we have created a simple script, that will write to a file the values of $1 and $2.


echo "Run" >> ABC_introscope.txt
echo "First parameter value $1" >> ABC_introscope.txt
echo "Second parameter value $2" >> ABC_introscope.txt

echo -e "\n"

We can see below configuration on Workstation:

We do not see any thing written in the ABC_introscope.txt file.

We do not see any errors on IntroscopeEnterpriseManager.log file, just see executions of the script:

7/30/20 11:12:25.707 AM CDT [INFO] [PO:main Mailman 5] [Manager.Action] Test requested of Action "Recycle_ABCOOL".
7/30/20 11:12:25.711 AM CDT [INFO] [Alarm Pooled Worker] [Manager.Action] Action "Recycle_ABCOOL" successfully executed shell command "/introscope/scripts/recycle_ABC/"


Release : 10.7.0

Component : APMISP


On the output log file ABC_introscope.txt, the full path to the log file was not provided, which seems to be the case of this issue. 

So, the script should look as follows:


echo "Run" >> /introscope/scripts/recycle_ABC/ABC_introscope.txt
echo "First parameter value $1" >> /introscope/scripts/recycle_ABC/ABC_introscope.txt
echo "Second parameter value $2" >> /introscope/scripts/recycle_ABC/ABC_introscope.txt

echo -e "\n"