Hi there, I have just started working on Splunk and is totally new to Python.
For my situation, I would like to create a custom command just like any other commands(e.g. Top/ Rare), I would like my custom command to display the current system time.
here is my Python script:
CurrentTime.py
import time;
localtime = time.localtime(time.time())
print "Local current time :", localtime
And here is my commands.conf
[CurrentTime]
type = python
filename = CurrentTime.py
streaming = false
generating = false
Not sure if the above codes are correct, but if they were functional, what should I do to actually get it to display the current system time on my Splunk app?
... View more