Page 1 of 1

Plugin Creation

Posted: Sat Dec 30, 2017 5:10 pm
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.

Re: Plugin Creation

Posted: Tue Jan 02, 2018 5:26 pm
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?

Re: Plugin Creation

Posted: Wed Jan 03, 2018 6:07 pm
by Acnologia
I'm trying to capture this info on Debian

Here is the result of ifconfig :

Image

Re: Plugin Creation

Posted: Thu Jan 04, 2018 11:48 am
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'

Re: Plugin Creation

Posted: Sat Jan 06, 2018 9:14 am
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)

Re: Plugin Creation

Posted: Mon Jan 08, 2018 12:54 pm
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/

Re: Plugin Creation

Posted: Tue Jan 09, 2018 8:04 am
by Acnologia
Ok thanks. Last question, just to be clear. Ethernet packet of a NIC represents bytes it receives, right ?

Re: Plugin Creation

Posted: Tue Jan 09, 2018 10:02 am
by kyang
Correct, it would be in Bytes.

Did you have any more questions or are we okay to lock this up?

Re: Plugin Creation

Posted: Tue Jan 09, 2018 10:33 am
by Acnologia
Nope, that's all. Thank you !

Re: Plugin Creation

Posted: Tue Jan 09, 2018 10:41 am
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!