Monitoring Bandwidth using NWC Health Check
-
- Posts: 20
- Joined: Tue Jun 02, 2020 3:51 pm
Monitoring Bandwidth using NWC Health Check
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
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
-
- Posts: 20
- Joined: Tue Jun 02, 2020 3:51 pm
Re: Monitoring Bandwidth using NWC Health Check
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.
/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.
Re: Monitoring Bandwidth using NWC Health Check
I have checked out this plugin as well.
You should be able to check the interface usage:
The other checks described on the example page, memory usage and cpu load are not working very 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>
Rob Hassing
-
- Posts: 20
- Joined: Tue Jun 02, 2020 3:51 pm
Re: Monitoring Bandwidth using NWC Health Check
But how do i have to integrate it into nagios?
Re: Monitoring Bandwidth using NWC Health Check
Edit /usr/local/nagios/etc/resource.cfg and add the your password
Add the config to nagios:
Add the command to your command file:
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.
Code: Select all
$USER4$=fritzbox-password
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
}
Code: Select all
define command{
command_name check_fritz
command_line $USER1$/check_nwc_health --hostname $HOSTADDRESS$ --port $ARG1$ --mode $ARG2$ --community $USER4$
}
Make sure the nagios user is able to write in there.
Rob Hassing
-
- Posts: 20
- Joined: Tue Jun 02, 2020 3:51 pm
Re: Monitoring Bandwidth using NWC Health Check
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 ?
Make sure the nagios user is able to write in there.[/quote]
How will i check this ?
-
- Posts: 20
- Joined: Tue Jun 02, 2020 3:51 pm
Re: Monitoring Bandwidth using NWC Health Check
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)
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)
-
- Posts: 20
- Joined: Tue Jun 02, 2020 3:51 pm
Re: Monitoring Bandwidth using NWC Health Check
I´m sorry.
I`m one step closer to finish
The script is running in nagios.
but it says:
https://ibb.co/pbYWkHn
I`m one step closer to finish
The script is running in nagios.
but it says:
https://ibb.co/pbYWkHn
-
- Posts: 20
- Joined: Tue Jun 02, 2020 3:51 pm
Re: Monitoring Bandwidth using NWC Health Check
Hello again
The script is running.
How can i change the output from bis/s to Mbit/s?
Greets
The script is running.
How can i change the output from bis/s to Mbit/s?
Greets
Re: Monitoring Bandwidth using NWC Health Check
With the option -units MB it should be possible to change the output.silentnoise wrote:Hello again
The script is running.
How can i change the output from bis/s to Mbit/s?
Greets
Rob Hassing