how to create services of various OIDs of a mib file in one

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
alef1_nagiosxi
Posts: 7
Joined: Thu Apr 02, 2015 4:27 am

how to create services of various OIDs of a mib file in one

Post by alef1_nagiosxi »

Hi!

I am using Nagios XI 2014R2.6 on below mentioned platform
[root@amtnagios2 ~]# uname -mrs
Linux 2.6.32-504.el6.x86_64 x86_64
[root@amtnagios2 ~]# cat /etc/issue
CentOS release 6.6 (Final)

I would like to understand how to create services of various OIDs of a mib file in one shot.

Please guide me.

Thanks
Rajesh
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: how to create services of various OIDs of a mib file in

Post by jdalrymple »

Custom plugin... it's possible someone has already written one for you.

Here's a great example of one:
http://exchange.nagios.org/components/c ... 5&cf_id=35
alef1_nagiosxi
Posts: 7
Joined: Thu Apr 02, 2015 4:27 am

Re: how to create services of various OIDs of a mib file in

Post by alef1_nagiosxi »

This is a plugin link, but how to use it?

Can u please provide me a link with step by step procedure..

Thanks
Rajesh
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: how to create services of various OIDs of a mib file in

Post by tmcdonald »

We have a doc already written up for that:

http://assets.nagios.com/downloads/nagi ... ios-XI.pdf
Former Nagios employee
alef1_nagiosxi
Posts: 7
Joined: Thu Apr 02, 2015 4:27 am

Re: how to create services of various OIDs of a mib file in

Post by alef1_nagiosxi »

Hi,

Firstly...
The above document explains, to add services one by one, I want to add all services defined in a mib file in one shot. Is it possible to add all services for all oids defined in a mib file. if possible please provide me the document for the same. This is very helpful if possible.

2ndly I would like to know..
How we can add Linux snmp host with different snmp port using config wizard?

Thanks
Rajesh
Mob. 9986499201
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: how to create services of various OIDs of a mib file in

Post by jdalrymple »

To answer your question regarding the SNMP port number on the Linux SNMP Monitoring Wizard, that is just not an option in the wizard. You can approach that problem in 2 different ways:

1) Create the checks using the wizard then go back into each individual service and specify the alternate port number through CCM
2) Alternatively use the SNMP walk or just plan SNMP wizard to create your services, these wizards allow you to change the port number

The other question - Nagios base configuration does not have a single plugin to monitor multiple OIDs. Nagios design philosophy is that each OID represents a service and as such it breaks them out that way. If you want to aggregate these seperate OIDs into a single service such as a check like "check_all_interfaces_are_up" you will have to do some custom work or as I mentioned look on the exchange; odds are someone has already done what you want.

This is just one example -there are thousands and thousands of plugins available on the Exchange that might provide the functionality you want.
alef1_nagiosxi
Posts: 7
Joined: Thu Apr 02, 2015 4:27 am

Re: how to create services of various OIDs of a mib file in

Post by alef1_nagiosxi »

Thanks.

I am ok with your suggestions for my first query of Linux snmp server with different port.

But for my second query, I would like to clarify that, I don't want to add all oids in a single service, as I also very much aware that each oid is a different service. My requirement is add all services for different oids defined in a mib file in one go not one by one. Like config wizards does for us, config wizards add multiple oids/services in one shot. So please suggest something related to this customization.

Thanks
Rajesh
Mob:9986499201
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: how to create services of various OIDs of a mib file in

Post by jdalrymple »

alef1_nagiosxi,

In what way does the SNMP Walk wizard not achieve this goal? Just put whatever top level OID you want into the "OID:" field?
alef1_nagiosxi
Posts: 7
Joined: Thu Apr 02, 2015 4:27 am

Re: how to create services of various OIDs of a mib file in

Post by alef1_nagiosxi »

Ok this is fine and working. Great thanks.

Now I have another issue that is
COMMAND: /usr/local/nagios/libexec/check_snmp -H 192.168.50.170 -C public -P 2c -o .1.3.6.1.4.1.45390.1.3.1.2.0
OUTPUT: SNMP OK - 51000639 | iso.3.6.1.4.1.45390.1.3.1.2.0=51000639c

This output comes with c and makes value alphanumeric and graphical representations get disturbed.

Can you please help me why this is happening and how I can solve this?

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

Re: how to create services of various OIDs of a mib file in

Post by abrist »

This is a counter, and honestly, will most likely overflow the buffer as it grows. A custom warpper script could strip it from the output (or a sed at the end of the command).
What does this oid represent?
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.
Locked