[Unbound-users] unbound and hobbit / xymon

Dmitriy Demidov dima_bsd at inbox.lv
Wed May 13 17:08:42 UTC 2009


On Thursday 07 May 2009, Gabriel Petrescu wrote:
> Hi :)
> I try to get statistics from unbound to hobbit aka xymon.
> I know there is a plugin for Munin.. but it's not quite what I need.
> Do you tried before the combination unbound & xymon?
> Can you give me a clue , direction?
> Thank you:)
>
> Gabi

Hi Gabi.

I found this tutorial about how to setup custom graphs in Xymon: 
http://www.hobbitmon.com/hobbit/help/howtograph.html
From the example of custom scripts I can see that Xymon expects input in 
format of "name : value", where each pair should be on new line.
In the given example, script what parse /proc/slabinfo generates this output:
inode_cache : 7100160
dentry_cache : 752640
...etc

When you run unbound-control stats command it produces output in this format:
thread0.num.queries=0
thread0.num.cachehits=0
thread0.num.cachemiss=0
thread0.recursion.time.avg=0.000000
...etc

All you need to do is sed stats output:
unbound-control stats | sed s/=/" : "/
thread0.num.queries : 0
thread0.num.cachehits : 0
thread0.num.cachemiss : 0
thread0.recursion.time.avg : 0.000000
...etc

Or, if dots in variables names are unvanted use this:
unbound-control stats | awk -F '=' '{gsub(/\./,"_",$1);print($1" : "$2)}'
thread0_num_queries : 0
thread0_num_cachehits : 0
thread0_num_cachemiss : 0
thread0_recursion_time_avg : 0.000000
...etc



More information about the Unbound-users mailing list