Refine your search:

I am trying to add the DB2 database module (i.e ibm_db-1.0.3-py2.6-win32.egg) to Splunk Python on Windows 2008 Server 64 bit OS

I found a similar question here: http://answers.splunk.com/questions/8/can-i-add-python-modules-to-the-splunk-environment

http://answers.splunk.com/questions/6033/adding-python-module-to-splunk

When I did the steps mentioned in the posting, it doesn't extract anything. So please let me kno where i am going wrong.

Here are the steps

  1. Copy the ibm_db-1.0.3-py2.6-win32.egg file to c:\Splunk\bin
  2. Extract Python Module using below command didn't do anything:

    cd c:\splunk\bin

    splunk cmd python setup.py install

Opens up a new command prompt window and immediately closes it. I am sure it didnt do anything as i didnt find aynthing extracted in the folder

C:\Splunk\Python-2.6\Lib\site-packages

I also tried copying setup.py to c:Splunk\bin but it didnt help.

Then i tried the following command which didnt work either

$ splunk cmd ./ibm_db-1.0.3-py2.6-win32.egg 

So i am not sure if their is an easy way to add python module to Splunk. Please note i am using Python version of Splunk i.e. 2.6

asked 10 Dec '10, 19:38

bansi's gravatar image

bansi
6911
accept rate: 0%

edited 10 Dec '10, 19:44


One Answer:
link

answered 11 Dec '10, 00:16

araitz's gravatar image

araitz ♦♦
7.2k2516
accept rate: 38%

Well as i mentioned in original post, i did saw the article you are referring to but it doesn't help in my case. I guess the problem in my case is 1)NO Python DB2 module is available for 64 bit OS OR 2) i am missing how to extract ibm_db-1.0.3-py2.6-win32.egg file to c:Splunkbin. Please note following commands doesn't work for me. 1)splunk cmd python setup.py install 2) splunk cmd ./ibm_db-1.0.3-py2.6-win32.egg What am i missing?

(13 Dec '10, 17:38) bansi

executing an egg directly as jonvey's example isn't going to work on windows.

I'm not a big fan of eggs as they're supposed to make things easier, but they make things harder if you don't know how they work. There's this general egg-install-on-windows thing http://stackoverflow.com/questions/458311/how-do-i-install-an-egg-file-without-easy-install-in-windows

Do we really ask people to install python modules in our environment? It's generally a more stable result to install modules in a system python that won't get updated on splunk upgrade.

(15 Dec '10, 18:42) jrodman ♦

Ok i have installed pyodbc module on system python 2.7 and have external database lookup script running under system Python 2.7.

Please let me know how to integrate the database lookup script into Splunk Python version 2.6.

(20 Dec '10, 15:04) bansi
Post your answer
toggle preview

Follow this question

Log In to enable email subscriptions

RSS:

Answers

Answers + Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×87
×40

Asked: 10 Dec '10, 19:38

Seen: 988 times

Last updated: 03 Apr '11, 04:22

Copyright © 2005-2012 Splunk, Inc. All rights reserved.