All Apps and Add-ons

How to create multiple account with Apikey and secret key in Splunk add on builder

Explorer

Hi Folks,

I have developed custom add-on using splunk add on builder for REST API input and it is working fine. but i would like know is there any way create multiple account with API and secret key in single add-on using add on builder.

For Ex:

I have application called SAP gigya, we are trying to fetch the logs from all the environment like Dev/QA/PRD and each environment has different API and secret key, right now i have created add-on which i can use for single Environment because the API and secret key parameters calling from add-on setting parameter so i can't use the same API key for other environment.

To complete this requirement i am planning create account with API key for each environment but i could not able to find that option in Add on builder.

Could you please let me know if any one has any idea how to create the multiple account using API and secret key

sampe output : in same Add-on

  1. account name=Dev_account
  2. Apikey=*********
  3. SecretKey=*******

  4. account name=PRD_account

  5. Apikey=*********

  6. SecretKey=*******

Thanks,
Sridhar

Tags (1)

Explorer

alt text

0 Karma

Motivator

Hi @lksridhar,

Use custom Add-on setup parameter instead of global account. In Add-on builder Input's "Add-on Setup Parameters" page. Uncheck "Global account settings" and add one text (use password if you want apikey to be encrypted) field for ApiKey and password field for SecretKey.

In Add-on setup page you will see as many time you want now you can add account with different IDs like Dev_account/Prod_account.

Hope this helps!!!

Explorer

Thanks VatsalJagani for your response, i have followed all the steps but it is not working for me. Please find below image under answer. please correct if i am missed any configuration .

0 Karma

Motivator

After these steps, Go to your created Add-on, there you will see three dashboards: Inputs, Configuration, Search. Go to Configuration, there you will see three tabs: Account, Proxy, Logging. Go to Account and you will see a screen below with "Add" buttons allowing you to create multiple accounts. I think currently you are in Add-on builder app.

https://ibb.co/tmGTrXM

0 Karma

Explorer

Pls correct me if i am wrong, if we uncheck "Global account settings" , the account option will not show in under configuration tab, for me account option is not showing under configuration. PFA![alt text][1]

https://ibb.co/M27zgcN

0 Karma

Motivator

If you use "Global account settings" it will be shown under Configuration > Add-on settings.
If you uncheck global account and use custom input elements, you will see that under Configuration > Account.

0 Karma

Explorer

I have followed all the steps but it is not showing for me . attached steps which i followed. please correct the steps me if am wrong.

https://ibb.co/CvBvBKW

https://ibb.co/f9pYh6v

0 Karma