Local Graphite installation on CentOS 5.5 howto

Feature request Our client called:- “I want something to monitor my application!”- “Ok, let’s use JMX, we have plenty of stats exposed there already.”- “Fine, but I want something fancy!”- “Ok, let’s install Graphite, take a look at screenshots!”- “Exc…

Feature request

Our client called:
– “I want something to monitor my application!”
– “Ok, let’s use JMX, we have plenty of stats exposed there already.”
– “Fine, but I want something fancy!”
– “Ok, let’s install Graphite, take a look at screenshots!”
– “Excellent! Use our testing CentOS machine for this.”
– “Ok, erm… wait, nooooo! We have no root access there, there is no internet access and we can’t install anything!!!”
– “(hangup click)”

Setup

There I was, standing alone, looking for help…

My scenario: * no internet access * only user account, no root account * gcc and make installed * some libraries missing * no development packages for installed libraries

    My goals:

  • install libraries to $HOME
  • install Graphite and stuff to $HOME/graphite

Solution

It took me a few days, but I’ve managed to install Graphite locally. Here is a gist for a sake of documentation and for others that may need it.

<a href="https://gist.github.com/SpOOnman/5957589">https://gist.github.com/SpOOnman/5957589</a>
You May Also Like

New HTTP Logger Grails plugin

I've wrote a new Grails plugin - httplogger. It logs:

  • request information (url, headers, cookies, method, body),
  • grails dispatch information (controller, action, parameters),
  • response information (elapsed time and body).

It is mostly useful for logging your REST traffic. Full HTTP web pages can be huge to log and generally waste your space. I suggest to map all of your REST controllers with the same path in UrlMappings, e.g. /rest/ and configure this plugin with this path.

Here is some simple output just to give you a taste of it.

17:16:00,331 INFO  filters.LogRawRequestInfoFilter  - 17:16:00,340 INFO  filters.LogRawRequestInfoFilter  - 17:16:00,342 INFO  filters.LogGrailsUrlsInfoFilter  - 17:16:00,731 INFO  filters.LogOutputResponseFilter  - >> #1 returned 200, took 405 ms.
17:16:00,745 INFO filters.LogOutputResponseFilter - >> #1 responded with '{count:0}'
17:18:55,799 INFO  filters.LogRawRequestInfoFilter  - 17:18:55,799 INFO  filters.LogRawRequestInfoFilter  - 17:18:55,800 INFO  filters.LogRawRequestInfoFilter  - 17:18:55,801 INFO  filters.LogOutputResponseFilter  - >> #2 returned 404, took 3 ms.
17:18:55,802 INFO filters.LogOutputResponseFilter - >> #2 responded with ''

Official plugin information can be found on Grails plugins website here: http://grails.org/plugins/httplogger or you can browse code on github: TouK/grails-httplogger.

Enums for scala

Scala has very limited implementation of Enumeration. Enumerated objects can't extends other classes. Partial replacement for it is to use sealed classes. You can do pattern matching on them. When you ommit some possible value you will get compiler wa...