Monitoring Bandwidth using NWC Health Check

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

Monitoring Bandwidth using NWC Health Check

Postby silentnoise » Fri May 21, 2021 3:27 am

Hi,

i have another problem.
I would like to check the used bandwidth on my cable-internet-connection usiung nwc health check in nagios to monitor the bandwidth on my Fritz!Box.

I used the Manual on:
http://www.schroeter-edv.de/?Dokumentat ... r_FritzBox

But it doesn`t work.

In this manual i have to copy the exec-file into dir:
sudo mv plugins-scripts/check_nwc_health /usr/lib/nagios/plugins/
but the directory /usr/lib/nagios does`nt exist.

There ist an Directory: "usr/local/nagios/libexec"
Is this the correct directory ?

Greets
silentnoise
 
Posts: 17
Joined: Tue Jun 02, 2020 3:51 pm

Re: Monitoring Bandwidth using NWC Health Check

Postby silentnoise » Fri May 21, 2021 3:37 am

I´m able to run commands using command line:

/usr/local/nagios/libexec $ ./check_nwc_health --hostname 192.168.178.1 --port 49000 uptime --community "my Password"

it says:
./check_nwc_health --hostname 192.168.178.1 --port 49000 --mode uptime --community XXXXXXXXX
OK - device is up since 7d 15h 5m 16s, FRITZ!Box 6490 Cable (kdg) | 'uptime'=10985;15:;5:;;

So i know this is only the uptime, but i want to show, that nwc health check is running correctly.
silentnoise
 
Posts: 17
Joined: Tue Jun 02, 2020 3:51 pm

Re: Monitoring Bandwidth using NWC Health Check

Postby rhassing » Sun May 23, 2021 4:03 am

I have checked out this plugin as well.

You should be able to check the interface usage:
Code: Select all
./check_nwc_health --hostname 192.168.178.1 --port 49000 --mode interface-usage --community <passowrd>


The other checks described on the example page, memory usage and cpu load are not working very well
Rob Hassing
Image
User avatar
rhassing
 
Posts: 409
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: Monitoring Bandwidth using NWC Health Check

Postby silentnoise » Sun May 23, 2021 4:07 am

But how do i have to integrate it into nagios?
silentnoise
 
Posts: 17
Joined: Tue Jun 02, 2020 3:51 pm

Re: Monitoring Bandwidth using NWC Health Check

Postby rhassing » Sun May 23, 2021 4:17 am

Edit /usr/local/nagios/etc/resource.cfg and add the your password
Code: Select all
$USER4$=fritzbox-password


Add the config to nagios:
Code: Select all
define host {
  use generic-host
  host_name fritzbox
  alias fritzbox
  address <ip-fritzbox>
}
define service {
  use generic-service
  host_name fritzbox
  service_description Interface Usage
  check_command check_fritz!49000!interface-usage
}


Add the command to your command file:
Code: Select all
define command{
   command_name check_fritz
   command_line $USER1$/check_nwc_health --hostname $HOSTADDRESS$ --port $ARG1$ --mode $ARG2$ --community $USER4$
}


The script is trying to write some data in /var/tmp/check_nwc_health
Make sure the nagios user is able to write in there.
Rob Hassing
Image
User avatar
rhassing
 
Posts: 409
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: Monitoring Bandwidth using NWC Health Check

Postby silentnoise » Sun May 23, 2021 6:43 am

The script is trying to write some data in /var/tmp/check_nwc_health
Make sure the nagios user is able to write in there.[/quote]




How will i check this ?
silentnoise
 
Posts: 17
Joined: Tue Jun 02, 2020 3:51 pm

Re: Monitoring Bandwidth using NWC Health Check

Postby silentnoise » Sun May 23, 2021 6:46 am

Is here any failure ?

https://ibb.co/Rgmh3HF -> commands.cfg

https://ibb.co/X5y8xp8 -> fritzbox.cfg (host)

https://ibb.co/s2y5cz7 -> resource.cfg

https://ibb.co/b301WgK -> fritzbox.cfg (service)
silentnoise
 
Posts: 17
Joined: Tue Jun 02, 2020 3:51 pm

Re: Monitoring Bandwidth using NWC Health Check

Postby silentnoise » Sun May 23, 2021 7:12 am

I´m sorry.
I`m one step closer to finish :)


The script is running in nagios.
but it says:
https://ibb.co/pbYWkHn
silentnoise
 
Posts: 17
Joined: Tue Jun 02, 2020 3:51 pm

Re: Monitoring Bandwidth using NWC Health Check

Postby silentnoise » Mon May 24, 2021 4:23 am

Hello again :)
The script is running.

How can i change the output from bis/s to Mbit/s?

Greets
Attachments
Screenshot_20210524-112105_Firefox.jpg
Speed
silentnoise
 
Posts: 17
Joined: Tue Jun 02, 2020 3:51 pm

Re: Monitoring Bandwidth using NWC Health Check

Postby rhassing » Tue May 25, 2021 9:49 am

silentnoise wrote:Hello again :)
The script is running.

How can i change the output from bis/s to Mbit/s?

Greets

With the option -units MB it should be possible to change the output.
Rob Hassing
Image
User avatar
rhassing
 
Posts: 409
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Next

Return to Community Support

Who is online

Users browsing this forum: No registered users and 30 guests