I got an url from splunk wiki
The configuration given in that url is
1. Create an app with my python module inside controllers folder
2. In web.conf create a endpoint as [endpoint:
3. just restart. The method inside the puython module can be accessed through the url
4. Restart and login again
But, even after doing the above configuration URL of the above pattern is not available.
Anyone Please share your knoledge related to this.
Sorry.. Same set up works for me...
Previously I just configured the web.conf in $SplunkHome$/etc/system/local..
Now I did the same configuration inside $SplunkHome$/etc/apps//default. It works and my python function is working as a listener for a http request (http:/ip:/custom///)
[endpoint:netutils] #Name of the python file
import splunk.appserver.mrsparkle.controllers as controllers
from splunk.appserver.mrsparkle.lib.decorators import expose_page
from splunk.appserver.mrsparkle.lib.routes import route
def listenerGet(self, **kwargs):
cherrypy.response.headers['Content-Type'] = 'text/plain'
return 'I am responding for your request'
Please refer http://wiki.splunk.com/Community:40GUIDevelopment
Hi paramagurukarthikeyan, Thanks for posting this. I am also looking similar one like this.
couple of clarifications.
1, How you called "MyPython.py" in your HTML view page?
2. You mentioned endpoint as "netutils", But where are you using this?, I am not seeing this in .py file.
Thanks for your time.
I can't get this to work. Is it not supported in 6.4.x and above?
The documentation you've linked to in another answer is of Splunk 4.x
I always get a error 404, even when I tried to run your exact code. Anyway I can fix this?