What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Advanced Python Script SSH problem on probe

Votes:

0

Since last Friday (when we installed the last update of PRTG) we are no longer able to run Advanced Python Sensor on a remote probe. The scripts haven't changed and still work on the local probe, but can't find the winrandom module in Python on the remote probe. All python34 files which are on the local server are present on the probe as well. PRTG Network Monitor 18.4.46.1754 x64

Something must have changed but after seaching for 2 days I haven't been able to find the source of the issue. Installed a new remote probe on a new machine and it has the same issue.

Detailed error is

29/01/2019 14:21:29 Script Output (UTF8 Encoding): Traceback (most recent call last):[CR][LF]  File "C:\Program Files (x86)\PRTG Network Monitor\custom sensors\python\ssh_x5_evolution_b927.py", line 3, in <module>[CR][LF]    import paramiko[CR][LF]  File "C:\Program Files (x86)\PRTG Network Monitor\Python34\lib\site-packages\paramiko\__init__.py", line 30, in <module>[CR][LF]    from paramiko.transport import SecurityOptions, Transport[CR][LF]  File "C:\Program Files (x86)\PRTG Network Monitor\Python34\lib\site-packages\paramiko\transport.py", line 49, in <module>[CR][LF]    from paramiko.dsskey import DSSKey[CR][LF]  File "C:\Program Files (x86)\PRTG Network Monitor\Python34\lib\site-packages\paramiko\dsskey.py", line 26, in <module>[CR][LF]    from Crypto.PublicKey import DSA[CR][LF]  File "C:\Program Files (x86)\PRTG Network Monitor\Python34\lib\site-packages\Crypto\PublicKey\DSA.py", line 89, in <module>[CR][LF]    from Crypto import Random[CR][LF]  File "C:\Program Files (x86)\PRTG Network Monitor\Python34\lib\site-packages\Crypto\Random\__init__.py", line 28, in <module>[CR][LF]    from Crypto.Random import OSRNG[CR][LF]  File "C:\Program Files (x86)\PRTG Network Monitor\Python34\lib\site-packages\Crypto\Random\OSRNG\__init__.py", line 34, in <module>[CR][LF]    from Crypto.Random.OSRNG.nt import new[CR][LF]  File "C:\Program Files (x86)\PRTG Network Monitor\Python34\lib\site-packages\Crypto\Random\OSRNG\nt.py", line 28, in <module>[CR][LF]    import winrandom[CR][LF]ImportError: No module named 'winrandom'[CR][LF]

Tried the standard from . import winrandom and some variations on the nt.py file but no success.

Any ideas would be welcome

Thanks Michaël

import-module python remote-probe

Created on Jan 29, 2019 5:21:02 PM

Last change on Jan 30, 2019 5:15:52 AM by  Sven Roggenhofer [Paessler Technical Support]



8 Replies

Votes:

0

Did you try to install winrandom via pip? You'll need to install it first in PRTGs Python directory:

  1. Download https://bootstrap.pypa.io/get-pip.py into
  2. Execute the following via administrative command line: python get-pip.py

PRTG Scheduler | PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on Jan 30, 2019 7:46:41 AM by  Stephan Linke [Paessler Support]



Votes:

0

Good morning Stephan, Thank you for the fast response. I did try to reinstall winrandom with pip on both machines but that resulted in failure (see below in both cases)

Additionally will PRTG update its python version from 3.4 ?

DEPRECATION: Python 3.4 support has been deprecated. pip 19.1 will be the last one supporting it. Please upgrade your Python as Python 3.4 won't be maintained after March 2019 (cf PEP 429).

Kind regards Michaël

Collecting winrandom
  Using cached https://files.pythonhosted.org/packages/b8/db/b0a2e6b6600c8e00e1cf31e0cd95622283c31a380259dd5e0998201583d0/winrandom-1.2.zip
Building wheels for collected packages: winrandom
  Building wheel for winrandom (setup.py) ... error
  Complete output from command "c:\program files (x86)\prtg network monitor\python34\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\qsecofr
\\AppData\\Local\\Temp\\pip-install-wt2yl0j2\\winrandom\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exe
c(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\qsecofr\AppData\Local\Temp\pip-wheel-0u2ix56p --python-tag cp34:
  running bdist_wheel
  running build
  running build_ext
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "C:\Users\qsecofr\AppData\Local\Temp\pip-install-wt2yl0j2\winrandom\setup.py", line 43, in <module>
      ext_modules=[winrandom1])
    File "c:\program files (x86)\prtg network monitor\python34\lib\distutils\core.py", line 148, in setup
      dist.run_commands()
    File "c:\program files (x86)\prtg network monitor\python34\lib\distutils\dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "c:\program files (x86)\prtg network monitor\python34\lib\distutils\dist.py", line 974, in run_command
      cmd_obj.run()
    File "c:\program files (x86)\prtg network monitor\python34\lib\site-packages\wheel\bdist_wheel.py", line 188, in run
      self.run_command('build')
    File "c:\program files (x86)\prtg network monitor\python34\lib\distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "c:\program files (x86)\prtg network monitor\python34\lib\distutils\dist.py", line 974, in run_command
      cmd_obj.run()
    File "c:\program files (x86)\prtg network monitor\python34\lib\distutils\command\build.py", line 126, in run
      self.run_command(cmd_name)
    File "c:\program files (x86)\prtg network monitor\python34\lib\distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "c:\program files (x86)\prtg network monitor\python34\lib\distutils\dist.py", line 974, in run_command
      cmd_obj.run()
    File "c:\program files (x86)\prtg network monitor\python34\lib\site-packages\setuptools\command\build_ext.py", line 78, in run
      _build_ext.run(self)
    File "c:\program files (x86)\prtg network monitor\python34\lib\distutils\command\build_ext.py", line 308, in run
      force=self.force)
    File "c:\program files (x86)\prtg network monitor\python34\lib\distutils\ccompiler.py", line 1031, in new_compiler
      return klass(None, dry_run, force)
    File "c:\program files (x86)\prtg network monitor\python34\lib\distutils\cygwinccompiler.py", line 282, in __init__
      CygwinCCompiler.__init__ (self, verbose, dry_run, force)
    File "c:\program files (x86)\prtg network monitor\python34\lib\distutils\cygwinccompiler.py", line 126, in __init__
      if self.ld_version >= "2.10.90":
  TypeError: unorderable types: NoneType() >= str()

  ----------------------------------------
  Failed building wheel for winrandom
  Running setup.py clean for winrandom
Failed to build winrandom
Installing collected packages: winrandom
  Running setup.py install for winrandom ... error
    Complete output from command "c:\program files (x86)\prtg network monitor\python34\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\qseco
fr\\AppData\\Local\\Temp\\pip-install-wt2yl0j2\\winrandom\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();e
xec(compile(code, __file__, 'exec'))" install --record C:\Users\qsecofr\AppData\Local\Temp\pip-record-x6hz6sqb\install-record.txt --single-version-externally-ma
naged --compile:
    running install
    running build
    running build_ext
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\qsecofr\AppData\Local\Temp\pip-install-wt2yl0j2\winrandom\setup.py", line 43, in <module>
        ext_modules=[winrandom1])
      File "c:\program files (x86)\prtg network monitor\python34\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "c:\program files (x86)\prtg network monitor\python34\lib\distutils\dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "c:\program files (x86)\prtg network monitor\python34\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "c:\program files (x86)\prtg network monitor\python34\lib\site-packages\setuptools\command\install.py", line 61, in run
        return orig.install.run(self)
      File "c:\program files (x86)\prtg network monitor\python34\lib\distutils\command\install.py", line 539, in run
        self.run_command('build')
      File "c:\program files (x86)\prtg network monitor\python34\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "c:\program files (x86)\prtg network monitor\python34\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "c:\program files (x86)\prtg network monitor\python34\lib\distutils\command\build.py", line 126, in run
        self.run_command(cmd_name)
      File "c:\program files (x86)\prtg network monitor\python34\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "c:\program files (x86)\prtg network monitor\python34\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "c:\program files (x86)\prtg network monitor\python34\lib\site-packages\setuptools\command\build_ext.py", line 78, in run
        _build_ext.run(self)
      File "c:\program files (x86)\prtg network monitor\python34\lib\distutils\command\build_ext.py", line 308, in run
        force=self.force)
      File "c:\program files (x86)\prtg network monitor\python34\lib\distutils\ccompiler.py", line 1031, in new_compiler
        return klass(None, dry_run, force)
      File "c:\program files (x86)\prtg network monitor\python34\lib\distutils\cygwinccompiler.py", line 282, in __init__
        CygwinCCompiler.__init__ (self, verbose, dry_run, force)
      File "c:\program files (x86)\prtg network monitor\python34\lib\distutils\cygwinccompiler.py", line 126, in __init__
        if self.ld_version >= "2.10.90":
    TypeError: unorderable types: NoneType() >= str()

    ----------------------------------------
Command ""c:\program files (x86)\prtg network monitor\python34\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\qsecofr\\AppData\\Local\\Temp
\\pip-install-wt2yl0j2\\winrandom\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file
__, 'exec'))" install --record C:\Users\qsecofr\AppData\Local\Temp\pip-record-x6hz6sqb\install-record.txt --single-version-externally-managed --compile" failed
with error code 1 in C:\Users\qsecofr\AppData\Local\Temp\pip-install-wt2yl0j2\winrandom\

Created on Jan 30, 2019 8:30:26 AM

Last change on Jan 30, 2019 9:10:46 AM by  Stephan Linke [Paessler Support]



Votes:

0

Ah, bummer. We do indeed plan to update it as there's a ticket for it, but this will take quite some time I'm afraid. In the meantime, could you use PowerShell and the EXE/Script (Advanced) Sensors to execute python.exe from a different Python installation? That should actually work. Perhaps the returned result needs to be tailored somewhat.


PRTG Scheduler | PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on Jan 30, 2019 10:53:15 AM by  Stephan Linke [Paessler Support]



Votes:

0

Not exactly the answer I was looking for. Especially that we have been building our application based on the assumption that your platform woudl offer the necessary stability. Back to the drawingboard. :-(^:-(

Created on Jan 30, 2019 10:56:24 AM



Votes:

0

But you could use the very same python script you already developed? You're just executing it "passively" via PowerShell, instead of using a Python Sensor :)


PRTG Scheduler | PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on Jan 30, 2019 12:51:19 PM by  Stephan Linke [Paessler Support]



Votes:

0

True, but I would lose all accumulated data for that sensor ... I need to think about the further implications.

Created on Jan 30, 2019 1:24:04 PM



Votes:

0

Hi,

Can you tell me if this is fixed in the latest PRTG release?

Thanks,

Oren

Created on Dec 18, 2019 7:53:20 AM



Votes:

0

Hi,

Unfortunately it's not fixed yet. However it will get fixed soon in the upcoming version 20.x.55.

Kind Regards,
Timo Dambach
Paessler Tech Support

Created on Dec 18, 2019 1:10:02 PM by  Timo Dambach [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.