RRD update issue with unbound module

After update from 16 March no updates unbound-queries.rrd

Entries from debugging data:

RRD warning: unused data sent a
RRD warning: unused data sent ns
RRD warning: unused data sent cname
RRD warning: unused data sent soa
RRD warning: unused data sent null
RRD warning: unused data sent wks
RRD warning: unused data sent ptr
RRD warning: unused data sent mx
RRD warning: unused data sent txt
RRD warning: unused data sent aaaa
RRD warning: unused data sent srv
RRD warning: unused data sent naptr
RRD warning: unused data sent ds
RRD warning: unused data sent dnskey
RRD warning: unused data sent spf
RRD warning: unused data sent any
RRD[update /opt/librenms/rrd/DNS-12/app-unbound-queries-14.rrd N:U:U]
RRDtool Output: OK u:0.00 s:0.00 r:2.30
RRD[update /opt/librenms/rrd/DNS-12/app-unbound-cache-14.rrd N:3235423:2824448:410975]
RRDtool Output: ERROR: /opt/librenms/rrd/DNS-12/app-unbound-queries-14.rrd: expected 18 data source readings (got 2) from N

Could you please fix this

I was just about to post about this too as Iā€™ve recently switched to openwrt router and configured unbound and the snmpd extend for unbound on it.

librenms creates graphs like this:
https://turbomrak.ddns.net/s/WYkqazJBRG9XNMN
although if I run the snmpd extend manually it reports correct data:

root@openwrt:~# /etc/snmp/unbound
thread0.num.queries=17368
thread0.num.queries_ip_ratelimited=0
thread0.num.cachehits=14470
thread0.num.cachemiss=2898
thread0.num.prefetch=7616
thread0.num.zero_ttl=7897
thread0.num.recursivereplies=2898
thread0.requestlist.avg=1.61375
thread0.requestlist.max=21
thread0.requestlist.overwritten=0
thread0.requestlist.exceeded=0
thread0.requestlist.current.all=0
thread0.requestlist.current.user=0
thread0.recursion.time.avg=0.307691
thread0.recursion.time.median=0.234753
thread0.tcpusage=0
total.num.queries=17368
total.num.queries_ip_ratelimited=0
total.num.cachehits=14470
total.num.cachemiss=2898
total.num.prefetch=7616
total.num.zero_ttl=7897
total.num.recursivereplies=2898
total.requestlist.avg=1.61375
total.requestlist.max=21
total.requestlist.overwritten=0
total.requestlist.exceeded=0
total.requestlist.current.all=0
total.requestlist.current.user=0
total.recursion.time.avg=0.307691
total.recursion.time.median=0.234753
total.tcpusage=0
time.now=1586087810.088128
time.up=42047.315289
time.elapsed=37.699411
mem.cache.rrset=682904
mem.cache.message=544336
mem.mod.iterator=16504
mem.mod.validator=101908
mem.mod.respip=0
mem.streamwait=0
histogram.000000.000000.to.000000.000001=37
histogram.000000.000001.to.000000.000002=0
histogram.000000.000002.to.000000.000004=0
histogram.000000.000004.to.000000.000008=0
histogram.000000.000008.to.000000.000016=0
histogram.000000.000016.to.000000.000032=0
histogram.000000.000032.to.000000.000064=0
histogram.000000.000064.to.000000.000128=0
histogram.000000.000128.to.000000.000256=1
histogram.000000.000256.to.000000.000512=1
histogram.000000.000512.to.000000.001024=0
histogram.000000.001024.to.000000.002048=1
histogram.000000.002048.to.000000.004096=1
histogram.000000.004096.to.000000.008192=2
histogram.000000.008192.to.000000.016384=7
histogram.000000.016384.to.000000.032768=19
histogram.000000.032768.to.000000.065536=42
histogram.000000.065536.to.000000.131072=721
histogram.000000.131072.to.000000.262144=780
histogram.000000.262144.to.000000.524288=844
histogram.000000.524288.to.000001.000000=368
histogram.000001.000000.to.000002.000000=73
histogram.000002.000000.to.000004.000000=1
histogram.000004.000000.to.000008.000000=0
histogram.000008.000000.to.000016.000000=0
histogram.000016.000000.to.000032.000000=0
histogram.000032.000000.to.000064.000000=0
histogram.000064.000000.to.000128.000000=0
histogram.000128.000000.to.000256.000000=0
histogram.000256.000000.to.000512.000000=0
histogram.000512.000000.to.001024.000000=0
histogram.001024.000000.to.002048.000000=0
histogram.002048.000000.to.004096.000000=0
histogram.004096.000000.to.008192.000000=0
histogram.008192.000000.to.016384.000000=0
histogram.016384.000000.to.032768.000000=0
histogram.032768.000000.to.065536.000000=0
histogram.065536.000000.to.131072.000000=0
histogram.131072.000000.to.262144.000000=0
histogram.262144.000000.to.524288.000000=0
num.query.type.A=10445
num.query.type.NS=1
num.query.type.SOA=6
num.query.type.PTR=1
num.query.type.MX=35
num.query.type.TXT=12
num.query.type.AAAA=6840
num.query.type.SRV=25
num.query.type.NAPTR=3
num.query.class.IN=17368
num.query.opcode.QUERY=17368
num.query.tcp=8
num.query.tcpout=134
num.query.tls=0
num.query.tls.resume=0
num.query.ipv6=10564
num.query.flags.QR=0
num.query.flags.AA=0
num.query.flags.TC=0
num.query.flags.RD=17368
num.query.flags.RA=0
num.query.flags.Z=0
num.query.flags.AD=105
num.query.flags.CD=0
num.query.edns.present=1949
num.query.edns.DO=170
num.answer.rcode.NOERROR=17296
num.answer.rcode.FORMERR=0
num.answer.rcode.SERVFAIL=0
num.answer.rcode.NXDOMAIN=72
num.answer.rcode.NOTIMPL=0
num.answer.rcode.REFUSED=0
num.answer.rcode.nodata=1253
num.query.ratelimited=0
num.answer.secure=294
num.answer.bogus=0
num.rrset.bogus=0
num.query.aggressive.NOERROR=0
num.query.aggressive.NXDOMAIN=14
unwanted.queries=0
unwanted.replies=0
msg.cache.count=2784
rrset.cache.count=2635
infra.cache.count=2
key.cache.count=391
num.query.authzone.up=0
num.query.authzone.down=0

The same hereā€¦ Only unbound queries not work graphs.

Graphs for Unbound Cache, Operations, Request list and Recursion time working great.

Like mentioned, if run the snmpd extend manually it reports correct data.

Same here. Just moving over from the pre-fork software and weā€™re seeing this too.

I think Request List may be affected too as there is no data there when there should be.

Found a potential cause, the capitalisation of some of the fields. Changed all to lower case and now I am getting stats.

Added in the additional record types too.

Changed in both includes/polling/applications/unbound.inc.php and includes/html/graphs/application/unbound_queries.inc.php

Temporary solution no doubt until it can be properly fixed

$array        = array(
    'type0',
    'a',
    'ns',
    'cname',
    'soa',
    'null',
    'wks',
    'ptr',
    'hinfo',
    'mx',
    'txt',
    'aaaa',
    'srv',
    'naptr',
    'ds',
    'rrsig',
    'dnskey',
    'tlsa',
    'spf',
    'axfr',
    'any',
    'other'
);

and

$rrd_def = RrdDefinition::make()
    ->addDataset('type0', 'DERIVE', 0, 125000000000)
    ->addDataset('a', 'DERIVE', 0, 125000000000)
    ->addDataset('ns', 'DERIVE', 0, 125000000000)
    ->addDataset('cname', 'DERIVE', 0, 125000000000)
    ->addDataset('soa', 'DERIVE', 0, 125000000000)
    ->addDataset('null', 'DERIVE', 0, 125000000000)
    ->addDataset('wks', 'DERIVE', 0, 125000000000)
    ->addDataset('ptr', 'DERIVE', 0, 125000000000)
    ->addDataset('hinfo', 'DERIVE', 0, 125000000000)
    ->addDataset('mx', 'DERIVE', 0, 125000000000)
    ->addDataset('txt', 'DERIVE', 0, 125000000000)
    ->addDataset('aaaa', 'DERIVE', 0, 125000000000)
    ->addDataset('srv', 'DERIVE', 0, 125000000000)
    ->addDataset('naptr', 'DERIVE', 0, 125000000000)
    ->addDataset('ds', 'DERIVE', 0, 125000000000)
    ->addDataset('rrsig', 'DERIVE', 0, 125000000000)
    ->addDataset('dnskey', 'DERIVE', 0, 125000000000)
    ->addDataset('tlsa', 'DERIVE', 0, 125000000000)
    ->addDataset('spf', 'DERIVE', 0, 125000000000)
    ->addDataset('axfr', 'DERIVE', 0, 125000000000)
    ->addDataset('any', 'DERIVE', 0, 125000000000)
    ->addDataset('other', 'DERIVE', 0, 125000000000);
$fields = array (
    'type0' => $unbound['num.query.type.TYPE0'],
    'a' => $unbound['num.query.type.A'],
    'ns' => $unbound['num.query.type.NS'],
    'cname' => $unbound['num.query.type.CNAME'],
    'soa' => $unbound['num.query.type.SOA'],
    'null' => $unbound['num.query.type.NULL'],
    'wks' => $unbound['num.query.type.WKS'],
    'ptr' => $unbound['num.query.type.PTR'],
    'hinfo' => $unbound['num.query.type.HINFO'],
    'mx' => $unbound['num.query.type.MX'],
    'txt' => $unbound['num.query.type.TXT'],
    'aaaa' => $unbound['num.query.type.AAAA'],
    'srv' => $unbound['num.query.type.SRV'],
    'naptr' => $unbound['num.query.type.NAPTR'],
    'ds' => $unbound['num.query.type.DS'],
    'rrsig' => $unbound['num.query.type.RRSIG'],
    'dnskey' => $unbound['num.query.type.DNSKEY'],
    'tlsa' => $unbound['num.query.type.TLSA'],
    'spf' => $unbound['num.query.type.SPF'],
    'axfr' => $unbound['num.query.type.AXFR'],
    'any' => $unbound['num.query.type.ANY'],
    'other' => $unbound['num.query.type.other']
    );
2 Likes

Any chance you could submit this to librenms github or at least upload the modified files somewhere? I tried to modify them myself but I must be doing something wrong as all I get after I do the changes is blank graph called Error Drawing Graph.

Thanks in any case, hopefully this could be intehrated in future updates, the blank graph is driving me nuts :wink:

May need to delete your existing RRD as the fields will have changed due to the new record types.

1 Like

I see, iā€™ll give that a go when I return from work (apparently making marshmallows is key businessā€¦)

Thanks

Thanks that did the trick!

Same issue here. Would love for this to be merged into the code.

1 Like

Well I took the plunge and submitted the pull request on github, hopefully Iā€™m doing at least some of it right.

edit: I messed up the original pull request and made new one after we found solution that doesnā€™t require deleting the rrd file.

Was this issue solved?

Iā€™m experience the same problem with unboun agent. no queries graph being populated.