3) The next step is to add the definition for this action. Open the file system_action_definitions.xml located under "/var/lib/ambari-server/resources/custom_action_definitions/" folder using your favourite editor and add the below content alertDefinitions tag

I am working in a Azure HDInsight Hadoop Cluster having 2 headnodes [primary and secondary] and 2 worker nodes and 1 edge node. I have configured the script and restarted ambari server to reflect the changes as you've mentioned but want to execute the script specific to primary head node.

By executing the command hostname -f, I got the FQDN of that host and execute the following command from edge node:

Note: You can add comma separated inputs if you need any inputs for the script.

That is great because I need to pass my script an input. I was able to create the custom action definition so that it expects and input (as you suggested was possible). Unfortunately I can't find anywhere that tells/shows how to pass the input. I have tried something like the following: