How a nerd monitors his wife’s weight

So I got myself a new bodyscale recently. Ofcourse it had to be something of a gadget so I went for this Withings BodyScale. Withings allready has a nice webpage with graphs and stuff and also a couple of really nice iphone/ipad apps for it. The fact that it is integrated with other services like Runkeeper and such, made me think about if they had an API i could query. And it had. Also a quick search for “python withings api” gave some results with examples on how to use it.

I came across this thing : https://github.com/mote/python-withings …and then it was pretty much just about writing a bit of nagios-logic around it to make it into a plugin.

The first result is here: https://github.com/mortis1337/check_wife

The script takes a userid, an apikey and a name as arguments.

$ ./check_wife.py  -u 1111111 -k xxxxxxxxxxxxx -n Your(or your wife’s;)name
WARNING: <yourname>’s overweight. Size: <yoursize> – Weight: <yourweight> BMI: <yourbmi>

The script will give a WARNING whenever the BMI-value is about 25 or below 18,5.

Add this to your nagios-config and your operators can come point and laugh at you whenever a WARNING occurs :)

( yes, the “wife”-part is a joke…. go monitor your own weight;) )

Tags: , , , , , ,

Firefox is slow and crashes… ALL THE TIME!

I’ve recently become more and more and more and more and more and more annoyed with firefox. It is slow, it crashes (several times a day) and it is using ALOT of memory. This is ofcourse because of various plugins I added, but damnit – I need them! So what can you do if the plugins you so desperately need renders the browser itself unusable??? :S

YOU CREATE SEPARATE PROFILES!!!

I dont know why on gods green earth noone told me about this sooner..
You simply just add -P profilename to the firefox cmd. On my ubuntu the firefox launcher button had the following cmd:

“firefox %u”, now it looks like this: “firefox %u -P firebug -no-remote”
In the above example I’m launching the profile I named “firebug”. In this profile I installed firebug, firecookie and the Yslow plugins. The “normal” launcher button has the “-P default” option to launch my “regular” firefox install.

Additional firefox about:config adjustments i made:
1) Adjust the browser pipelining
1a) network.http.pipelining = true
1b) network.http.pipelining.maxrequests = 10
1c) network.http.proxy.pipelining = true
2) Turn off ALL caching
2a) browser.cache.disk.enable = false
2b) browser.cache.memory.enable = false
2c) browser.cache.offline.enable = false
2d) network.http.use-cache = false

Be warned that with all caching turned off, sites that use for instance alot of tiny tiny “see-through” images to adjust their html layout AND using for instance mod-evasive in apache will block your ass for DOS attacking them. (as you will be requesting that little .gif ALOT of times over a very short period of time)

Tags: , , , , , , , , ,

nagios-plugins and check_http version 1.4.12

Yes, it’s broken! I found out today after moving to a new nagios-server. My old http checks did not work, they only resulted in WARNINGS. Seems this is a redirect problem in check_http. It is fixed in the latest version.
I did not have time to go trough all the plugins this evening (friday and all) so I simply downloaded the latest tar.gz pluginpack from nagios.org, extracted it, ran “./configure” and then make all. After that I just moved the check_http from the freshly compiled plugin folder to my nagios plugins folder. Problem solved. 1.4.13 works fine.

Tags: , ,