Comments (11)
This script uses the Requests module, which is not included in the Python Standard Library. You should be able to install the python-requests
package to solve this, or use your Python module implementation of choice (i.e. pip, virtualenc, etc).
from collectd-plex.
Great, thanks for the point in the right direction. I installed requests==2.6.0; collectd service starts as expected but another error was identified:
Nov 30 18:26:39 dionysus polkitd[988]: Unregistered Authentication Agent for unix-process:29633:3476515 (system bus name :1.195, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
Nov 30 18:26:39 dionysus collectd[29639]: Initialization complete, entering read-loop.
Nov 30 18:26:39 dionysus collectd[29639]: Unhandled python exception in read callback: ConnectionError: ('Connection aborted.', error(13, 'Permission denied'))
Nov 30 18:26:39 dionysus collectd[29639]: read-function of plugin `python.plex' failed. Will suspend it for 20.000 seconds.
Can you help with this?
from collectd-plex.
from collectd-plex.
Collectd is running on the same box as Plex. I used the get_auth_token.py script to obtain the auth token.
See attached for config:
from collectd-plex.
What happens if you try to telnet 192.168.1.204 32400
from that same box?
from collectd-plex.
# telnet 192.168.1.204 32400
Trying 192.168.1.204...
Connected to 192.168.1.204.
Escape character is '^]'.
Connection closed by foreign host.
from collectd-plex.
Ok, so it's connecting ok. Try running the script directly instead of through CollectD and see if it fails there. It should give better info.
from collectd-plex.
[root@dionysus collectd-plex]# python plex.py --movies 192.168.1.204 32400 *************
{'plugin_instance': u'******Server', 'type_instance': 'movies-1', 'full_name': 'plex-******Server.movies-1.value', 'value': 1779}
from collectd-plex.
Ahah, so that's working fine. Not sure where the connection refused is coming from. Perhaps the script is having trouble connecting to CollectD to deliver metrics?
from collectd-plex.
Looks like SELinux was causing the issues. Running setenforce 0 changed the mode to permissive, which allowed the script to run as expected.
Thank you for all your help -- awesome plugin.
from collectd-plex.
Rock on!
from collectd-plex.
Related Issues (15)
- Implement HTTPS/SSL and Auth support
- Unhandled python exception HOT 5
- PLEX Update sending malformed JSON HOT 6
- `Interval` flag not respected
- Doesn't work with PMS >1.2.5 HOT 3
- Doesn't work with PMS >= 1.3.2.3112 HOT 4
- Support more than media counts
- instance has no attribute 'iter' HOT 1
- Error running on CentOS6/7 HOT 4
- Unhandled python exception in read callback: KeyError: 'Metadata' HOT 1
- Better logging and error handling
- Verify that section/library matches requested media type
- Support multiple metrics in a single "module" configuration
- Support active/inactive session metrics
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from collectd-plex.