Adding services/plugins to exisitng hosts on Nagios XI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
majoradhd
Posts: 7
Joined: Wed Feb 05, 2020 7:23 pm

Adding services/plugins to exisitng hosts on Nagios XI

Post by majoradhd »

Hello Everyone,

I'm having trouble integrating nagios/otrs on our system.
We came to the conclusion that we are just going to use the Nagios XI API
to add command services to our OTRS.

Please do not post this link in attempt to help me: https://exchange.nagios.org/directory/P ... pl/details

Appreciate any help.
You do not have the required permissions to view the files attached to this post.
majoradhd
Posts: 7
Joined: Wed Feb 05, 2020 7:23 pm

Re: Adding services/plugins to exisitng hosts on Nagios XI

Post by majoradhd »

To be more detailed my team is trying to monitor open/closed RAW tickets from OTRS in the NAGIOS XI system
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Adding services/plugins to exisitng hosts on Nagios XI

Post by tgriep »

When you upload a plugin to the server, it does not create a command, you will have to do that by going to the Core COnfig Manager > Commands menu and create a command.
The simplest thing is to copy an existing command and edit the copy.

Run the plugin with the --help option, and it will show you the options to run it.

Code: Select all

/usr/local/nagios/libexec/check_otrs.pl --help

Code: Select all

/usr/local/nagios/libexec/check_otrs.pl plugin for Nagios check for new or open Tickets in OTRS
Copyright (c) 2008 Michael Glaess
Usage:
   -q (--queue)  Queue: Default: 3 entspricht Servicehotline
   -t (--type)   Type:  Default: 0 entspricht Neue Tickets
   -w (--warn)   Warning-Level, Default: 0
   -c (--crit)   Criticle-Level, Default: 2
   -v            Version
   -h (--help)   Help

Usage: /usr/local/nagios/libexec/check_otrs.pl
       /usr/local/nagios/libexec/check_otrs.pl -w 2 -c 3
       /usr/local/nagios/libexec/check_otrs.pl -t 1 -q 3 -w 2 -c 4
Example command name

Code: Select all

Check OTRS
Example command line

Code: Select all

$USER1$/check_otrs.pl -q $ARG1$ -t $ARG2$ -w $ARG3$ -c $ARG4$
Make it a check command and Activate it

Save it out and Apply the Config and you should have the command available.
Be sure to check out our Knowledgebase for helpful articles and solutions!
majoradhd
Posts: 7
Joined: Wed Feb 05, 2020 7:23 pm

Re: Adding services/plugins to exisitng hosts on Nagios XI

Post by majoradhd »

Thank you so much for your help :)
majoradhd
Posts: 7
Joined: Wed Feb 05, 2020 7:23 pm

Re: Adding services/plugins to exisitng hosts on Nagios XI

Post by majoradhd »

tgriep wrote:When you upload a plugin to the server, it does not create a command, you will have to do that by going to the Core COnfig Manager > Commands menu and create a command.
The simplest thing is to copy an existing command and edit the copy.

Run the plugin with the --help option, and it will show you the options to run it.

Code: Select all

/usr/local/nagios/libexec/check_otrs.pl --help

Code: Select all

/usr/local/nagios/libexec/check_otrs.pl plugin for Nagios check for new or open Tickets in OTRS
Copyright (c) 2008 Michael Glaess
Usage:
   -q (--queue)  Queue: Default: 3 entspricht Servicehotline
   -t (--type)   Type:  Default: 0 entspricht Neue Tickets
   -w (--warn)   Warning-Level, Default: 0
   -c (--crit)   Criticle-Level, Default: 2
   -v            Version
   -h (--help)   Help

Usage: /usr/local/nagios/libexec/check_otrs.pl
       /usr/local/nagios/libexec/check_otrs.pl -w 2 -c 3
       /usr/local/nagios/libexec/check_otrs.pl -t 1 -q 3 -w 2 -c 4
Example command name

Code: Select all

Check OTRS
Example command line

Code: Select all

$USER1$/check_otrs.pl -q $ARG1$ -t $ARG2$ -w $ARG3$ -c $ARG4$
Make it a check command and Activate it

Save it out and Apply the Config and you should have the command available.
I don't know if that that command-line is just an example but I tried using it and it did not work.
any thoughts?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Adding services/plugins to exisitng hosts on Nagios XI

Post by tgriep »

What is the error that you are receiving?
Be sure to check out our Knowledgebase for helpful articles and solutions!
majoradhd
Posts: 7
Joined: Wed Feb 05, 2020 7:23 pm

Re: Adding services/plugins to exisitng hosts on Nagios XI

Post by majoradhd »

I'm having specific problems with check_otrs.php any ideas?

Error_reporting (0) ;
Reporting 0 new/open tickets. This is the problem...
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Adding services/plugins to exisitng hosts on Nagios XI

Post by tgriep »

Are all of the arguments correct when you run the command?
Have you verified that the data exists in the MYSQL database?
Be sure to check out our Knowledgebase for helpful articles and solutions!
majoradhd
Posts: 7
Joined: Wed Feb 05, 2020 7:23 pm

Re: Adding services/plugins to exisitng hosts on Nagios XI

Post by majoradhd »

I figured it out!
Thank you for all your help :D
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Adding services/plugins to exisitng hosts on Nagios XI

Post by scottwilkerson »

majoradhd wrote:I figured it out!
Thank you for all your help :D
Great!

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked