Oct 012012
 

Overview

Due to some server outages I was looking for a tool that monitors internal and external web application on servers. The outtages were random, ping worked, web access to the installed applications didn’t work. The applications reported no interruptions, so it must be a network related issue. To report something more specific than ‘flaky access’ I wanted to get some more detailed records from my local machine. I looked around, didn’t find a tool at all, looked closer, found nagios, javamelody and other overkills, none of them really fit the purpose. The tool I have chosen is uptime.

The Tool: Uptime

Perfect little tool, after installation it requires to be started and then it works. I just added the sites I wanted to monitor. The best description of how to install and use it is this video: http://vimeo.com/39302164 If you run into issues, see below.

Installation

I ran into a couple of issues during installation:

  • I hadn’t npm installed
  • I had a version boost installed too new for mongodb. I had to downgrade it first, details here.
  • Mac Ports fails to compile if the port shall be installed from a volume that contains spaces (Macintosh HD 2 fails as install resource, Macintosh HD doesn’t)

Finally I installed it to my mac environment, below the (cleaned up) commands:

 

#downgrade boost

 cd /tmp

svn co  -r 93341 http://svn.macports.org/repository/macports/trunk/dports/devel/boost/’

cd boost

sudo port install

sudo port activate boost @1.49.0_0

 

#install and start mongodb

sudo port install mongodb

sudo port load mongodb

 

#install npm

sudo port install npm

 

#get uptime

cd ~/repo/github

git clone git://github.com/fzaninotto/uptime.git

npm install

node app.js

Monitors

So far I added all desired machines for monitoring, interval is set to 15s.

    As reference I also added google to exclude events if my line isn’t working.

      Popularity: 6% [?]

      Tags: , , , ,
      Aug 162012
       

      Following up my previous post I also want to see the contents of any text file in preview without opening an editor.

      I found this page with lots of quicklook plugins: QLPlugins.com. One of the plugins there is QLStephen. Download it, mount it, then open Terminal and run:

       

      sudo cp -R /Volumes/QLStephen_1/QLStephen.qlgenerator /Library/QuickLook/

      qlmanage -r

       

      Result: Manifest.MF is now previewed in Finder and I don’t need to open a text editor anymore.

      Popularity: 7% [?]

      Tags: , , , , ,
      Jun 282012
       

      A small, handy way to find stuff easily via commandline in a set fo files:

      grep -inHR “search term” –include=’*.xml’ *

      • i ignore-case
      • n line number
      • H Print the filename for each match
      • R  –include=<Pattern> Recurse in directories only searching file matching <Pattern>
      • * The preceding item will be matched zero or more times.

      in all sub folders in a given folder all files that end with xml and contain search term are listed in the output with name and the matching line including the line number.

      I used to use file search in ultraedit, however my license expired and ultraedit on mac is not quite as powerful as its Windows equivalent so I didn’t bother to renew. Grep is my new best friend. 

      Update: sweet example:

      grep -inRH “4.7.0″ –include=’*pom.xml’ * -B2

      is looking in pom files that contain the given string and prints out 2 lines before.

      Popularity: 2% [?]

      Tags: , , ,
      Apr 302011
       

      Ages ago I registered with Dropbox which is pretty cool for sharing and storing files online, I love the seamless file system integration, and if you consider storing confidential data there you might want to encrypt your stuff with truecrypt, if you need instructions see here for details. However, my available dropbox space is less than 5GB as I am on the free plan only, a few recommendations, the dropbox quests and some ohter tasks helped me to get there. To get 20GB or more I would need to go for a commercial plan, which I don’t want to do for now. 

      To be able to back up and share documents and pictures online I was looking for a more space, and came across Wuala. It’s the same idea of cloud storage, just the way how to manage and sync the data is different, basically a fat client is required. So I miss the file system integration, and I don’t like that the client crashes/freezes when I am offline but within a very short period I earned already 20GB of space (thanks to a few referrals and Caschy’s list of Promo Codes [german]). So I am giving it a try as it works for what I want right now. Especiall as Wuala for Android got just released.

      An overview over current sync services and their features you find in wikipedia, if you look for a summary click here [german].

      Popularity: 3% [?]

      Tags: , ,
      Apr 272011
       

      I was not happy about to realize that one of the last Apple updates updated maven to version 3. Maven in it’s new version does brake quite a few concepts which were in version 2, and maven does not go for downwards compatibility.

      I had no issues with simple builds, but when I had a multi-module project which requires jars to be installed in the repository maven 3 just started throwing exceptions at me. As my clients still are on maven 2.0+ I was looking for a solution how to downgrade it.

      It actually is fairly simple as the update adds a new maven version and modifies the default executable but it doesn’t uninstall previous versions. These steps will give you back what was yours before:

      $ cd /usr/share/java
      $ ls -q1 | grep maven
      #check if your desired maven version is there
      apache-maven-2.0.9
      maven-2.2.0
      maven-2.2.1
      maven-3.0.2

      $ cd .. #go up
      $ ls -l | grep maven
      #check what current version is
      maven -> java/maven-3.0.2
      $ sudo rm maven #remove unwanted symlink
      Password:
      $ sudo ln -s java/maven-2.2.1 maven #set it to maven 2.2.1

      That’s it. To test out if it runs or not just reopen Terminal and enter mvn -version and it will be now version 2.2.1 :)

      Popularity: 54% [?]

      Tags: , , , ,