Bookmarks for June 13th from 07:34 to 11:07

Interesting links for June 13th from 07:34 to 11:07:

Bookmarks for June 13th from 04:52 to 04:52

Interesting links for June 13th from 04:52 to 04:52:

Bookmarks for June 11th from 11:13 to 14:00

Interesting links for June 11th from 11:13 to 14:00:

Bookmarks for May 8th through June 11th

Interesting links for May 8th through June 11th:

Bookmarks for April 23rd through April 30th

Interesting links for April 23rd through April 30th:

  • OpenNMS User conference presentations – The first OpenNMS User Conference was held in Frankfurt/Main, 14th March 2009.
  • Storage made easy with S3 – Amazon Simple Storage Service (S3) is a publicly available service that Web application developers can use for storing digital assets such as images, video, music, and documents. S3 provides a RESTful API for interacting with the service programmatically. Learn how to use the open source JetS3t library to leverage Amazon's S3 cloud service for storing and retrieving data.
  • Perf4J 0.9.9 – Developer Guide – This guide describes how to incorporate Perf4J timing statements into your code, and how to use and enable various Perf4J tools to analyze and visualize the generated performance data.

A perfect day ..

Yesterday was a perfect day. When one of these days come around, it’s important to take notice.
Weather was great in Geneva. A sunny spring day, with blue skies, yet not hot. We’ve started the day with long due yard work, and by noon having made good progress we’ve decided to have a picnic by the lake. The village we live in, Mies, has a public park by the lake only minutes from our house. It’s a perfect spot for a picnic, and we had it practically for ourselves.

I watched my mom, aka “Babanne” (means Grandmother in Turkish), and my 3 year old daughter, Maya, throw rocks into the lake. The joy radiating from their faces alone was enough to make my day.
As I sat there, watching still snow covered Alps across Lake Geneva and chatting with my wife about life, I felt as happy as a man can be. We’ve realized that I was with three most important females of my life in a somewhat unique time frame in our lives. We are all healthy which is so crucial yet we often don’t realize its importance till we’re not.
My mom is aging but she is still very active. Full of energy, more so than I am. Looking at her, I sometimes wonder how is it possible for me to be so lazy :) Our relationship is as strong as ever.
My daughter is 3, she is as sweet and as cute as a child can be. She’s growing fast, incredibly fast, makes me look for pause button, but none is available. My wife and I contemplate whether we’ll miss these days as she hit teen years and start hating us as many of our friends warn us that it will come to be :)
And my wife sitting next to me, lovely as ever. As we push towards 40 (6 months away for me), it doesn’t escape from us that we’re no longer young, especially when we meet people who weren’t even born when we were in college. Yet we also know that we’re not “old” either. We’re healthy and nothing is holding us back.

So a perfect day it was. I’ve tried to hang on to it as much as I could, and pushed thoughts of what future may have in store for us as far as possible. Next sixth months will have a lot of turmoil for us, no sense in worrying about it all that in such a bright day ..

Bookmarks for April 8th through April 14th

Interesting links for April 8th through April 14th:

  • Exporting POJO via JMX and Groovy – good article on how to use groovy and jmxbuilder to expose objects for monitoring via JMX
  • Practically Groovy: Reaching for each – great article on .each method provided in groovy and more!
  • 4 Easy Ways to do Java Garbage Collection Tuning – The number of flags that someone can change on the Sun Java Virtual Machine (JVM) is astounding. Most of them are garbage collection (GC)-related and have many dependencies, not only on the system you are using but also to each other. Tuning GC flags seems like it should be difficult and error-prone, but following a few easy steps can help improve application performance in only a few minutes

Bookmarks for April 3rd through April 7th

Interesting links for April 3rd through April 7th:

  • Xpenser – Mobile Expense Tracking and Management
  • Search At the Front and Center of IT Operations Management | iFountain.com – Google revolution is spreading, search is becoming the primary mechanism to interact with information replacing hierarchies.
    There is ever increasing amount of IT management data and that is locked inside various IT management tools. Users have to know where the data is and traverse through however the data is organized in the particular tool. Something better is needed and search paradigm seems to fit,.

    Search is at the heart of RapidInsight, our IT Operations Management solution. RapidInsight has a built-in modeling engine to model the IT environment (classes, properties, relations, operations, etc.) and a search engine (Compass/Lucene) as the data store. The combination of object based modeling and search engine provides a powerful platform for IT operations management solutions.

  • The Forrester Blog For IT Infrastructure & Operations Professionals – *** ITIL v3 CMS has the right approach. No monolithic CMDB but a CMS (configuration management system) that incorporates many management data repositories (MDRs). This can be done right now without CMDBf support from vendors that may or may not arrive a year down the line. This is the exact philosophy driving RapidInsight project

Getting Groovy, Processing XML, sending SNMP traps and RapidInsight

A while ago Doug asked whether anyone knew a utility to read XML and send SNMP traps. I mentioned that it would be easy to do with Groovy but did not have time to give any details. I’ve been meaning to write a post about how we use Groovy in RapidInsight and thought this would be a good excercise.

First I have state once again that I’m not a developer nor play one on Youtube. I can however, put together scripts, especially if there are examples, but writing java code is not my cup of tea. Groovy makes this stuff easy enough to deal with for people like me (system integrators, admins, etc.)

In this example, we’ll read the RSS feed (which is XML) from Doug’s blog and take action if the feed title includes the word BSM in it :) Groovy includes powerful XML utility called xmlslurper that makes reading XML a breeze.

def url = "http://dougmcclure.net/blog/feed/"
def feed = new XmlSlurper().parse(url)
feed.channel.item.each {post ->
   if (post.title.toString().matches(".*BSM.*")) {
      println "found BSM post!: " + post.title + " – " post.link.toString()
   }
}

There it is, we already  have a Groovy script to retrieve the RSS feed, iterate through the posts and determine whether the title includes BSM keyword. One can take a look at how xmlSlurper works and use it to get the information she needs.

RapidInsight makes it even easier for the script developers to work with the external interfaces without having to learn the intricacies of each interface. In RapidInsight, we can create a class called say RssFeed, store data related to the RSS feed as object properties.Here is how our class may look like:

<model name="RssFeed">
   <properties>
      <property name="name" type="string">
      <property name="url" type="string">
      <property name="type" type="string">
   </property>
</property>

The class can be used to store the information related to the Rss feed as objects. We can create a UI for the user to enter this information, or simply use a script to create the instances. Creating an object in RapidInsight repository is straight forward, pass the properties as name value pairs to add operation:

def props = [:]
props.name = "Doug McClure BSM Blog"
props.url = "http://dougmcclure.net/blog/feed/"
props.type = "Rss 2.0"
RssFeed.add[props]
// I could have written this as a single line as well
// RssFeed.add[url:"http://dougmcclure.net/blog/feed/", type = "Rss 2.0"]

By storing the url, etc. as object properties, we can now have a more generic script that would work with any RSS feed. Next we can add “operations” to this class to deal with the Rss feeds, hiding the complexities of the external interface from the script developer. An operation can read the feed and return name value pairs in a map to the user.

This means the script developer does not have to understand the structure of the RSS or how to use XmlSlurper. The operation code can be modified to add support for different RSS formats (v1, v2), use ROME library to parse RSS instead of XmlSlurper, etc., scripts would continue to work as before and script developers like me would not have to learn something different. All it matters is what is passed to us, which is a List of Map (name value pairs), and this is same for all external interfaces.  (Take a look a this post to see more on how RapidInsight uses name value pairs when working with external interfaces)

The operation may be something like this:

//readFeed operation returns blog posts and links as a list of maps
def readFeed() {
   def feed = new XmlSlurper().parse(url)
   def posts = []
   feed.channel.item.each {
      posts << [title:it.title.toString(), link:it.link.toString()]         
   }
   return posts
}

Now that we have removed both the data (like url) and the external interface interaction out, our script can be simpler:

def dougsFeed = RssFeed.get("Doug McClure BSM Blog")
if (dougsFeed.title.matches(".*BSM.*))
   println "
found BSM post!: " + dougsFeed.title + "" + dougsFeed.link
}

Or we can extend it to do the same for each RssFeed object we may have defined:

// iterate through each RssFeed object
RssFeed.each { blog ->
        def feed = blog.readFeed()
        if (feed.title.matches(".*BSM.*))
                println "
found BSM post!: blog.name <a href=${blog.link}>${blog.link}</a>"
        }
}

Let’s move to the second part of the requirement: taking an action like sending an SNMP trap. Groovy can use any java library and it seems like there is an open source java library for pretty much anything you can think of!
We use SNMP4J in RapidInsight. The java library can be used directly in the groovy script, however SNMP is more complicated than RSS, hence figuring out how to use the library is difficult for a non java developer like myself. Here again, RapidInsight helps by providing infrastructure to make it easier to work with SNMP and hide the complexity even further.

SnmpTrap class can be used to store common data such where (ip/port) to send the traps, which snmp version, etc. SnmpTrap class has an operation called send() that takes name value pairs and sends the trap.  Usage is very easy:

def trap = SnmpTrap.get(name:"myTrapDestination")

def props = [:]
props.enterprise = ".1.3.6.1.4.1.88888.12"
props.generic = 6
props.specific = 1
props.varbinds = []
trap.send(props)

// or in a single line
// trap.send(enterprise:".1.3.6.1.4.1.88888.12",specific:1,generic:6,varbinds:[])

If I only have a few different kind of SNMP traps to send, like up, down etc., I can move the trap definition into the operations to make the script itself even simpler.

//operations
def sendDownTrap() {
send(enterprise:".1.3.6.1.4.1.88888.12",specific:1,generic:6,varbinds:[])
}
def sendUpTrap() {
send(enterprise:".1.3.6.1.4.1.88888.12",specific:2,generic:6,varbinds:[])
}

// script:
def trap = SnmpTrap.get(name:"myTrapDestination")
trap.sendDownTrap()

The functionality described in this post is not difficult to implement in perl etc. for a good developer; there are libraries available and the whole thing can be implemented in a single script.  RapidInsight provides functionality at every step to make not only implementation but maintenance and operations support easier.  Scripts can be executed from a web based UI, scheduled to run periodically, only available to subset of authorized users, logging, notifications, etc.  instead of collection of scripts running as cron jobs that can get out of control rapidly.

Bookmarks for March 25th through April 2nd

Interesting links for March 25th through April 2nd:

  • Secrets to Successful Service Level Management – Manually creating after-the-fact monthly reports is not performing Service Level Management (SLM). SLM must show both current and past status as well as predict future problems, and this requires automation and daily or even real-time analysis of data.
    Service Level Management must align with user needs. SLAs must include targets for capacity, availability, security, continuity, etc. Target attainment data will come from many sources, and you need to track the target at its source, as well as the entire SLA (end-to-end). SLM solutions must show both current and past status as well as predict future problems, and this requires automation and daily or even real-time analysis of data.
  • Content Log: Building a stronger open source product – * the core system and interfaces will remain 100% open source.
    * We will provide service and customer support that provides insurance that systems will run as expected and correct problems according our promised Service Level Agreement
    * Enterprise customers will receive fixes as a priority, but that we will make these fixes available in the next labs release. Bugs fixed by the community are delivered to the community as a priority.
    * We will provide extensions and integrations to proprietary systems to which customers are charged. It is fair for us to charge and include this in an enterprise release as well.
    * Extensions and integrations to ubiquitous proprietary systems, such as Windows and Office, will be completely open source.
    * Extensions that are useful to monitor or run a system in a scaled or production environment, such as system monitoring, administration and high availability, are fair to put into an enterprise release.
  • Use RESTClient to post and read XML RESTful webservice – Messages from mrhaki – The HTTPBuilder library also contains the RESTClient class. This class has a simple API to access RESTful webservices. For example if we want to POST an XML message to a RESTful webservice we can use the post() method. Because we set the request content type to XML we have a StreamingMarkupBuilder object we can use to build our XML.

    The response object is automatically read by the XmlSlurper class, so we have access to the resulting GPathResult object.

« Previous PageNext Page »