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.
@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
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
Works! Thanks
hi Sandeep,
Very reasonable ask. Have not been checking answers for a while. Will add shortly and update..