Code Monkey home page Code Monkey logo

Comments (11)

rickatnight11 avatar rickatnight11 commented on June 21, 2024

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.

 avatar commented on June 21, 2024

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.

rickatnight11 avatar rickatnight11 commented on June 21, 2024

from collectd-plex.

 avatar commented on June 21, 2024

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:

plugin.txt

from collectd-plex.

rickatnight11 avatar rickatnight11 commented on June 21, 2024

What happens if you try to telnet 192.168.1.204 32400 from that same box?

from collectd-plex.

 avatar commented on June 21, 2024

# 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.

rickatnight11 avatar rickatnight11 commented on June 21, 2024

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.

 avatar commented on June 21, 2024

[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.

rickatnight11 avatar rickatnight11 commented on June 21, 2024

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.

 avatar commented on June 21, 2024

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.

rickatnight11 avatar rickatnight11 commented on June 21, 2024

Rock on!

from collectd-plex.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.