Page 1 of 1

Ubuntu / Nagios plugin question...

Posted: Thu Dec 19, 2013 12:26 pm
by VincentF
Hi all,

I am relatively new to Ubuntu / Nagios (though I have a working understanding of both). I am currently working on a proposal whereby I am looking to utilize Nagios for our front-of-the-house workstations in a very large school district. By doing a ton of research on the web along with the help of some Youtube'ers, I was able to not only fully configure Nagios (3.2.3) but also configured hosts & hostgroups for nagios to check.

I would like to take it a step further, however, by monitoring the last end point switch to the PC I am monitoring. I see that their are plugins that can be incorporated into Nagios to allow various administrative functions - including switch / port uptime. I have tried searching the web for walkthroughs on how to configure Nagios to do so, however, they are all a little too technical for me and was looking for something in more lamens terms.

Can someone provide a quick & dirty way how to not only "install" a plugin into Nagios, but to utilize it as well.

Thanks in advance,
Vincent

Re: Ubuntu / Nagios plugin question...

Posted: Thu Dec 19, 2013 4:11 pm
by tmcdonald
Depending on how you installed Nagios, your directory structure might be a bit different, but basically all you need to do is download the plugin (typically a perl, python, or bash script) to the plugins directory to install it. On some systems this might be "/usr/local/nagios/plugins" but yours may be different. After that, you will want to look at its usage, typically by running it with just "-h" for the help output. From there you should be able to figure out which switches you need, and then it's just like any other service. If all else fails, Google is your friend.

Re: Ubuntu / Nagios plugin question...

Posted: Fri Dec 20, 2013 7:43 am
by VincentF
Thanks so much for the reply.

Like I had mentioned earlier, i'm relatively new to Linux so im going to have to do some digging around and hope to find a more exact walkthrough to get setup. I'll be back if / when I find out...

Best,
Vincent

Re: Ubuntu / Nagios plugin question...

Posted: Fri Dec 20, 2013 10:10 am
by FTL
Vincent - what exactly do you want to monitor on the switch?

Do you just want to ping it to make sure its up?
Do you actually want port/bandwidth information from the switch/ports?

Depending on what you want to do will depend on what plugin you use.

Once you can provide this information we will be able to help you more.

Take a look in /usr/local/nagios/libexec - this is where you will find all of the plugins! (and also where any future plugins will be put or need to go)
If you installed from the repository and not from source i believe you will find them in /usr/local/nagios3/libexec

Dont be afraid to ask what you might percieve as stupid questions - this is how we all learn and can then pass on the knowledge to others in the future
We were all new to Nagios once! :)

Re: Ubuntu / Nagios plugin question...

Posted: Fri Dec 20, 2013 10:20 am
by VincentF
FTL wrote:Vincent - what exactly do you want to monitor on the switch?

Do you just want to ping it to make sure its up?
Do you actually want port/bandwidth information from the switch/ports?

Depending on what you want to do will depend on what plugin you use.

Once you can provide this information we will be able to help you more.

Take a look in /usr/local/nagios/libexec - this is where you will find all of the plugins! (and also where any future plugins will be put or need to go)
If you installed from the repository and not from source i believe you will find them in /usr/local/nagios3/libexec

Dont be afraid to ask what you might percieve as stupid questions - this is how we all learn and can then pass on the knowledge to others in the future
We were all new to Nagios once! :)
First of all FTL - Thank you. I am trying not to be much of a bother to anyone if I dont have too - Especially being a n00b!
Having said that - I'd like to just know if the switch is up (via ping) as well as monitoring one particular port on that switch (where the local server is connected to). As far as any other features, I don't care much for them (for now).

With respect to the /usr/local/nagios/libexec folder - I am running nagios 3. There are NO such folders as that. Also, in going over the nagios.cfg file, I see the 4 external folders listed:
# You can specify individual object config files as shown below:
#cfg_file=/etc/nagios3/objects/commands.cfg
#cfg_file=/etc/nagios3/objects/contacts.cfg
#cfg_file=/etc/nagios3/objects/timeperiods.cfg
#cfg_file=/etc/nagios3/objects/templates.cfg

NONE of these folders exist. Of course I know I can create them, however, my thing is why even list them as options if they aren't even initially installed?

Thanks once again!

Re: Ubuntu / Nagios plugin question...

Posted: Fri Dec 20, 2013 10:38 am
by FTL
Right first things first lets find you Nagios installation folder.

If Nagios3 then you installed from the repository, correct?

You shouldnt have to install these files manually, they should be created as part of the install.

Where is the path you found the nagios.cfg file?

Nagios has a built in plugin that can monitor things via ping - conveniently its called - check_ping - you will find this in the libexec folder of the nagios installtion (hopefully you have found this now)

check out this page here which has a great simple tutorial on setting up a switch to minitored in Nagios

http://www.thegeekstuff.com/2008/11/how ... ng-nagios/

Setup the ping one first to get used to adding hosts and services in the config files - as ping is one of the easiest to setup with the parameters.

Re: Ubuntu / Nagios plugin question...

Posted: Fri Dec 20, 2013 10:45 am
by slansing
Thanks for the help FTL!