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