Splunk AppDynamics

Passing the parameters of health rule to shell script

CommunityUser
Splunk Employee
Splunk Employee

Hi,

At present our client sending the email to particular dl after healthrule is voilated. Now we are planning to create one custom action and send the parameters to shell script. This shell script will push the health rule details to our java web application.

Can anyone please provide the sample shell script to get parameters(Node name and health rule name) of health rule voilation.

Please revert if you want further information.

Thanks and Regards

Siva

Labels (1)
0 Karma
1 Solution

CommunityUser
Splunk Employee
Splunk Employee

Hi Siva,

Please check any of the scripts below could help you serving as an example:

Custom Action Scripts

Pease refer the documentation in my previous response. It has the details of Health Rule parameters. Users are encouraged to write the scripts using any of the listed parameters. The sample script should help understand how they can be used.

Thanks,

Asha.

View solution in original post

CommunityUser
Splunk Employee
Splunk Employee

Hi Siva,

Please see if the following documentation helps you retrieve the details you are looking for:

Retrieve Event Data

Retrieve All Health Rule Violations in a Business Application

Given you are trying to get these details into a Java Application, please check if you really need to implement a custom action to this end. If the above REST APIs are what you are looking for, probably your Java Application can consume them as a client.

Although the product offers the feature of custom actions so that users can create and trigger execution of a customized shell/bat script to fulfill their various requirements, we do not have any such example scripts.

Looking at your requirement mentioned below, if at all the custom action script is a necessary requirement, please see if you can use the above REST API and pull concerned data to complete the sequence of actions you are interested in.

Thanks,

Asha.

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi Siva,

In case if you were looking for the order of the parameters passed into the Custom Actions from the Health Rules and Events, please refer the following documentation:

Build a CustomAction -Information Passed to the Custom Action Script from AppDynamics

Please find an example as below:

ServiceNow integration using Custom Actions

Hope that helps.

Thanks,

Asha.

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi Asha,

Thanks for your help.

The script present in below link getting the events only. But I want the health rule parameters.

ServiceNow integration using Custom Actions

Can you please help in getting health rule parameters into shell script.

Thanks and Regards

Siva Mullapudi

Tags (1)
0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi Siva,

Please check any of the scripts below could help you serving as an example:

Custom Action Scripts

Pease refer the documentation in my previous response. It has the details of Health Rule parameters. Users are encouraged to write the scripts using any of the listed parameters. The sample script should help understand how they can be used.

Thanks,

Asha.

CommunityUser
Splunk Employee
Splunk Employee

Hi Asha,

Now able to get the required parameters into my web application.

Thanks for your help.

Thanks

Siva

Get Updates on the Splunk Community!

Splunk Observability Synthetic Monitoring - Resolved Incident on Detector Alerts

We’ve discovered a bug that affected the auto-clear of Synthetic Detectors in the Splunk Synthetic Monitoring ...

Video | Tom’s Smartness Journey Continues

Remember Splunk Community member Tom Kopchak? If you caught the first episode of our Smartness interview ...

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud?

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud? Learn how unique features like ...