Service Graphing

I am working on a nagios plugin that performs iperf3 tests. Everything seems to be working just fine, and when I manually run the check-services.php -d script multiple times it will graph it. However, when I check back later, there are nothing on the graph. (See below). this is the output of the check-services.php -d:

Nagios Service - 2
Request: ‘/usr/lib/nagios/plugins/check_iperf3server’ ‘-H’ ‘10.0.0.217’ ‘-w’ ‘800’ ‘-c’ ‘500’ ‘-l’ ‘10’
Perf Data - DS: Throughput, Value: 932.94, UOM: MB
Response: OK: 932.944 Mbps
Service DS: {
“Throughput”: “MB”
}
RRD[update /opt/librenms/rrd/crmsearch.descomm.com/services-2.rrd N:932.94]
SQL[UPDATE services set service_message=? WHERE service_id=? [“OK: 932.944 Mbps”,2] 2.74ms]

Anyone run into this before and can help?

Thanks in advance.

@difi80211g Can you share nagios plugin ?

Yes, its still a work in progress but here is the plugin:

It requires an iperf3 server on the network and python iperf3 installed (pip install iperf3)

Not sure if this can help solve it, but if change my output, instead of being:

    print("{}: {} Mbps|'Throughput'={}MB;{};{};;;".format(
      status[1],
      str(iperfresult),
      iperfresultround,
      args.w,
      args.c,
  ))

I just do:

print(“{}: {} Mbps|‘Throughput’={};{};{};;;”.format(
status[1],
str(iperfresult),
iperfresultround,
args.w,
args.c,
))

it will graph it constantly but I would really like it to show that its in MB/s somehow.

was this resolved?

I get the below from the RRDTool output (omitted host ip):

ERROR: No DS called ‘0’ in ‘/services-248.rrd’

Sorry for offtop, but how do I set the service to draw graphs?

Yes, I was able to get the output issue resolved.

The graph should draw on its own in Libre. You just have to switch to the Details view. It will take a few minutes before it starts to plot data on the graph.

@difi80211g This plugin is great. We’d like to monitor our wan links throughput using this. But since iperf test consumes all available bandwidth can it be run only after business hours? As far as I know all services run every 5 min by default, is there any way to set this specific plugin service on a different schedule?

I just updated the plugin to support a -t option. This is the time since the last run. Please make sure you read README document about how timing works. It is reliant on the poller service and how often that runs on your system, typically every 5 minutes. Hope this helps!