Plugin Creation

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Acnologia
Posts: 6
Joined: Mon Dec 18, 2017 6:42 am

Plugin Creation

Post by Acnologia »

Hello !

I'd like to create a plugin calculating the average size of Ethernet packets received by one NIC. But I don't know what MIB (snmp) is doing that.

Can you help me please ?

Thank you.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Plugin Creation

Post by dwhitfield »

The best thing to do is probably to contact your NIC manufacturer. That said, on what OS are you trying to capture this info?

What's the output of ifconfig? Can you provide any other information about the NIC?
Acnologia
Posts: 6
Joined: Mon Dec 18, 2017 6:42 am

Re: Plugin Creation

Post by Acnologia »

I'm trying to capture this info on Debian

Here is the result of ifconfig :

Image
kyang

Re: Plugin Creation

Post by kyang »

So you're creating a plugin that will use SNMP to calculate the average size of Ethernet packets for one NIC?

Maybe take a look at the IF-MIB --> This is a summary of information regarding objects below the interfaces MIB object
http://www.net-snmp.org/docs/mibs/interfaces.html

Are you only creating this plugin for that specific NIC? I'm not sure. Any other information about it?

If you don't know, you can install the pciutils package on Debian.

Code: Select all

sudo apt-get install pciutils

Code: Select all

lspci | egrep -i --color 'network|ethernet'
Acnologia
Posts: 6
Joined: Mon Dec 18, 2017 6:42 am

Re: Plugin Creation

Post by Acnologia »

kyang wrote:So you're creating a plugin that will use SNMP to calculate the average size of Ethernet packets for one NIC?*

Maybe take a look at the IF-MIB --> This is a summary of information regarding objects below the interfaces MIB object
http://www.net-snmp.org/docs/mibs/interfaces.html

Are you only creating this plugin for that specific NIC?** I'm not sure. Any other information about it?***

If you don't know, you can install the pciutils package on Debian.

Code: Select all

sudo apt-get install pciutils

Code: Select all

lspci | egrep -i --color 'network|ethernet'
* Exactly
** No, not necessarily, but I want the result of ONE NIC, not all of them :)

*** Here :
Image
- (rev 01)
- PCI Express Gigabit Ethernet Controller (rev 0c)
kyang

Re: Plugin Creation

Post by kyang »

Thanks, I get what you mean.

One thing to keep in mind is the scope of this forum is to point you in the right direction into solving a Nagios related issue.

Something like this would be custom development, in which we do offer if you want to email our sales team to get a quote --> sales@nagios.com

Otherwise, most of the time this is a battle you will have to solve.

If it were my problem, I would keep looking at how SNMP grabs this information, or search for a plugin that does something similar and changing it to your needs.

The Nagios Exchange is a great place to find other plugins.
https://exchange.nagios.org/
Acnologia
Posts: 6
Joined: Mon Dec 18, 2017 6:42 am

Re: Plugin Creation

Post by Acnologia »

Ok thanks. Last question, just to be clear. Ethernet packet of a NIC represents bytes it receives, right ?
kyang

Re: Plugin Creation

Post by kyang »

Correct, it would be in Bytes.

Did you have any more questions or are we okay to lock this up?
Acnologia
Posts: 6
Joined: Mon Dec 18, 2017 6:42 am

Re: Plugin Creation

Post by Acnologia »

Nope, that's all. Thank you !
kyang

Re: Plugin Creation

Post by kyang »

Sounds good! I'll be closing this thread!

If you have any more questions, feel free to create another thread.

Thanks for using the Nagios Support Forum!
Locked