Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
Splunk: Python Lookup
(edit)
Revision as of 15:09, 14 November 2019
15 bytes removed
,
15:09, 14 November 2019
m
no edit summary
Line 24:
Line 24:
@staticmethod
@staticmethod
def read_arguments():
def read_arguments():
−
ipfield
= sys.argv[
2
]
+
arg1
= sys.argv[
1
]
−
location
= sys.argv[
1
]
+
arg2
= sys.argv[
2
]
−
return
ipfield
,
location
+
return
arg1
,
arg2
@staticmethod
@staticmethod
Line 65:
Line 65:
class SplunkLookupError(object):
class SplunkLookupError(object):
pass
pass
−
</syntaxhighlight>Create your own lookup in: /opt/splunk/etc/system/bin
</syntaxhighlight>Create your own lookup in: /opt/splunk/etc/system/bin
Example : geoip.py<syntaxhighlight lang="python">
Example : geoip.py<syntaxhighlight lang="python">
Rafahsolis
Bureaucrats
,
Administrators
2,306
edits
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
Variants
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
Special pages
Printable version