Plugin Creation

This forum is intended for the discussion of Nagios plugin development. Feature requests, patches, bug fixes, and all types of development-related discussions are welcome!

NOTE: The SourceForge.net nagiosplug-devel mailing list has been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Plugin Creation

Postby Acnologia » Sat Dec 30, 2017 5:10 pm

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.
Acnologia
 
Posts: 6
Joined: Mon Dec 18, 2017 6:42 am

Re: Plugin Creation

Postby dwhitfield » Tue Jan 02, 2018 5:26 pm

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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
dwhitfield
The Doctor
 
Posts: 4276
Joined: Wed Sep 21, 2016 10:29 am
Location: Nagios Enterprises, LLC

Re: Plugin Creation

Postby Acnologia » Wed Jan 03, 2018 6:07 pm

I'm trying to capture this info on Debian

Here is the result of ifconfig :

Image
Acnologia
 
Posts: 6
Joined: Mon Dec 18, 2017 6:42 am

Re: Plugin Creation

Postby kyang » Thu Jan 04, 2018 11:48 am

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'
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
kyang
Support Tech
 
Posts: 1167
Joined: Tue Jul 25, 2017 3:35 pm

Re: Plugin Creation

Postby Acnologia » Sat Jan 06, 2018 9:14 am

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)
Acnologia
 
Posts: 6
Joined: Mon Dec 18, 2017 6:42 am

Re: Plugin Creation

Postby kyang » Mon Jan 08, 2018 12:54 pm

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/
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
kyang
Support Tech
 
Posts: 1167
Joined: Tue Jul 25, 2017 3:35 pm

Re: Plugin Creation

Postby Acnologia » Tue Jan 09, 2018 8:04 am

Ok thanks. Last question, just to be clear. Ethernet packet of a NIC represents bytes it receives, right ?
Acnologia
 
Posts: 6
Joined: Mon Dec 18, 2017 6:42 am

Re: Plugin Creation

Postby kyang » Tue Jan 09, 2018 10:02 am

Correct, it would be in Bytes.

Did you have any more questions or are we okay to lock this up?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
kyang
Support Tech
 
Posts: 1167
Joined: Tue Jul 25, 2017 3:35 pm

Re: Plugin Creation

Postby Acnologia » Tue Jan 09, 2018 10:33 am

Nope, that's all. Thank you !
Acnologia
 
Posts: 6
Joined: Mon Dec 18, 2017 6:42 am

Re: Plugin Creation

Postby kyang » Tue Jan 09, 2018 10:41 am

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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
kyang
Support Tech
 
Posts: 1167
Joined: Tue Jul 25, 2017 3:35 pm


Return to Nagios Plugin Development

Who is online

Users browsing this forum: No registered users and 6 guests

cron