Setup Scout Realtime on Ubuntu

I love server monitoring. It’s something I’ve always liked. When I discovered top in about 1998 on Slackware Linux, I fell in love.

Top is old, though. Scout Realtime isn’t.

Scout Realtime is built with Ruby and can be installed as a Ruby gem. Make sure you’ve got rubygems installed. If it’s not installed, then install it.

Scout Realtime doesn’t work with Ruby 1.8, it requires Ruby 1.9. Installing Ruby 1.9 is pretty easy and is explained in detail in this post.

Install Scout Realtime

This has been tested on Ubuntu 13.10 on a DigitalOcean VPS.

Now you can install Scout Realtime:
sudo gem install scout_realtime

After it’s been installed, launch it! You can run it as root or as your normal user. If you want to run it as root, just add sudo before the scout_realtime command below.
scout_realtime

That’ll start Scout Realtime on it’s default listening port, which is 5555. If you’d like it to run on a different port, run scout_realtime --help to see how to go about that.

Access Scout Realtime

There’s a couple ways that you can access Scout Realtime in your browser.

The quickest and safest way is to setup a SSH tunnel. This is how Scout shows Realtime being setup.
ssh -NL 5555:localhost:5555 user@ip_or_hostname

Replace user@ip_or_hostname with your SSH user and hostname.

Once the SSH tunnel is setup and running, open up your web browser and navigate to http://localhost:5555. You should see Scout Realtime, it’ll look similar to the screenshot that’s attached to this post.

You can also open a firewall port, allowing access to port 5555, or whatever port you’ve got Scout Realtime running on. Doing this will provide you with persistent access to Scout Realtime. Just navigate to your IP address or domain on the relevant port.

That’s it! Scout Realtime should now be running on your server, and you’ve got a couple of different options for accessing Scout Realtime.

For more on Scout Realtime, visit the site or view the source code on GitHub.

0

Changing Domains, .org to .io

Maybe Google won’t hate me anymore

A bunch of scummy sites are using some of my old WordPress themes. The themes have links to longren.org in the footer, I think Google hates me for it, I dunno though. It started about 3 years ago. When all was good, organic search referrals from Google were around 15,000 unique visitors per month.

Now, however, the story is much different. In all, Google is throwing me about 800 unique visitors a month from organic search. I believe it has something to do with all of the incoming links to longren.org from low quality websites. I really have no idea though and am not about to hire some SEO company to fix it up or take the time to disavow hundreds of thousands of links.

I’ve got longren.org forwarding to longren.io now, but will eventually turn that off and just start from scratch, I guess. Unless Google can help, but that’s not probably likely.

Oh well. Only change will be the new .io TLD. It’ll be nice having a new domain, even though I’ll keep the old one around forever most likely.

Doing the forwarding so longren.org/work-with-me/ will end up at longren.io/work-with-me/ with 301 redirects all around. This is all that was needed in the .htaccess file.

Redirect 301 / http://longren.io/
0

Record Speedtest.net Results From the Command Line

For those who live in the command line as much as possible

Install speedtest-cli

speedtest-cli is a Python app that provides a command line interface for testing bandwidth using speedtest.net. Installation is simple. It should work on Linux and OS X.

The Bash Scripts

There’s two scripts, speedtest.sh and speedtest-simple.sh. Pretty self-explanatory. Results from speedtest.sh are stored in st_results in the current working directory. speedtest-simple.sh results are stored in st_results_simple, also in the current working directory.

speedtest.sh Results

Below are the results of two speedtests run with speedtest.sh, along with the sharing image URL.

Retrieving speedtest.net configuration…
Retrieving speedtest.net server list…
Testing from Mediacom Communications (173.22.40.33)…
Selecting best server based on ping…
Hosted by CHRJO (Council Bluffs, IA) [204.50 km]: 20.981 ms
Testing download speed………………………………….
Download: 32.44 Mbit/s
Testing upload speed…………………………………………..
Upload: 5.57 Mbit/s
Share results: http://www.speedtest.net/result/3335225265.png .
#############

Retrieving speedtest.net configuration…
Retrieving speedtest.net server list…
Testing from Mediacom Communications (173.22.40.33)…
Selecting best server based on ping…
Hosted by American Broadband (Blair, NE) [213.79 km]: 20.981 ms
Testing download speed………………………………….
Download: 33.03 Mbit/s
Testing upload speed…………………………………………..
Upload: 5.49 Mbit/s
Share results: http://www.speedtest.net/result/3335230578.png .
#############

You can get less verbose output by modifying the speedtest-cli flags. speedtest-cli --simple --share will produce very simple results that are a bit easier to read. Two tests with the speedtest-simple.sh script are below. Note the absolute crap speeds. Wonderful hotel wi-fi, hah!

speedtest-simple.sh Results

Ping: 13.351 ms
Download: 1.92 Mbit/s
Upload: 0.94 Mbit/s
Share results: http://www.speedtest.net/result/3342143070.png .
#############

Ping: 13.431 ms
Download: 1.80 Mbit/s
Upload: 0.93 Mbit/s
Share results: http://www.speedtest.net/result/3342149985.png .
#############

It’s a very, very simple way of logging the speedtest.net results, but it’ll do for most situations. When I get some free time this week, I’m going to combine speedtest.sh and speedtest-simple.sh and make it accept a --simple argument to generate the simple log.

After that’s done, I’ll be dropping the results into a SQLite database. I’ve gotten pretty familiar with SQLite lately, so it shouldn’t be too difficult.

Once this stuff is logging to a SQLite databse, I’ll put it up on GitHub, I can’t be the only one who would love to run SQL queries against this sort of personalized bandwidth data.

Update April 19, 2014: Updated the code in the GitHub Gist to include the date and time of the speedtest.

1+

Mist.io for DigitalOcean, and Every Other Cloud Provider, Is Awesome

Control all the things!

I love mist.io. However, I’ll stick with DigitalOcean Swimmer (Android only) for now. There’s even a few good looking iOS apps, but I haven’t tested them, Droplets for DigitalOcean and DigitalOcean Manager. Hopefully, paying for monitoring as well is something I can justify in a few months, when I have a steady job or am getting along with freelancing, which is really what I’d like.

But anyway, mist.io is a really nice service, but the website could use an update. It almost has a standard jQuery mobile feel to it. However, I do know they’re working on some UI changes that should be a vast improvement. But aside from that, the functionality is itself great. You can do the usual, like create new droplets, edit droplets, and you can add multiple backends.

Backends in mist.io are just connections to hosts, like DigitalOcean or Linode. They support a lot of backends, like RackSpace, OpenStack, AWS, HP Cloud, NephoScale, and even bare metal.

The DigitalOcean Swimmer Android app has a great interface, too. It seems to mostly abide by the Android style guide, which is freaking awesome. There’s a little gallery at the end with some screenshots of it as well as the mist.io website.

I love all the apps that support DigitalOcean (referral link), it’s partly why it’s so appealing to me. I really like mist.io because it supports sooo many providers though. The mist.io site looks good on a mobile device, but could still use some updating, which I’d be surprised if they weren’t already working on.

When I do add another different hosting provider (probably Linode), I’ll happily pay for the mist.io service. A real, native Android and even iOS client would be killer, please mist.io? :)

Photos below are of the mist.io site and a couple screenshots from the DigitalOcean Swimmer Android app. For iOS screenshots, see here and here.

Have you used mist.io prior to reading this post?

View Results

Loading ... Loading ...

At the very least you should give mist.io a try. All of the management features are free, like SSH key management, spinning up machines, and image managemenet. Monitoring is the only thing that is paid. So, you can get some really good use out of mist.io totally free!

0

Everything to DigitalOcean

Moving everything, and saving money while doing so

In May of 2013 I move a bunch of websites from Dreamhost (it’s a referral link) over to FlipHost. Since discovering DigitalOcean (it’s a referral reward link), I’ve been slowly moving most of my hosting over to them.

I wasn’t at all uphappy with the service provided by FlipHost. In fact, their support was excellent and I had come to know the owner quite well. They’re all really great people. However, PuPHPet and DigitalOcean are impossible for me to resist any longer.

The ability to spin up droplets at will is amazing and the API makes building simple, custom control panels very simple. Even though their dash board is already pretty visually appealing.
DigitalOcean Dashboard

I do still have a few sites for friends and family hosted at Dreamhost (also a referral reward link), but I’ll be moving them over to small DigitalOcean droplets within the coming weeks. One VPS at FlipHost has been canceled already and the other has been shutdown for the past 24 hours now, so I’ll be canceling it soon too.

Everything else has been moved to DigitalOcean for some time, including longren.org. The same droplet also servers kegplan.io, but it’ll be getting it’s own droplet very shortly. And then I have a droplet that’s sole purpose is to act as a tor node.

By moving everything to DigitalOcean, I’ll be saving about $30 a month on hosting. I’m currently spending about $60 to $70 a month on hosting.

Do you use DigitalOcean for anything?

View Results

Loading ... Loading ...

In addition to the great service provided by DigitalOcean, they have a pretty neat mascot, he looks good on t-shirts, too.
DigitalOcean Fish/Shark

DigitalOcean has been great so far, especially their customer service and general availability. I love their one-click application installs, too, which makes installing software like WordPress super simple. I have yet to have any issues with DigitalOcean

DigitalOcean droplets start at only $5/month. If you’d like to try it out, you can signup using my referral link, https://www.digitalocean.com/?refcode=cbf49d0481c8, which will give me account credit. You should also keep an eye on the DigitalOcean Twitter account, as they frequently give discount codes that can get you a couple months of free hosting.

If you’re in the market for a new webhost, definitely give DigitalOcean a shot. Beware though, as with nearly everything, there’s negatives as well. Raam Dev posted a comment warning about how a DigitalOcean site was taken down due to a post on the site that was critical of a friend of the DigitalOcean CEO. There’s plenty of other not-so-good experiences with DigitalOcean, too. Luckily, my ride with DigitalOcean has been totally smooth.

0