All Apps and Add-ons

RFE: Can you add support to write to influx cloud via HTTPS?

hisands
New Member

Hi Yasaswy Ravala,

One of the requirements that i have is to write data to influx cloud which only accepts data over HTTPS. I can see that the change should be fairly simple. It would be of a great help if you can make this change.

Instead of hard coding the posturl to be always http, in the get_influxdb_instance_details() in the file splunk_to_influxdb.py, can we add an option in the UI to choose if we want to do HTTP or HTTPS and read from there?

def get_influxdb_instance_details():
        try:
                req = service.request("storage/collections/data/influxdbconf/%s" % infdb_instance,method='get')
                log.info('Successfully accessed collection data for %s' % infdb_instance)
        except Exception, e:
                log.error('Unable to access collection data  %s' % str(e))
                sys.exit()

        try:
        global infdbhost, infdbport, infdbuser, infdbaccs, infdbdb, posturl
                coldata_raw = req.body.read()
                coldata = re.sub(r'[([\])\']','', coldata_raw)
                coldata_port = json.loads(coldata)
                infdbhost = (coldata_port['infdbHost'])
                infdbport = (coldata_port['infdbPort'])
                infdbuser = (coldata_port['infdbUser'])
                infdbaccs = (coldata_port['_infdbPass'])
                infdbdb = (coldata_port['infdbDatabase'])
                **posturl = 'http://%s:%s/write?db=%s&precision=ms&p=%s&u=%s' % (infdbhost,infdbport,infdbdb,infdbaccs,infdbuser)**
                log.info('Successfully parsed collection data %s,%s,%s,%s' % (infdbhost,infdbport,infdbuser,infdbdb))
        except Exception, e:
                log.error('Unable to parse collection data %s' % str(e))
                sys.exit()

Thanks,
Sandeep.

0 Karma

indeed_2000
Motivator

@hisands did you connect splunkdb with influxdb?

i try it but got error:

https://community.splunk.com/t5/Splunk-Search/driver-influxdb-to-splunk-db/m-p/605850#M210681

would please how do you do this?

 Thanks

0 Karma

Yasaswy
Contributor

This has now been added... will work from v1.7. Provide the info as https:port (Eg. https:8089) in the influx_configs tab under protcol:port

arnost_m
Engager

Works! Thanks

0 Karma

Yasaswy
Contributor

hi Sandeep,
Very reasonable ask. Have not been checking answers for a while. Will add shortly and update..

0 Karma
Get Updates on the Splunk Community!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.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 ...