Faidon Liambotis has submitted this change and it was merged.
Change subject: Remove dns::recursor::statistics
......................................................................
Remove dns::recursor::statistics
This was a PowerDNS recursor in-house monitoring setup, with rrdtool and
a web interface for viewing graphs. Since it's has been replaced by
better-integrated monitoring solutions (currently, Ganglia) and is an
extra service a recursor has to run, remove it.
Change-Id: I59b0601242efc9b13bf98a54f8afc71093a9c20f
---
D files/powerdns/recursorstats/scripts/create
D files/powerdns/recursorstats/scripts/makegraphs
D files/powerdns/recursorstats/scripts/update
D files/powerdns/recursorstats/www/index.html
M manifests/dns.pp
M manifests/site.pp
6 files changed, 0 insertions(+), 332 deletions(-)
Approvals:
Faidon Liambotis: Looks good to me, approved
jenkins-bot: Verified
diff --git a/files/powerdns/recursorstats/scripts/create
b/files/powerdns/recursorstats/scripts/create
deleted file mode 100755
index 77dbe66..0000000
--- a/files/powerdns/recursorstats/scripts/create
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/sh
-#####################################################################
-### THIS FILE IS MANAGED BY PUPPET
-### puppet:///files/powerdns/recursorstats/scripts/create
-#####################################################################
-
-UPDATE_INTERVAL=60
-
-rrdtool create pdns_recursor.rrd -s $UPDATE_INTERVAL \
-DS:questions:COUNTER:600:0:100000 \
-DS:tcp-questions:COUNTER:600:0:100000 \
-DS:cache-entries:GAUGE:600:0:U \
-DS:throttle-entries:GAUGE:600:0:U \
-DS:concurrent-queries:GAUGE:600:0:50000 \
-DS:noerror-answers:COUNTER:600:0:100000 \
-DS:nxdomain-answers:COUNTER:600:0:100000 \
-DS:servfail-answers:COUNTER:600:0:100000 \
-DS:tcp-outqueries:COUNTER:600:0:100000 \
-DS:outgoing-timeouts:COUNTER:600:0:100000 \
-DS:throttled-out:COUNTER:600:0:100000 \
-DS:nsspeeds-entries:GAUGE:600:0:U \
-DS:negcache-entries:GAUGE:600:0:U \
-DS:all-outqueries:COUNTER:600:0:100000 \
-DS:cache-hits:COUNTER:600:0:100000 \
-DS:cache-misses:COUNTER:600:0:100000 \
-DS:answers0-1:COUNTER:600:0:100000 \
-DS:answers1-10:COUNTER:600:0:100000 \
-DS:answers10-100:COUNTER:600:0:100000 \
-DS:answers100-1000:COUNTER:600:0:100000 \
-DS:answers-slow:COUNTER:600:0:100000 \
-DS:qa-latency:GAUGE:600:0:10000000 \
-DS:user-msec:COUNTER:600:0:2000 \
-DS:client-parse-errors:COUNTER:600:0:1000000 \
-DS:server-parse-errors:COUNTER:600:0:1000000 \
-DS:unauthorized-udp:COUNTER:600:0:1000000 \
-DS:unauthorized-tcp:COUNTER:600:0:1000000 \
-DS:sys-msec:COUNTER:600:0:2000 \
- RRA:AVERAGE:0.5:1:9600 \
- RRA:AVERAGE:0.5:4:9600 \
- RRA:AVERAGE:0.5:24:6000 \
- RRA:MAX:0.5:1:9600 \
- RRA:MAX:0.5:4:9600 \
- RRA:MAX:0.5:24:6000
diff --git a/files/powerdns/recursorstats/scripts/makegraphs
b/files/powerdns/recursorstats/scripts/makegraphs
deleted file mode 100755
index 5f09b78..0000000
--- a/files/powerdns/recursorstats/scripts/makegraphs
+++ /dev/null
@@ -1,159 +0,0 @@
-#!/bin/bash
-#####################################################################
-### THIS FILE IS MANAGED BY PUPPET
-### puppet:///files/powerdns/recursorstats/scripts/makegraphs
-#####################################################################
-
-WWWPREFIX=.
-WSIZE=800
-HSIZE=250
-
-# only recent rrds offer slope-mode:
-#GRAPHOPTS=--slope-mode
-
-function makeGraphs()
-{
- rrdtool graph $GRAPHOPTS --start -$1 $WWWPREFIX/questions-$2.png -w $WSIZE
-h $HSIZE -l 0\
- -t "Questions and answers per second" \
- -v "packets" \
- DEF:questions=pdns_recursor.rrd:questions:AVERAGE \
- DEF:nxdomainanswers=pdns_recursor.rrd:nxdomain-answers:AVERAGE \
- DEF:noerroranswers=pdns_recursor.rrd:noerror-answers:AVERAGE \
- DEF:servfailanswers=pdns_recursor.rrd:servfail-answers:AVERAGE \
- LINE1:questions#0000ff:"questions/s"\
- AREA:noerroranswers#00ff00:"noerror answers/s" \
- STACK:nxdomainanswers#ffa500:"nxdomain answers/s"\
- STACK:servfailanswers#ff0000:"servfail answers/s"
-
- rrdtool graph $GRAPHOPTS --start -$1 $WWWPREFIX/tcp-questions-$2.png -w
$WSIZE -h $HSIZE -l 0\
- -t "TCP questions and answers per second, unauthorized packets/s" \
- -v "packets" \
- DEF:tcpquestions=pdns_recursor.rrd:tcp-questions:AVERAGE \
- DEF:unauthudp=pdns_recursor.rrd:unauthorized-udp:AVERAGE \
- DEF:unauthtcp=pdns_recursor.rrd:unauthorized-tcp:AVERAGE \
- LINE1:tcpquestions#0000ff:"tcp questions/s" \
- LINE1:unauthudp#ff0000:"udp unauth/s" \
- LINE1:unauthtcp#00ff00:"tcp unauth/s"
-
- rrdtool graph $GRAPHOPTS --start -$1 $WWWPREFIX/packet-errors-$2.png -w
$WSIZE -h $HSIZE -l 0\
- -t "Parsing errors per second" \
- -v "packets" \
- DEF:clientparseerrors=pdns_recursor.rrd:client-parse-errors:AVERAGE \
- DEF:serverparseerrors=pdns_recursor.rrd:server-parse-errors:AVERAGE \
- LINE1:clientparseerrors#0000ff:"bad packets from clients" \
- LINE1:serverparseerrors#00ff00:"bad packets from servers"
-
- rrdtool graph $GRAPHOPTS --start -$1 $WWWPREFIX/latencies-$2.png -w $WSIZE
-h $HSIZE -l 0\
- -t "Questions answered within latency" \
- -v "questions" \
- DEF:questions=pdns_recursor.rrd:questions:AVERAGE \
- DEF:answers01=pdns_recursor.rrd:answers0-1:AVERAGE \
- DEF:answers110=pdns_recursor.rrd:answers1-10:AVERAGE \
- DEF:answers10100=pdns_recursor.rrd:answers10-100:AVERAGE \
- DEF:answers1001000=pdns_recursor.rrd:answers100-1000:AVERAGE \
- DEF:answersslow=pdns_recursor.rrd:answers-slow:AVERAGE \
- LINE1:questions#0000ff:"questions/s" \
- AREA:answers01#00ff00:"<1 ms" \
- STACK:answers110#0000ff:"<10 ms" \
- STACK:answers10100#00ffff:"<100 ms" \
- STACK:answers1001000#ffff00:"<1000 ms" \
- STACK:answersslow#ff0000:">1000 ms"
-
- rrdtool graph $GRAPHOPTS --start -$1 $WWWPREFIX/qoutq-$2.png -w $WSIZE -h
$HSIZE -l 0 \
- -t "Questions/outqueries per second" \
- -v "packets" \
- DEF:questions=pdns_recursor.rrd:questions:AVERAGE \
- DEF:alloutqueries=pdns_recursor.rrd:all-outqueries:AVERAGE \
- LINE1:questions#ff0000:"questions/s"\
- LINE1:alloutqueries#00ff00:"outqueries/s"
-
- rrdtool graph $GRAPHOPTS --start -$1 $WWWPREFIX/qa-latency-$2.png -w $WSIZE
-h $HSIZE -l 0 \
- -t "Questions/answer latency in milliseconds" \
- -v "msec" \
- DEF:qalatency=pdns_recursor.rrd:qa-latency:AVERAGE \
- CDEF:mqalatency=qalatency,1000,/ \
- LINE1:mqalatency#ff0000:"questions/s"
-
-
- rrdtool graph $GRAPHOPTS --start -$1 $WWWPREFIX/timeouts-$2.png -w $WSIZE -h
$HSIZE -l 0\
- -t "Outqueries/timeouts per second" \
- -v "events" \
- DEF:alloutqueries=pdns_recursor.rrd:all-outqueries:AVERAGE \
- DEF:outgoingtimeouts=pdns_recursor.rrd:outgoing-timeouts:AVERAGE \
- DEF:throttledout=pdns_recursor.rrd:throttled-out:AVERAGE \
- LINE1:alloutqueries#ff0000:"outqueries/s"\
- LINE1:outgoingtimeouts#00ff00:"outgoing timeouts/s"\
- LINE1:throttledout#0000ff:"throttled outqueries/s"
-
-
- rrdtool graph $GRAPHOPTS --start -$1 $WWWPREFIX/caches-$2.png -w $WSIZE -h
$HSIZE -l 0\
- -t "Cache sizes" \
- -v "entries" \
- DEF:cacheentries=pdns_recursor.rrd:cache-entries:AVERAGE \
- DEF:negcacheentries=pdns_recursor.rrd:negcache-entries:AVERAGE \
- DEF:nsspeedsentries=pdns_recursor.rrd:nsspeeds-entries:AVERAGE \
- DEF:throttleentries=pdns_recursor.rrd:throttle-entries:AVERAGE \
- LINE1:cacheentries#ff0000:"cache entries" \
- LINE1:negcacheentries#0000ff:"negative cache entries" \
- LINE1:nsspeedsentries#00ff00:"NS speeds entries" \
- LINE1:throttleentries#00ff00:"throttle map entries"
-
-
- rrdtool graph $GRAPHOPTS --start -$1 $WWWPREFIX/caches2-$2.png -w $WSIZE -h
$HSIZE -l 0\
- -t "Cache sizes" \
- -v "entries" \
- DEF:negcacheentries=pdns_recursor.rrd:negcache-entries:AVERAGE \
- DEF:nsspeedsentries=pdns_recursor.rrd:nsspeeds-entries:AVERAGE \
- DEF:throttleentries=pdns_recursor.rrd:throttle-entries:AVERAGE \
- LINE1:negcacheentries#0000ff:"negative cache entries" \
- LINE1:nsspeedsentries#00ff00:"NS speeds entries" \
- LINE1:throttleentries#ffa000:"throttle map entries"
-
- rrdtool graph $GRAPHOPTS --start -$1 $WWWPREFIX/load-$2.png -w $WSIZE -h
$HSIZE -l 0\
- -v "MThreads" \
- -t "Concurrent queries" \
- DEF:concurrentqueries=pdns_recursor.rrd:concurrent-queries:AVERAGE \
- LINE1:concurrentqueries#0000ff:"concurrent queries"
-
- rrdtool graph $GRAPHOPTS --start -$1 $WWWPREFIX/hitrate-$2.png -w $WSIZE -h
$HSIZE -l 0\
- -v "percentage" \
- -t "cache hits, cpu load" \
- DEF:cachehits=pdns_recursor.rrd:cache-hits:AVERAGE \
- DEF:cachemisses=pdns_recursor.rrd:cache-misses:AVERAGE \
- DEF:usermsec=pdns_recursor.rrd:user-msec:AVERAGE \
- DEF:sysmsec=pdns_recursor.rrd:sys-msec:AVERAGE \
- DEF:musermsec=pdns_recursor.rrd:user-msec:MAX \
- DEF:msysmsec=pdns_recursor.rrd:sys-msec:MAX \
- CDEF:perc=cachehits,100,*,cachehits,cachemisses,+,/ \
- CDEF:userperc=usermsec,10,/ \
- CDEF:sysperc=sysmsec,10,/ \
- CDEF:totmperc=musermsec,msysmsec,+,10,/ \
- LINE1:perc#0000ff:"percentage cache hits" \
- LINE1:totmperc#ffff00:"max cpu use" \
- AREA:userperc#ff0000:"user cpu percentage" \
- STACK:sysperc#00ff00:"system cpu percentage" \
- COMMENT:"\l" \
- COMMENT:"Cache hits " \
- GPRINT:perc:AVERAGE:"avg %-3.1lf%%\t" \
- GPRINT:perc:LAST:"last %-3.1lf%%\t" \
- GPRINT:perc:MAX:"max %-3.1lf%%" \
- COMMENT:"\l" \
- COMMENT:"System cpu " \
- GPRINT:sysperc:AVERAGE:"avg %-3.1lf%%\t" \
- GPRINT:sysperc:LAST:"last %-3.1lf%%\t" \
- GPRINT:sysperc:MAX:"max %-3.1lf%%\t" \
- COMMENT:"\l" \
- COMMENT:"User cpu " \
- GPRINT:userperc:AVERAGE:"avg %-3.1lf%%\t" \
- GPRINT:userperc:LAST:"last %-3.1lf%%\t" \
- GPRINT:userperc:MAX:"max %-3.1lf%%"
-
-}
-
-makeGraphs 6h 6h
-makeGraphs 24h day
-#makeGraphs 7d week
-#makeGraphs 1m month
-#makeGraphs 1y year
-
-
diff --git a/files/powerdns/recursorstats/scripts/update
b/files/powerdns/recursorstats/scripts/update
deleted file mode 100755
index 5a4b02b..0000000
--- a/files/powerdns/recursorstats/scripts/update
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/bash
-#####################################################################
-### THIS FILE IS MANAGED BY PUPPET
-### puppet:///files/powerdns/recursorstats/scripts/update
-#####################################################################
-
-#SOCKETDIR=/home/ahu/work/pdns/pdns/pdns/
-SOCKETDIR=/var/run/
-
-TSTAMP=$(date +%s)
-
-VARIABLES="questions tcp-questions cache-entries concurrent-queries\
- nxdomain-answers noerror-answers\
- servfail-answers tcp-outqueries\
- outgoing-timeouts nsspeeds-entries negcache-entries all-outqueries
throttled-out\
- cache-hits cache-misses answers0-1 answers1-10 answers10-100
answers100-1000 answers-slow\
- qa-latency throttle-entries sys-msec user-msec unauthorized-udp
unauthorized-tcp client-parse-errors\
- server-parse-errors"
-
-UVARIABLES=$(echo $VARIABLES | tr '[a-z]' '[A-Z]' | tr - _ )
-
-rec_control --socket-dir=$SOCKETDIR GET $VARIABLES |
-(
- for a in $UVARIABLES
- do
- read $a
- done
- rrdtool update pdns_recursor.rrd \
- -t \
- $(for a in $VARIABLES
- do
- echo -n $a:
- done | sed 's/:$//' ) \
-$TSTAMP$(
- for a in $UVARIABLES
- do
- echo -n :${!a}
- done)
-)
diff --git a/files/powerdns/recursorstats/www/index.html
b/files/powerdns/recursorstats/www/index.html
deleted file mode 100644
index 024a035..0000000
--- a/files/powerdns/recursorstats/www/index.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<html>
-<body>
-<!-- THIS FILE IS MANAGED BY PUPPET
puppet:///files/powerdns/recursorstats/www/index.html -->
-<!--
--rw-r--r-- 1 ahu ahu 12918 2006-03-18 23:51 /var/www/caches-day.png
--rw-r--r-- 1 ahu ahu 13174 2006-03-18 23:51 /var/www/load-day.png
--rw-r--r-- 1 ahu ahu 12728 2006-03-18 23:51 /var/www/qoutq-day.png
--rw-r--r-- 1 ahu ahu 12939 2006-03-18 23:51 /var/www/questions-day.png
--rw-r--r-- 1 ahu ahu 12913 2006-03-18 23:51 /var/www/timeouts-day.png
--->
-<h1>PowerDNS Recursor Performance Graphs</H1>
-<table border=1>
-<tr><td>Questions</td><td>End-user initiated DNS questions</td></tr>
-<tr><td>Out-queries</td><td>Recursor initiated questions to other
-nameservers</td></tr>
-<tr><td>Throttled</td><td>If a certain nameserver is not responding, or if
-it is, but returning unuseful answers, it is not useful to keep repeating
-identical queries. If PowerDNS prevents a duplicate query, and therefore
-prevents needless server load and delays, this is called a 'throttled
-out-query'</td></tr>
-<tr><td>Outgoing timeout</td><td>An out-query that did not generate an
-answer within 1 or 2 seconds</td></tr>
-<tr><td>Noerror answer</td><td>A Question that was answered without an error
-status</td></tr>
-<tr><td>NXDOMAIN answer</td><td>A Question that was answered with a positive
-indication that there is no answer</td></tr>
-<tr><td>SERVFAIL answer</td><td>No answer could be given because the
nameservers
-carrying the answer did not respond, or were throttled</td></tr>
-<tr><td>Cache hits/misses</td><td>A query is judged a cache-hit if it could
-be answered without generating any out-queries</td></tr>
-<tr><td>User/System CPU usage</td><td>Actual amount of CPU used exclusively
-by the recursor, either in user or in system (kernel) mode</td></td>
-</table>
-<img src="latencies-day.png">
-<br>
-<img src="qa-latency-day.png">
-<br>
-<img src="qoutq-day.png">
-<br>
-<img src="timeouts-day.png">
-<br>
-<img src="questions-day.png">
-<br>
-<img src="tcp-questions-day.png">
-<br>
-<img src="caches-day.png">
-<br>
-<img src="caches2-day.png">
-<br>
-<img src="load-day.png">
-<br>
-<img src="hitrate-day.png">
-<br>
-<img src="packet-errors-day.png">
-
-</body>
-</html>
diff --git a/manifests/dns.pp b/manifests/dns.pp
index b958112..3c061e7 100644
--- a/manifests/dns.pp
+++ b/manifests/dns.pp
@@ -124,38 +124,5 @@
}
}
- class statistics {
- package { 'rrdtool':
- ensure => 'latest',
- }
-
- file { '/usr/local/powerdnsstats':
- source => 'puppet:///files/powerdns/recursorstats/scripts',
- recurse => remote,
- }
-
- file { '/var/www/pdns':
- source => 'puppet:///files/powerdns/recursorstats/www',
- recurse => 'remote',
- }
-
- exec { '/usr/local/powerdnsstats/create':
- require => [Package['rrdtool'],
- File['/usr/local/powerdnsstats']
- ],
- cwd => '/var/www/pdns',
- user => 'root',
- creates => '/var/www/pdns/pdns_recursor.rrd',
- }
-
- cron { 'pdnsstats':
- command => 'cd /var/www/pdns && /usr/local/powerdnsstats/update &&
/usr/local/powerdnsstats/makegraphs >/dev/null',
- user => 'root',
- minute => '*/5',
- }
-
- # Install a static web server to serve this
- include webserver::static
- }
include metrics
}
diff --git a/manifests/site.pp b/manifests/site.pp
index 58c46c4..af47a69 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2045,7 +2045,6 @@
include admin
include standard
- include dns::recursor::statistics
include network::constants
class { 'dns::recursor':
--
To view, visit https://gerrit.wikimedia.org/r/185170
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I59b0601242efc9b13bf98a54f8afc71093a9c20f
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis <[email protected]>
Gerrit-Reviewer: Faidon Liambotis <[email protected]>
Gerrit-Reviewer: Filippo Giunchedi <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits