All Apps and Add-ons

Initialising Mint SDK through HEC Url

rahul0106231
New Member

We are trying to activate Mint using the Hec Url and API Key in our IOS and Android Apps , but the Http Event Collector Url that the Mint is pointing is inside the firewall , so we have create a mapping on our gateway which can be accessed from the outside network , but when i try to activate Mint SDK with Hec url and pass in my gateway mapping , it complains that the Url is invalid . How to solve this problem ? In majority of the enterprises the spunk servers are inside the organisation and normally they can't be connected from mobile apps directly . mobile apps can only contact the gateway and in turn gateway connects to the internal Url's.. Im pretty sure other organisation might have faced this problem.

Tags (3)
0 Karma

harsmarvania57
SplunkTrust
SplunkTrust

Hi @rahul0106231,

Is your gateway mapping URL is accessible over internet ?

Generally how this works, iOS or Android app will initiate request on publicly available URL with port details & HEC token (If HEC URL or gateway mapping URL configured in Mint SDK is not available publicly over internet then this will not work), let's say mobile App initiated traffic on gateway URL then gateway URL in your network translate or transfer that traffic to internal HEC server with port & token and if token is authorized then Splunk HEC will ingest data in Splunk.

0 Karma

rahul0106231
New Member

Yes , gateway mapping URL is available publicly . When i try to use that Url in the Mint sdk initialisation code .It gives an error saying that Url is invalid .Im assuming mint SDK expects the Url to have a port no and the needs to end with /collector/mint .Im not sure why this validation has been introduced .Is there a work around for this issue?

0 Karma

rahul0106231
New Member

I went through the documentation , we have the hec url setup like the one mentioned in the documentation , but the problem is the host is inside the organisation(A Large Bank) and cannot be accessed over internet/ mobile apps . In our organisation in order to access the content inside the firewall ,we go through the gate way . We have already created a gateway mapping for the HEC Url . It takes the form of https://mobile.companyname.com/collector/mint , when i try to use this url in the Mint Initialisation code , it complains that the url is invalid .. So my question still remains the same how to activate Mint using hec Url , when your server setup is not directly accessible through internet..

0 Karma

rahul0106231
New Member

Just FYI our Hec Url takes the form of https://xyz.companyname.net:8080/services/collector/mint . and it works fine when i connect my mobile app to our company's internal wifi .. mint gets initialised ,and im even able to send the data to it .. but since its a mobile app and needs to be avilable over internet , we have created a gateway mapping to it , which transfers the content to the hec url , but the mint initialisation is a problem when i use the gateway mapping url in the mint Initialisation code.. Im assuming a lot of large enterprises would have faced this problem, so wondering if there is a solution to it..

0 Karma

harsmarvania57
SplunkTrust
SplunkTrust

I am not sure how you mapped in Gateway device but if I would like to set this then I'll do something like

Foe example : Assume that I have gateway URL or we can say URL myexternalurl.example.com which is accessible over internet and that is listening on let's say port 18088 and configured on Load Balancer.

  1. First I'll do Mint SDK configuration with URL https://myexternalurl.example.com:18088/services/collector/mint which send traffic on Load Balancer which is external facing.
  2. Then on gateway device (In my example Load balancer) redirect all traffic to internal Splunk HEC server to http[s]://splunkhecserver.internaldomain.com:8088/services/collector/mint
0 Karma

rahul0106231
New Member

Aah ! Thanks ,let me try creating a mapping url in this format.

0 Karma

harsmarvania57
SplunkTrust
SplunkTrust

You need to use URL with port , have a look at documentation on how to initialize Mint SDK in IOS http://docs.splunk.com/Documentation/MintIOSSDK/5.2.x/DevGuide/AddSplunkMINTtoyourproject#Initialize... and http://docs.splunk.com/Documentation/Mint/1.0/ProductOverview/AboutSplunkMINTdatacollection#How_do_I...

Initialize the SDK in your mobile app projects using the HEC token you created above, and the HEC URL for the MINT endpoint. This URL takes the form "https://host:mPort/services/collector/mint", where host is the hostname of your Splunk Enterprise instance, and mPort is the port you defined in the Global Settings of the HTTP Event Collector data input, such as "8088". For more, see the services/collector/mint endpoint in the REST API Reference Manual.
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...