Need help installing 3rd party community plugins

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.
Jacktivated
Posts: 33
Joined: Wed Nov 25, 2015 1:49 pm

Re: Need help installing 3rd party community plugins

Post by Jacktivated »

Box293 wrote:Have you seen this documentation?

https://assets.nagios.com/downloads/nag ... nters.html
Thanks a lot for the reply.

Yes I have seen that tutorial and found it helpful, but it outlines the steps taken to configure a plugin that's part of the Standard Nagios Plugin Distribution, as I discussed above. And while it gives some good direction, it is not complete and I would like a guided step-by-step for something beyond the standard plugin download and how to install some third party custom plugins. There is tons of info out there for installing plugins on Nagios XI, which I find funny, because it's pretty simple to do there, compared to core, where there's almost nothing.

For instance, I cannot get this check_printer plugin to work, which I need for monitoring our Ricoh printers...and it seems to be the best plugin out there for this that I've been able to find. But, first of all, it's written in German, which doesn't make it any easier, lol.

But beyond that, I don't know exactly what to put in the command.cfg and the printers.cfg files, for instance.

EXAMPLE:

COMMAND.CFG
define command{
command_name check_printer
command_line /usr/bin/php $USER1$/check_printer $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$
}

PRINTER.CFG:
define service{
use generic-ricoh ; Inherit values from a template
host_name Fiery-0517,COPBEN ; The name of the host the service is associated with
service_description Ricoh Status ; The service description
check_command check_printer!-C public ; The command used to monitor the service
normal_check_interval 10 ; Check the service every 10 minutes under normal conditions
retry_check_interval 1 ; Re-check the service every minute until its final/hard state is determined
}

** For the check_command, do I keep it as is (check_printer!-C public), or does it need to have the $ARG1$, $ARG2$, etc.?

I've also seen a config someone posted like this:
check_command check_printer!192.168.32.245!public!1!paper!1

Taken from this post:
https://www.reddit.com/r/nagios/comment ... r_to_work/

...This is the only info I was able to find on this plugin, but it is set up to make a new service per check, which is not at all what this plugin is capable of.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Need help installing 3rd party community plugins

Post by hsmith »

Do you mind if I close this topic since you opened one at https://support.nagios.com/forum/viewto ... 983#163031?
Former Nagios Employee.
me.
Jacktivated
Posts: 33
Joined: Wed Nov 25, 2015 1:49 pm

Re: Need help installing 3rd party community plugins

Post by Jacktivated »

hsmith wrote:Do you mind if I close this topic since you opened one at https://support.nagios.com/forum/viewto ... 983#163031?
Well, this topic started out as my needing help with how to install plugins, in general, but then I started another topic that was specifically just about the check_printer plugin to keep things simple and separate.

But, if you feel this one should be closed, that would be fine with me.
Jacktivated
Posts: 33
Joined: Wed Nov 25, 2015 1:49 pm

Re: Need help installing 3rd party community plugins

Post by Jacktivated »

hsmith wrote:Plugins will go inside of /usr/local/nagios/libexec on a normal installation of core.
The rest kind of depends on the plugin you are trying to install. Most of these can be copied and pasted.

We'll use this check_beer_time.sh plugin for example: https://exchange.nagios.org/directory/P ... sh/details

This is generally a link to their site(dropbox in this case):
1.png
If you click on it, it will give you cleartext you can paste into a file inside of your Nagios machine. You'll need to make sure the file you create to put the text inside of is executable. chmod ug+x yourfilename

If the file is a binary, you could also perform a wget against the url:

wget somewebsitewithapluginonit.org/someplugin

Let me know if you have further questions, thank you!
I've decided to try to get your check_beer example to work for some plugin practice, but I'm having issues understanding where the config should take place. I have a list of .cfg files in my objects directory. I configure my windows servers in windows.cfg, and my cisco switch in switch.cfg. Where do I enter settings for beer? :)

Here are my objects
:
total 128
-rw-r--r-- 1 root root 8492 Dec 1 16:49 commands.cfg
-rw-rw-r--. 1 nagios nagios 2765 Dec 1 15:08 contacts.cfg
-rw-rw-r--. 1 nagios nagios 5375 Aug 27 14:02 localhost.cfg
-rw-rw-r--. 1 nagios nagios 13756 Dec 1 16:50 printer.cfg
-rw-r--r-- 1 root root 3027 Aug 31 11:17 snmpd.conf
-rw-rw-r--. 1 nagios nagios 4115 Nov 18 16:30 switch.cfg
-rw-rw-r--. 1 nagios nagios 14737 Dec 1 14:57 templates.cfg
-rw-rw-r--. 1 nagios nagios 3180 Aug 27 14:02 timeperiods.cfg
-rw-rw-r--. 1 nagios nagios 12734 Nov 18 16:52 windows.cfg
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Need help installing 3rd party community plugins

Post by hsmith »

Honestly, you can name it anything you want. For example, the ones for my personal webpage are all. something.mn.cfg You just need to make sure that they are defined in /usr/local/nagios/etc/nagios.cfg. I want to get a decent document wrote, but we've been extremely busy this week, more so than most..
Former Nagios Employee.
me.
Jacktivated
Posts: 33
Joined: Wed Nov 25, 2015 1:49 pm

Re: Need help installing 3rd party community plugins

Post by Jacktivated »

hsmith wrote:Honestly, you can name it anything you want. For example, the ones for my personal webpage are all. something.mn.cfg You just need to make sure that they are defined in /usr/local/nagios/etc/nagios.cfg. I want to get a decent document wrote, but we've been extremely busy this week, more so than most..
Ahhh...nagios.cfg. That's where the item needs to be referenced. That's what I was needing to know. Thanks.

And I appreciate you thinking of putting together some documentation. When I first began looking into this, I found some postings on other sites with people trying to learn more about installing additional plugins, too.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Need help installing 3rd party community plugins

Post by rkennedy »

Did you have any other questions at this point for 3rd party plugins or am I good to close this thread out?
Former Nagios Employee
Jacktivated
Posts: 33
Joined: Wed Nov 25, 2015 1:49 pm

Re: Need help installing 3rd party community plugins

Post by Jacktivated »

rkennedy wrote:Did you have any other questions at this point for 3rd party plugins or am I good to close this thread out?
I wouldn't mind keeping it open for now, if you don't mind. I still don't understand the general installation and configuration from beginning to end. I am waiting to see if someone can post a tutorial.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Need help installing 3rd party community plugins

Post by rkennedy »

I will leave this open for now then, please only respond if you have another question regarding plugins as it will notify us when you do.
Former Nagios Employee
Locked