Tales of an IT Nobody

devbox:~$ iptables -A OUTPUT -j DROP

Cacti – DNS response time February 25, 2011

When you google for a cacti template for DNS response time, there’s not a whole lot out there, and what is; is pretty out dated or involves too much fidgetry.

This post assumes you’re comfortable with cacti – you should be able to at least initialize a graph and fill one in using datasources for a host. Must also be using linux. BSD has a different pecking order of commands.

This guide shows you how to slap together a quick DNS response data input method that will allow you to setup graphs on a nameserver/domain pair granularity. (Meaning, you can graph the same domain across several NS’s, or vice versa).

So here’s a quick rundown on creating a “data input method” and a “data template” for cacti to utilize for your nameservers.

1. Create a new data input method
1a.
   Name: (anything you want)
   Input type: Script/Command
   Input string:

The 1-liner above should get you the msec for given domain (dom) at given nameserver (ns). To test completely, replace the dom and ns lines with something valid:

   1b. Add the two ‘input fields’, ns and dom.
   1c. Add “ResponseTime” as an ‘output field’.

If done correctly, it should look similar to this:

2. Create the data template – Fill out the values to look similar to the screenshot below. Note, you will probably have to hit ‘create’ after selecting the data input method under “data source”. This will detect the “output field” for the “Data Source Item” values.

Here’s what one of mine looks like:

 I’ve omitted the target host/ns from this example image of course :)

6 Comments on Cacti – DNS response time
Categories: cacti linux servers

On top – Worthy of distribution

No really, this post is about top. I’ve always fancied myself well versed in top; every once and a while I need a reminder. Here’s a pretty cool/well presented in-depth rundown on how powerful this utility really is for people in charge of inspecting system behavior.

View in HD here!

Some more things to add:

Also to add something that is really useful I feel was left out that’s pretty important: “Shift + <", "Shift + >” will move the sort-by in the direction of the ‘arrows’. Oh, and ‘shift-w’ to ‘save’ these settings to .toprc :P.
‘x’ will toggle highlighting the column currently sorted by, coupled with the above, you can easily move through different consumptions.

No Comments on On top – Worthy of distribution
Categories: linkspam linux

Staying on top of things February 16, 2011

One of the things that’s crucial to my workflow where I work; is to know as soon as possible when changes are made to our mainline repositories. Same with tickets in our Trac ticket system, when it hits the pipes – I need to know.

I could setup a fancy hook for Mercurial to email, our source control system we use. But that doesn’t handle Trac and maybe the other oddball items I want to watch.

Having notifications emailed is nice, but I often find the chatter from unrelated emails annoying. I usually have my email off and check every hourish. This helps me focus.

What I’ve found is this: Trac, Mercurial (via hgweb), etc all have a form of RSS/Atom feed available. These feeds from our tools I have a hunch we often overlook.

Bring in feed notifier:

Pretty configurable – supports https:// with login – and the popup notifications are exactly what I need. Noticeable enough but not annoying like having to look to an email screen. (Sad thing is, I have 3 gorgeous 24″ dell monitors – all too busy to have a silly email client up.)

I think when I get some me time, I may put something together to watch these feeds – and use XMPP to notify a configurable list of users. That’d be a fun project with very cool results. But for now – this developer is happy with his RSS addon.

No Comments on Staying on top of things