Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions 5 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ Installation for this branch
- Install pip as outlined here https://pip.pypa.io/en/latest/installing.html (pre Python 2.7.9)
- Download either zip or clone repository
- run command 'sudo python setup.py install' which will install all necessary packages
- run command 'sudo python setup.py configure' which will start the configuration

Current Status: BETA
MiniProbe POC for PRTG Network Monitor written in Python which accesses the MiniProbe Interface on the PRTG Core Server.
Expand All @@ -21,7 +20,7 @@ Prerequisites
-----------------
Debian based system (tested on Ubuntu, Debian, Raspbian)
Python 2.7+
Needed modules are delivered with the probe package:
Needed modules are installed using the setup.py install phase:
- pyasn1 (https://pypi.python.org/pypi/pyasn1/0.1.7)
- pysnmp (https://pypi.python.org/pypi/pysnmp/4.2.5)
- requests (https://pypi.python.org/pypi/requests/2.5.3)
Expand All @@ -34,7 +33,7 @@ Installation
- make sure you can reach the PRTG web interface from the machine the mini probe should run on (e.g. wget https://YOUR_PRTG_SERVER)
- This is tested during the setup
- copy the miniprobe folder to your linux machine
- run the probe installer (e.g. "python probe_installer.py")
- run the probe installer (e.g. "sudo python setup.py install")

The miniprobe should now be started. You should also be able to start/stop the same using the command

Expand Down
2 changes: 1 addition & 1 deletion 2 install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ case "$(python --version 2>&1)" in
esac

if [ ! -f ./README.md ]
then
read -p "Use git to install the miniprobe (y|n)? " -n 1 -r
echo # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]
Expand Down Expand Up @@ -52,5 +53,4 @@ if [ "$DOWNLOADED" = true ]
then
echo "Starting to install the miniprobe and requirements"
python setup.py install
python setup.py configure
fi
12 changes: 5 additions & 7 deletions 12 setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,20 @@
import uuid

from setuptools import setup, find_packages
from setuptools.command import install as _install

from setuptools.command.install import install as _install

def read(path):
with open(path, 'r') as f:
return f.read()


class bcolor:
GREEN = '\033[92m'
RED = '\033[91m'
YELLOW = '\033[93m'
CYAN = '\033[96m'
END = '\033[0m'

class Configure(_install.install):
class Configure(_install):
probe_conf = {}
config_old = {}
config_old['name'] = "Python MiniProbe"
Expand All @@ -61,6 +59,7 @@ def run(self):
print bcolor.RED + "You must run me as root user!" + bcolor.END
print bcolor.RED + "Rerun me with sudo " + __file__ + bcolor.END
sys.exit(2)
_install.do_egg_install(self)
print ""
print bcolor.CYAN + "Welcome to the Miniprobe (Python) for PRTG installer" + bcolor.END
if self.file_check(self.path):
Expand All @@ -87,6 +86,7 @@ def run(self):
else:
print "Exiting!"
sys.exit()
pass

def file_check(self, check_path):
# Check if a give file exists
Expand Down Expand Up @@ -333,8 +333,6 @@ def get_config(self, config_old):
print ""
print bcolor.YELLOW + "Checking for necessary modules and Python Version" + bcolor.END
try:
sys.path.append('./')
sys.path.append('./miniprobe')
import hashlib
import string
import json
Expand Down Expand Up @@ -428,7 +426,7 @@ def remove_config(self):
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
],
cmdclass={'configure': Configure}
cmdclass={'install': Configure}
)


Morty Proxy This is a proxified and sanitized view of the page, visit original site.