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

mini probe

Votes:

0

Is there any timeframe when the mini probe will support redhat linux?

prtg redhat rhel

Created on Apr 29, 2016 4:27:58 PM



6 Replies

Votes:

0

It's not officially tested, but have you tried it already? As the prerequisites should be available on RHEL as well...

Created on May 2, 2016 10:38:05 AM by  Stephan Linke [Paessler Support]



Votes:

0

So i was able to get the prob installed with Python, but it is not creating the service to start the mini probe. Any suggestions?

Created on May 4, 2016 4:35:52 PM



Votes:

0

Ok, i can get the probe to run on Redhat 6.7. The I will be looking into the issues with the scripts not running correctly.

05/04/2016 12:40:09 - ERROR - Ooops Something went wrong with 'mpprobehealth' sensor 3300. Error: list index out of range
05/04/2016 12:40:09 - ERROR - Ooops Something went wrong with 'mpdiskspace' sensor 3302. Error: list index out of range

Created on May 4, 2016 5:48:59 PM

Last change on May 5, 2016 10:38:10 AM by  Luciano Lingnau [Paessler]



Votes:

0

We'll have to wait until the colleague who wrote the script is available; that will be next Monday :)

Created on May 6, 2016 5:32:44 AM by  Stephan Linke [Paessler Support]



Votes:

0

Hi,

I created an init script for CentOS 6 and have also fixed the problems with the probehealth and diskspace sensors. Here is the init script:

#!/usr/bin/env bash
#
# prtgprobe     PRTG Python Mini Probe
#
# chkconfig: 2345 90 10
### BEGIN INIT INFO
# Provides:          prtgprobe
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: will run the MiniProbe as service
# Description:       This will run the PRTG Python Miniprobe as a service
### END INIT INFO

# Source function library.
. /etc/rc.d/init.d/functions

RETVAL=0

# Change the next 3 lines to suit where you install your script and what you want to call it
DIR=/opt/miniprobe
DAEMON=$DIR/probe.py
DAEMON_NAME=prtgprobe

# This next line determines what user the script runs as.
# Root generally not recommended but necessary if you are using the Raspberry Pi GPIO from Python.
DAEMON_USER=prtgprobe

# The process ID of the script when it runs is stored here:
PIDFILE=/var/run/$DAEMON_NAME.pid

do_start () {
    echo -n "Starting $DAEMON_NAME: "
    sudo -u $DAEMON_USER $DAEMON &
    sleep 1
    ps -ef | grep -v grep | grep probe.py | awk '{print $2}' > $PIDFILE
    RETVAL=$?
    [ $RETVAL -eq 0 ] && echo_success || echo_failure
    echo
    return $RETVAL
}

do_stop () {
    echo -n "Shutting down $DAEMON_NAME:"
    if [ -e $PIDFILE ] ; then
        kill `cat $PIDFILE` >/dev/null 2>&1
        rm -f $PIDFILE
    fi
    RETVAL=$?
    [ $RETVAL -eq 0 ] && echo_success || echo_failure
    echo
    return $RETVAL
}

case "$1" in

    start|stop)
        do_${1}
        ;;

    restart|reload|force-reload)
        do_stop
        do_start
        ;;

    status)
        status -p $PIDFILE "$DAEMON"
        RETVAL=$?
        ;;
    *)
        echo "Usage: /etc/init.d/$DAEMON_NAME {start|stop|restart|status}"
        exit 1
        ;;

esac
exit 0

Here is a patch for diskspace.py:

--- PythonMiniProbe/miniprobe/sensors/diskspace.py 2016-12-02 16:17:17.678956685 +0000 +++ PythonMiniProbe-el6/miniprobe/sensors/diskspace.py 2016-12-02 16:22:50.152923982 +0000 @@ -83,7 +83,7 @@ def read_disk(self): disks = [] channel_list = [] - for line in os.popen("df -k -xtmpfs -xdevtmpfs"): + for line in os.popen("df -k -xtmpfs -xdevtmpfs -P"): if not line.startswith("Filesystem"): disks.append(line.rstrip().split()) for line in disks:

Here is a patch for probehealth.py:

--- PythonMiniProbe/miniprobe/sensors/probehealth.py 2016-12-02 16:17:17.679956697 +0000 +++ PythonMiniProbe-el6/miniprobe/sensors/probehealth.py 2016-12-02 16:27:07.411992291 +0000 @@ -173,8 +173,8 @@ def read_disk(self): disks = [] channel_list = [] - for line in os.popen("df -k"): - if line.startswith("/"): + for line in os.popen("df -k -xtmpfs -xdevtmpfs -P"): + if not line.startswith("Filesystem"): disks.append(line.rstrip().split()) for line in disks: channel1 = {"name": "Total Bytes " + str(line[0]),

I also edited probe.py and miniprobe.py so that I could change the location of the probe.conf and probe.log file.

Hope this helps someone else,

Ben

Created on Dec 2, 2016 4:31:21 PM

Last change on Dec 5, 2016 9:49:00 AM by  Stephan Linke [Paessler Support]



Votes:

0

Very nice, thanks a bunch! :) You may want to push your changes to https://github.com/PaesslerAG/PythonMiniProbe so we can review and integrate it :)

Created on Dec 5, 2016 9:50:38 AM by  Stephan Linke [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.