Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disk Space and External IP sensors failed #52

Open
sardjono opened this issue Jul 3, 2016 · 14 comments
Open

Disk Space and External IP sensors failed #52

sardjono opened this issue Jul 3, 2016 · 14 comments

Comments

@sardjono
Copy link

sardjono commented Jul 3, 2016

PythonMiniProbe installed on Ubuntu 14.04LTS.Installation went smoothly.

The following sensors are working: CPU Load, Memory, Probe Health.
The following sensors failed: DIsk Space, External IP

Debug log shows the following:

07/03/2016 20:34:57 - INFO - Starting new HTTPS connection (1): 192.168.1.121
07/03/2016 20:34:57 - INFO - tasks request successfully sent to PRTG Core Server at 192.168.1.121:443.
07/03/2016 20:34:57 - DEBUG - Connecting to 192.168.1.121:443
07/03/2016 20:34:57 - DEBUG - Status Code: 200 | Message: [{"sensorid":"2016","kind":"mpcpuload","host":"127.0.0.1"},{"sensorid":"2017","kind":"mpmemory","host":"127.0.0.1"},{"sensorid":"2018","kind":"mpdiskspace","host":"127.0.0.1"},{"sensorid":"2019","maxtemp":"45","kind":"mpprobehealth","host":"127.0.0.1","celfar":"C"},{"sensorid":"2020","kind":"mpexternalip","host":"127.0.0.1"}]
07/03/2016 20:34:57 - INFO - Task success.
07/03/2016 20:34:57 - DEBUG - Task success. HTTP Status 200, Message: [{"sensorid":"2016","kind":"mpcpuload","host":"127.0.0.1"},{"sensorid":"2017","kind":"mpmemory","host":"127.0.0.1"},{"sensorid":"2018","kind":"mpdiskspace","host":"127.0.0.1"},{"sensorid":"2019","maxtemp":"45","kind":"mpprobehealth","host":"127.0.0.1","celfar":"C"},{"sensorid":"2020","kind":"mpexternalip","host":"127.0.0.1"}]
07/03/2016 20:34:57 - DEBUG - JSON response: [{u'sensorid': u'2016', u'kind': u'mpcpuload', u'host': u'127.0.0.1'}, {u'sensorid': u'2017', u'kind': u'mpmemory', u'host': u'127.0.0.1'}, {u'sensorid': u'2018', u'kind': u'mpdiskspace', u'host': u'127.0.0.1'}, {u'sensorid': u'2019', u'kind': u'mpprobehealth', u'maxtemp': u'45', u'host': u'127.0.0.1', u'celfar': u'C'}, {u'sensorid': u'2020', u'kind': u'mpexternalip', u'host': u'127.0.0.1'}]
07/03/2016 20:34:57 - DEBUG - {u'sensorid': u'2016', u'kind': u'mpcpuload', u'host': u'127.0.0.1'}
07/03/2016 20:34:57 - DEBUG - Spawning sensor mpcpuload.
07/03/2016 20:34:57 - DEBUG - Running sensor: mpcpuload
07/03/2016 20:34:57 - DEBUG - {u'sensorid': u'2017', u'kind': u'mpmemory', u'host': u'127.0.0.1'}
07/03/2016 20:34:57 - DEBUG - Spawning sensor mpmemory.
07/03/2016 20:34:57 - DEBUG - Running sensor: mpmemory
07/03/2016 20:34:57 - DEBUG - {u'sensorid': u'2018', u'kind': u'mpdiskspace', u'host': u'127.0.0.1'}
07/03/2016 20:34:57 - DEBUG - Spawning sensor mpdiskspace.
07/03/2016 20:34:57 - ERROR - Ooops Something went wrong with 'mpdiskspace' sensor 2018. Error: invalid literal for int() with base 10: 'TB'
07/03/2016 20:34:57 - DEBUG - {u'sensorid': u'2019', u'kind': u'mpprobehealth', u'maxtemp': u'45', u'host': u'127.0.0.1', u'celfar': u'C'}
07/03/2016 20:34:57 - DEBUG - Spawning sensor mpprobehealth.
07/03/2016 20:34:57 - DEBUG - Current Health: 100 percent
07/03/2016 20:34:57 - DEBUG - Running sensor: mpprobehealth
07/03/2016 20:34:57 - DEBUG - {u'sensorid': u'2020', u'kind': u'mpexternalip', u'host': u'127.0.0.1'}
07/03/2016 20:34:57 - DEBUG - Spawning sensor mpexternalip.
07/03/2016 20:34:57 - DEBUG - Running sensor: mpexternalip
07/03/2016 20:34:57 - DEBUG - IP-Address: [{'kind': 'Custom', 'name': 'IP-Address', 'ShowTable': 0, 'ShowChart': 0, 'value': 1, 'customunit': '', 'mode': 'integer'}]
07/03/2016 20:34:57 - ERROR - Ooops Something went wrong with 'mpexternalip' sensor 2020. Error: [Errno 19] No such device
07/03/2016 20:34:57 - INFO - Starting new HTTPS connection (1): 192.168.1.121
07/03/2016 20:34:57 - INFO - data request successfully sent to PRTG Core Server at 192.168.1.121:443.
07/03/2016 20:34:57 - DEBUG - Connecting to 192.168.1.121:443
07/03/2016 20:34:57 - DEBUG - Status Code: 200 | Message: Done
07/03/2016 20:34:57 - INFO - Data success.
07/03/2016 20:34:57 - DEBUG - Data success. Details: HTTP Status 200, Message: Done

@Goro2030
Copy link

externalip.py is not working because it's quering http://icanhasip.com/ that is no longer available. It has to be changed to another service and recompiled. Anyone, suggestions?

@tabascoterrier
Copy link

https://www.ipify.org/ is a favourite of mine - no limits and either text, json, or jsonp output

@Goro2030
Copy link

@tabascoterrier , can you adapt the code and push it so we can use the probe again??

@tabascoterrier
Copy link

@Goro2030 Looking at the externalip.py code, while the sensor description says http://icanhasip.com (with an 's'), the actual check is done against http://icanhazip.com (with a 'z'), which seems to be working - so it looks like the problem lies elsewhere.

I see that externalip.py has a hard coded 'eth0' for it's local IP address check, so that might well be the cause of the Error: [Errno 19] No such device in the original issue if there's no eth0 device available.

Is that the same error that you're getting?

@tabascoterrier
Copy link

Looking further, that does indeed seem to be the problem - I've created pull request #57 with a fix.

@Goro2030
Copy link

Thanks @tabascoterrier ... will check now and let you know if this worked to close this issue

@Goro2030
Copy link

I see that you've merged, but it's not in the main repository yet? I've reinstalled the probe using the install.sh, and it downloaded the old version :(

@tabascoterrier
Copy link

Someone from PRTG will have to merge my pull request into the main repository I'm afraid @Goro2030 - I'm just a customer 😃 In the meantime, if you replace the miniprobe/sensors/externalip.py file on your probe with this one and restart the mini probe service, that'll give you the fix.

@Goro2030
Copy link

Goro2030 commented May 31, 2018

Thanks @tabascoterrier ! Let's wait for the merge then ... I did replace the externalip.py file in the /miniprobe/sensors folder, but it still doesn't work. Don't I need to "recompile" it somehow? I've run python setup.py configure, and python setup.py install to no avail...

EDIT: It worked now!!! Just had to wait :)

@Goro2030
Copy link

Since you seem to be an awesome expert on PRTG ... let me ask you a follow up question on this probe. Now that I've got the externalIP that I was looking for, can I create another monitor that will look for, let's say, PING to this external IP?

@tabascoterrier
Copy link

Good to hear that worked for you @Goro2030 :)

Hmm, I can't immediately think of a way of pinging the address that sensor returns I'm afraid. If you were just after down notifications, you could set a notification on the miniprobe sensor. If you were after response times and things, perhaps you could use a dynamic DNS service like noip.com, get whatever is running the miniprobe to update that, and then ping the DNS name from the regular PRTG probe instead? The DNS name would always reflect the current IP then.

@Goro2030
Copy link

Goro2030 commented Jun 1, 2018 via email

@tabascoterrier
Copy link

If it were me doing it, I'd get something like a no-ip client running on the box running the miniprobe, and then just monitor the no-ip hostname - there are instructions here, but I'm afraid I won't be able to help you with it; if you run into any problems you could always try asking on superuser.com though :)

@Goro2030
Copy link

Goro2030 commented Jun 5, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@tabascoterrier @sardjono @Goro2030 and others