nncp: correct collectd output

This commit is contained in:
Ehmry - 2022-01-23 17:18:58 +01:00
parent d0c5acb696
commit 6510e5fea4
1 changed files with 4 additions and 4 deletions

View File

@ -27,15 +27,15 @@ while true:
var nodeName = extractFilename path
block:
var rx = sumDir(path / "rx")
stdout.writeLine("""PUTVAL "$#/nncp-$#/bytes-rx" interval=$# N:$#""" %
stdout.writeLine("""PUTVAL "$#/exec-nncp_$#/bytes-rx" interval=$# N:$#""" %
[hostname, nodeName, $interval, $rx.size])
stdout.writeLine("""PUTVAL "$#/nncp-$#/pending_operations-rx" interval=$# N:$#""" %
stdout.writeLine("""PUTVAL "$#/exec-nncp_$#/pending_operations-rx" interval=$# N:$#""" %
[hostname, nodeName, $interval, $rx.packets])
block:
var tx = sumDir(path / "tx")
stdout.writeLine("""PUTVAL "$#/nncp-$#/bytes-tx" interval=$# N:$#""" %
stdout.writeLine("""PUTVAL "$#/exec-nncp_$#/bytes-tx" interval=$# N:$#""" %
[hostname, nodeName, $interval, $tx.size])
stdout.writeLine("""PUTVAL "$#/nncp-$#/pending_operations-tx" interval=$# N:$#""" %
stdout.writeLine("""PUTVAL "$#/exec-nncp_$#/pending_operations-tx" interval=$# N:$#""" %
[hostname, nodeName, $interval, $tx.packets])
flushFile stdout
sleep interval*1000