show traffic rate in packet per second
show traffic rate in packet per second
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
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
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.
Re: show traffic rate in packet per second
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
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.
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.
Re: show traffic rate in packet per second
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
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
https://nagios-plugins.org/doc/guidelines.html#AEN200
Re: show traffic rate in packet per second
Hi,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
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
Re: show traffic rate in packet per second
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.
"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.
Re: show traffic rate in packet per second
the output of my script/plugin in as follow:abrist wrote:Are you reporting performance data? What is a sample output of the check?
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
Make your plugin outout this
adding
|'packets'=291.0pps
As per
https://nagios-plugins.org/doc/guidelines.html#AEN200
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|'packets'=291.0pps
As per
https://nagios-plugins.org/doc/guidelines.html#AEN200