All Apps and Add-ons

Using IMAP App with Non-Standard Root Endpoint

David
Splunk Employee
Splunk Employee

I'm running Splunk on a VPS, so I am reverse proxying behind Apache. My web.conf shows the following:

[settings]
root_endpoint = /splunk
tools.proxy.on = True

I have configured my imap app appropriately (from bin/getimap.py --debug):

DEBUG:root:splunkHostPath=http://localhost:8000/splunk/

But I get errors from the debug:

DEBUG:root:decrypted splunk password
DEBUG:root:invalid literal for int() with base 10: '8000/splunk'
Traceback (most recent call last):
  File "getimap.py", line 405, in getMailbox
    latestTime = self.getCacheIDForMailbox(box)
  File "getimap.py", line 253, in getCacheIDForMailbox
    splunk.mergeHostPath(self.splunkHostPath, True)
  File "/opt/splunk/lib/python2.6/site-packages/splunk/__init__.py", line 128, in mergeHostPath
    setDefault('port', int(port))
 ValueError: invalid literal for int() with base 10: '8000/splunk'
None

I've played around a fair amount with the splunkHostPath setting -- leaving off the /splunk/, leaving off the trailing /, etc., but it doesn't work (there is a 404 error if I leave it off entirely).

Is there a way to make this work when a root_endpoint is specified?

Tags (1)
0 Karma
1 Solution

jrodman
Splunk Employee
Splunk Employee

from imap.conf:

#Path to the splunk host path. If yours is different from the default change this to
#https://<hostname>:<port>
splunkHostPath = https://localhost:8089

This is for the management port (how to reach splunkd). You should probably leave it at the default. The root endpoint stuff is a red herring.

View solution in original post

jrodman
Splunk Employee
Splunk Employee

from imap.conf:

#Path to the splunk host path. If yours is different from the default change this to
#https://<hostname>:<port>
splunkHostPath = https://localhost:8089

This is for the management port (how to reach splunkd). You should probably leave it at the default. The root endpoint stuff is a red herring.

gkanapathy
Splunk Employee
Splunk Employee

root_endpoint refers to the URL of SplunkWeb. The splunkHostPath is asking for the splunkd location.

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