Splunk Search

custom command import help

zachvida
Path Finder

This plus the rest of the script work as expected

!/usr/bin/env python

import splunk.Intersplunk

I need to use the pgdb module so:

!/usr/bin/env python

import splunk.Intersplunk

import pgdb

Returns errorcode 1

I tried puttying pgdb in the same folder

[root@splunk2 bin]# ls -lah pgdb.py
-rwxr--r-- 1 splunk splunk 11K Aug 15 12:10 pgdb.py

[root@splunk2 bin]# ls -lah customcommand.py
-rwxr--r-- 1 splunk splunk 11K Aug 15 12:10 customcommand.py

I also tried:

`import sys

import splunk.Intersplunk

sys.path.append("/usr/lib64/python2.4/site-packages/")

import pgdb'

Any ideas on what I need to put in my script to use the pgdb module?

Tags (1)
0 Karma
1 Solution

zachvida
Path Finder
0 Karma
Get Updates on the Splunk Community!

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...