inbound and outbound Byte count

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
MelsStudios
Posts: 19
Joined: Thu May 07, 2020 9:28 am

inbound and outbound Byte count

Post by MelsStudios »

Hello !

We need to evaluate the traffic on a serveur for a period of time.

we would like to measure the byte count of traffic to get an estimate of the total byte countr for a month.


I have ncpa agent installed on my windows server, I get some inbound and outbound trafic.

I went on a graph, clicked on the 3 bars and downloaded the xml or csv file but i am not sure how I can select a specific period of time.

would you guys have a suggestion how I could do it ?

Thank you !
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: inbound and outbound Byte count

Post by ssax »

There isn't currently a report that will show you this, you could run this command to access the data:
- Change the HOSTNAME/SERVICENAME to what it is on the filesystem (do it for both the inbound and the outbound RRDs

Code: Select all

rrdtool graph dummy -s -1month -e now DEF:test=/user/local/nagios/share/perfdata/HOSTNAME/SERVICENAME.rrd:1:AVERAGE PRINT:test:AVERAGE:'average - %.0lf'
MelsStudios
Posts: 19
Joined: Thu May 07, 2020 9:28 am

Re: inbound and outbound Byte count

Post by MelsStudios »

Thanks for your reply.

We would be looking for the sum of that data for a month, not the average..

would it be possible with rrdtool ?

Thanks you
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: inbound and outbound Byte count

Post by ssax »

According to this you should be able to:

http://rrdtool.vandenbogaerdt.nl/total.php

What is the output of these commands against your RRD?

Code: Select all

rrdtool graph dummy -s -1month -e now DEF:ds0=/usr/local/nagios/share/perfdata/HOSTNAME/SERVICENAME.rrd:1:AVERAGE VDEF:ds0total=ds0,TOTAL PRINT:ds0total:"Total %lf"

Code: Select all

rrdtool graph dummy -s -1month -e now DEF:ds0=/usr/local/nagios/share/perfdata/HOSTNAME/SERVICENAME.rrd:1:AVERAGE VDEF:ds0average=ds0,AVERAGE CDEF:ds0modified=ds0,UN,ds0average,ds0,IF VDEF:ds0total=ds0modified,TOTAL PRINT:ds0total:"Total %lf"
MelsStudios
Posts: 19
Joined: Thu May 07, 2020 9:28 am

Re: inbound and outbound Byte count

Post by MelsStudios »

Code: Select all

rrdtool graph dummy -s -1month -e now DEF:ds0=/usr/local/nagios/share/perfdata/HOSTNAME/SERVICENAME.rrd:1:AVERAGE VDEF:ds0total=ds0,TOTAL PRINT:ds0total:"Total %lf"
0x0
Total 503343,656667

Code: Select all

rrdtool graph dummy -s -1month -e now DEF:ds0=/usr/local/nagios/share/perfdata/HOSTNAME/SERVICENAME.rrd:1:AVERAGE VDEF:ds0average=ds0,AVERAGE CDEF:ds0modified=ds0,UN,ds0average,ds0,IF VDEF:ds0total=ds0modified,TOTAL PRINT:ds0total:"Total %lf"
0x0
Total 5536780,223333

It looks like it is working,
I don't understand the difference between those 2 commands though.

The outpout is in bytes, right ?

Thanks again.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: inbound and outbound Byte count

Post by ssax »

Hmm, I'm not really sure what the differences are based on that page, I'm also not sure which is proper. What does your current bandwidth checks show for it?

The data should be in octets. So I think the raw query would show octets and need to be converted into whatever you want from there.
MelsStudios
Posts: 19
Joined: Thu May 07, 2020 9:28 am

Re: inbound and outbound Byte count

Post by MelsStudios »

Hi,

Currently Inbound is Bytes_recv was 2.02 MB/s.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: inbound and outbound Byte count

Post by ssax »

I'm not sure either of those is proper, they aren't really adding up based on the info that link provided the output should be in octets, so in order to get octets into Mb you need to multiply it by 8 and then divide by 1000000. When doing that with your numbers they are small I don't think either of them are correct. You could reach out to the RRDtool devs or the guy who wrote that article and see if they can provide any insight but I'm out of ideas given existing functionality.