show traffic rate in packet per second

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
lisashan
Posts: 16
Joined: Tue Jan 13, 2015 4:11 pm

show traffic rate in packet per second

Post by lisashan »

is there a way to monitor interface traffic in pps(packet per second)?

for example, i am monitoring a cisco router

i tried using network switch/router wizard, it can only return me the traffic rate in bps/Bps

i also tried snmp wizard, however, it cannot automatically calculate the traffic rate, but returning me the total packet number it collected from OID.

could anyone help me out of here? i am open to any possible solution.

Thanks in advance,
Lisa
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: show traffic rate in packet per second

Post by slansing »

Do you have a specific OID which gives you that information? If so you could run the SNMP wizard against it to grab the table's query response in an integer. Your manual should have a list of OIDs, or Cisco would have them listed.
lisashan
Posts: 16
Joined: Tue Jan 13, 2015 4:11 pm

Re: show traffic rate in packet per second

Post by lisashan »

slansing wrote:Do you have a specific OID which gives you that information? If so you could run the SNMP wizard against it to grab the table's query response in an integer. Your manual should have a list of OIDs, or Cisco would have them listed.

right now, i am using OID: IF-MIB::ifInUcastPkts.4 = Counter32: 704774682

which implies the totall income packet from interface 4

but what i am looking for is the rate, not the total number.

the way i can think of to get the rate is using (Counter32 - Counter32_1_min_ago)/60

but i dont know how to do thsi on nagios.

Thanks,
Lisa
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: show traffic rate in packet per second

Post by scottwilkerson »

We don't have that built-in, but you could write your own custom plugin that saves the previous amounts and does the math, and add it to Nagios XI.
https://nagios-plugins.org/doc/guidelines.html
http://assets.nagios.com/downloads/nagi ... ios_XI.pdf

If you would like a plugin created, please contact [email protected] for a quote.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
lisashan
Posts: 16
Joined: Tue Jan 13, 2015 4:11 pm

Re: show traffic rate in packet per second

Post by lisashan »

scottwilkerson wrote:We don't have that built-in, but you could write your own custom plugin that saves the previous amounts and does the math, and add it to Nagios XI.
https://nagios-plugins.org/doc/guidelines.html
http://assets.nagios.com/downloads/nagi ... ios_XI.pdf

If you would like a plugin created, please contact [email protected] for a quote.

Thanks for your update, plugin should be a good idea.

i am also thinking of making a plugin/script like check_load for NRDP/NRDS, which can help me send data from my NRDS(like a linux computer) to NRDP every specific period. Is there any documenation about this? what the outpout data format should look like(can be accepted by NRDP)?

Thanks,
lisa
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: show traffic rate in packet per second

Post by slansing »

You can actually use the exact same plugins you would use with NRPE, or any other method. The difference here is that NRDS actually executes them on a cron, and then sends the data up to XI. You would want to follow these guidelines:

https://nagios-plugins.org/doc/guidelines.html#AEN200
lisashan
Posts: 16
Joined: Tue Jan 13, 2015 4:11 pm

Re: show traffic rate in packet per second

Post by lisashan »

slansing wrote:You can actually use the exact same plugins you would use with NRPE, or any other method. The difference here is that NRDS actually executes them on a cron, and then sends the data up to XI. You would want to follow these guidelines:

https://nagios-plugins.org/doc/guidelines.html#AEN200
Hi,

thanks for your reply,

ok let me go througt this problem:

i am able to add my plug/script in by adding python script under /usr/local/nagios/libexec + adding command + adding service, and now if i go to service status, i can see the service i added under localhost.

However, if i go to graph explorer, i select localhost, i cannot find the service i just added. which means i can not plot the service/plugin.

could you kindly give me some advice? the ultimate purpose is to plot, not just give me some word.

Thanks,
Lisa
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: show traffic rate in packet per second

Post by abrist »

Are you reporting performance data? What is a sample output of the check?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
lisashan
Posts: 16
Joined: Tue Jan 13, 2015 4:11 pm

Re: show traffic rate in packet per second

Post by lisashan »

abrist wrote:Are you reporting performance data? What is a sample output of the check?
the output of my script/plugin in as follow:

TRAFFIC RATE OK: is 296.0 pps

this is shown on service status page as:

A-interface Ok 19h 19m 1s 1/5 2015-02-03 10:36:59 TRAFFIC RATE OK: is 291.0 pps

how do i make 296.0 recognized by your graph function?

Thanks,
Lisa
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: show traffic rate in packet per second

Post by scottwilkerson »

Make your plugin outout this

Code: Select all

A-interface Ok 19h 19m 1s 1/5 2015-02-03 10:36:59 TRAFFIC RATE OK: is 291.0 pps|'packets'=291.0pps
adding
|'packets'=291.0pps

As per
https://nagios-plugins.org/doc/guidelines.html#AEN200
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked