PagerDuty / pdagent

The PagerDuty Agent is a program that lets you easily integrate your monitoring system with PagerDuty.

Home Page:http://www.pagerduty.com/docs/guides/agent-install-guide/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ImportError: No module named pdagent.config : on RedHat 6.9

mayankgupta0510 opened this issue · comments

[root@mo-0bda67593 bin]# pd-send -k cf2b1fbcc57646fdb1b6f3cc6f0564d0 -t trigger -d "Test test" -i server.test
Traceback (most recent call last):
File "/usr/bin/pd-send.py", line 126, in
import pdagent.config
ImportError: No module named pdagent.config

Perform the following procedure:

For example: use your new python ver and copy

cp -a /usr/lib/python2.7/site-packages/pdagent /usr/share/pdagent/bin/

Then try restart!!

Post doing this there might even be the case that there is python3 on your system and pd-send is picking up that.
You can try any of these:

  • python /usr/bin/pd-send.py instead of pd-send
  • /usr/bin/pd-send file have an if condition to check python version. Remove that and use the else part only to use python2