AppD Archive

Custom Action not showing

CommunityUser
Splunk Employee
Splunk Employee

Hi,

 
I'm having problems adding a custom action to Saas. I've copied both AppServerAgent and MachineAgent folders to my server running java, in both folders I created custom/actions/action1/test.sh and custom/actions/test.xml files
 
Content of custom.xml:
<custom-actions>
<action>
<type><action1></type>
<executable><test.sh></executable>
</action>
</custom-actions>
 
Content of test.sh
echo "it works!" >> /tmp/test
 
Both javaagent.jar and machineagent.jar send metrics and I can see them in Saas, but when I try to add custom action, drop down menu is empty. Any ideas why?
 
Thank you
0 Karma
1 Solution

Arun_Dasetty
Super Champion

Hi,

Thanks for posting back, Yes, your understanding is right if you are using saas controller then you cannot configure custom-actions as you might not have access to the saas controller physical machine,

However you can run local scripts using local machine agent as suggested in docs http://docs.appdynamics.com/display/PRO13S/Remediation+Actions#RemediationActions-PrerequisitesforLo...

Let us know if that helps

Please find the updated links:
http://docs.appdynamics.com/display/PRO13S/Custom+Actions

http://docs.appdynamics.com/display/PRO13S/Remediation+Actions

Thanks,

Arun

View solution in original post

0 Karma

Arun_Dasetty
Super Champion

Hi,

Thanks for writing in. We would like to clarify that the custom actions are executed by controller and should be integrated under <controller_install_dir>/custom/actions as stated in docs

http://docs.appdynamics.com/display/PRO13S/Build+an+Alerting+Extension

Custom actions are not supoorted and will not be executed by appserver and machine agent and integration custom actions under appserver agent and machine agent install directories will not help.

Also we understood that you have followed the docs listed above and we see doc bug in the same custom.xml syntax:
Can you please configur custom actions as per docs with the custom.xml updated as follows:

Updated content of custom.xml, there should not be < or > around the value inside the type and executable elements:

<custom-actions>
<action>
<type>action1</type>
<executable>test.sh</executable>
</action>
</custom-actions>

make sure that you have executable permissions to test.sh and have configured custom notifications as per docs, you need to configure alert(health rule, or automation task) so that on violation/execution of the corresponding alert your custom action will get executed.

We do have feature to execute a local script using machine agent by configuring remediation actions as stated in docs:
http://docs.appdynamics.com/display/PRO13S/Custom+Actions

http://docs.appdynamics.com/display/PRO13S/Remediation+Actions, let us know if that helps

Let us know how it goes after making above changes, Do write back to us for further assistance

Thanks,

Arun

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi Arun,

Thanks for the response. So as I understand, if I want to use Saas tool I will not be able to create custom actions?

Also the last couple links don't work, can you repost them?

0 Karma

Arun_Dasetty
Super Champion

Hi,

Thanks for posting back, Yes, your understanding is right if you are using saas controller then you cannot configure custom-actions as you might not have access to the saas controller physical machine,

However you can run local scripts using local machine agent as suggested in docs http://docs.appdynamics.com/display/PRO13S/Remediation+Actions#RemediationActions-PrerequisitesforLo...

Let us know if that helps

Please find the updated links:
http://docs.appdynamics.com/display/PRO13S/Custom+Actions

http://docs.appdynamics.com/display/PRO13S/Remediation+Actions

Thanks,

Arun

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Configuring remediation actions worked for me, thanks 🙂

0 Karma
Get Updates on the Splunk Community!

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to Officially Supported Splunk ...