-
Notifications
You must be signed in to change notification settings - Fork 50
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
Improving sensor "apt" #35
Comments
Or even better change the locale for the runtime: LC_ALL=C apt-get upgrade -s http://unix.stackexchange.com/questions/87745/what-does-lc-all-c-do |
Hi, ret = os.popen("apt-get -s dist-upgrade | grep 'newly inst'") to if locale == "en_GB.UTF-8" or "'en_US.UTF-8'": This fix will go to the development branch soon. I'm planning to do this by checking the locale rather than changing it. |
Hi Konstantin, i hope you had a good time! Thank you for the implementation of a solution. We are planning to add a new sensor for softwareraidchecks (mdadm) to a fork and send you a pull request in the next day. Hope you can have a look on it. |
Hey, |
Proposed change is available in this branch. Could you check if this works for your, if ok I'm going to merge this to development. |
Hi Konstantin, we tested the changes (apt sensor and mdadm) from the dev_apt_sensor-branch and it works like a charm. Thank you! |
Nice, I'm glad it's working now. So I'll close this issue for now. |
Hello,
thank you for providing the PythonMiniProbe! Its really helpfull for us to monitor linux-systems with PRTG. Keep up the great work!
We want to use the "apt"-sensor on systems with the default language "german" but this wont work.
The reason is, that the sensor "apt" uses "apt-get -s dist-upgrade | grep 'newly inst'" to determine the line with all information about available updates - in other language "newly installed" is simply translated to the setted language.
Maybe - as easy way for the beginning - you should just use "locale" to check the current setted language and throw an error? Or just search for the line "* upgraded, * newly installed, * to remove and * not upgraded." - whent this line is not in the output the sensor should fail.
At the moment the sensor shows no error - for a security relevant sensor not the best output when not working ;-)
What do you think?
The text was updated successfully, but these errors were encountered: