Hello
I am working on a projekt with nagios server and remote offices. The nagios server has access to the remote offices. But they are still in different subnet. Alerts /notification are made by nagios and graphical output/statistic with Munin.
I need to able to get information about the bandwidth in both direction. From office to server and server to office. That information should be saved as well in munin's RRD.
I should not use NRPE. I have a dedicated mini computer that connects to the router of that remote offices and collects data from that network.
I cant find a documentation on the check_iperf. I am kind of struggle how to edit it . Can I add options like the normal iperf like --tradeoff etc. for the bidirectional measurement?
My idea is to set the mini computer on iperf -s but in daemon mode and nagios will have every 10 mins. Intervall checks of the remote offices. That information should be saved on a file or something that Munin can use for his RRD etc.
Any idea it works like I think or I am completely wrong with that ?
Bandwidth bidirectional measurement?
Re: Bandwidth bidirectional measurement?
Are you using this plugin? https://exchange.nagios.org/directory/P ... rf/details
As it's a community plugin, we're a bit limited on teh support we can provide. Based on the examples though, it appears to need to be ran like this -
I don't think it supports the additional options, you would need to modify the plugin to do so, or contact the author. The one thing that may disappoint you is the review of it, which mentions it doesn't have performance output, so you will not have RRD data to work with unless you modify it.
As it's a community plugin, we're a bit limited on teh support we can provide. Based on the examples though, it appears to need to be ran like this -
Code: Select all
examples:
check_iperf.pl <host> 10 15: critical if speed under 10 units
check_iperf.pl <host> 10 15:50: warning if speed out of 15:50 units
check_iperf.pl <host> 10:100 15:90
check_iperf.pl <host> 10:40 15:90
Only needs performance output for graphing and it would be perfect. Perfomance output can be easily added by putting a "| bd=$speed" to the output string. Thanks for the script.
Former Nagios Employee
Re: Bandwidth bidirectional measurement?
Thank you for the answer.
I checked this already. But I thought there might be another solution besides of writing own plugins.
Alternativ plugins maybe to iperf to check bandwidth and able to output it in a RRD? Thanks!
I checked this already. But I thought there might be another solution besides of writing own plugins.
Alternativ plugins maybe to iperf to check bandwidth and able to output it in a RRD? Thanks!
Re: Bandwidth bidirectional measurement?
It shouldn't be too difficult to modify check_iperf.pl the plugin to provide performance data. See if modifying lines 63-75 like so produces the desired result:
Code: Select all
if ($connect_ok == 0) {
print "NOK: iperf didn't connect to '$target'.\n"; $exit = 2;
} elsif ($speed<$mincrit) {
print "Critical: iperf speed of '$target': $speed ($unit) < $mincrit" . "|'speed'=$speed\[$unit\]\n";$exit=2;
} elsif (defined($maxcrit) && $speed > $maxcrit) {
print "Critical: iperf speed of '$target': $speed ($unit) > $maxcrit" . "|'speed'=$speed\[$unit\]\n";$exit=2;
} elsif ($speed < $minwarn) {
print "Warning: iperf speed of '$target': $speed ($unit) < $minwarn" . "|'speed'=$speed\[$unit\]\n";$exit=1;
} elsif (defined($maxwarn) && $speed > $maxwarn) {
print "Warning: iperf speed of '$target': $speed ($unit) > $maxwarn" . "|'speed'=$speed\[$unit\]\n";$exit=2;
} else {
print "OK: iperf returns $speed $unit (wsize $mtu)" . "|'speed'=$speed\[$unit\]\n"; $exit = 0;
}
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: Bandwidth bidirectional measurement?
I will try this out! Thank you
Re: Bandwidth bidirectional measurement?
Sure thing! Let us know if you have additional questions regarding this issue.
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/