User Tools Config

This board serves as an open discussion and support collaboration point for Nagios XI. NOTE: Nagios XI customers should use the Customer Support forum to obtain expedited support.

User Tools Config

Postby dfmco » Mon Apr 15, 2019 11:10 am

Can this be a Linux command? Does it need to be a Python or Perl script? If a command, can we send a command line parameter as a variable or send the host IP of the alert source to that command line. I would like to do this: When an alert hits, I would like that alert have the IP captured and send it to an ansible command line as the host parameter. This would happen when the user when to the user tools section and ran the tool that pulls logs for instance.
dfmco
 
Posts: 186
Joined: Wed Dec 04, 2013 11:05 am

Re: User Tools Config

Postby ssax » Mon Apr 15, 2019 4:23 pm

Please explain in detail (include screenshots if you can) of what you are talking about, we're having a hard time deciphering what exactly you're referring to.

It sounds possible but I don't know what "User Tools Config" is.

Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
ssax
Dreams In Code
 
Posts: 3920
Joined: Wed Feb 11, 2015 12:54 pm

Re: User Tools Config

Postby dfmco » Mon Apr 15, 2019 4:42 pm

I can see a way to add a tool via a url:
Add Common Tool
Use this form to define a new tool that can be quickly accessed from Nagios.

What I am trying to figure out is what kind of tools can be used and how they can be used.

What I would like to do is make tools in Ansible, Python and/or Bash and publish to the Nagios server. I would like to know if there is any ability to pass variables back and forth to these tools to and from Nagios. Here are some examples of things that would be useful.

An Ansible job that can connect to a Cisco router and return stats and logs.
A Python script that can filter logs from a router or firewall and present information to a user.
A job that runs when receiving an SNMP trap that passes the information from the Trap to get more information from the router (like logs or interface counters).

Because only URL is listed in the "add tool" page, my guess is that these tools can only be started from a URL. Could that URL be an API call? If so, how could I pass variables to that API call so that the tool can be generic enough to run for any host?

Can I run other commands from the Common Tools section that are not URL based like a Bash script or Ansible command that I have to set up in the CLI as opposed to the GUI? I am trying to understand how flexible and powerful the Common Tool function is and how to use effectively.
Attachments
Common tools 2019-04-15_163022.png
Screenshot as requested
Common tools 2019-04-15_163022.png (9.52 KiB) Viewed 74 times
dfmco
 
Posts: 186
Joined: Wed Dec 04, 2013 11:05 am

Re: User Tools Config

Postby ssax » Wed Apr 17, 2019 8:57 am

Correct, they are just URL links, you could technically add any type of URL you'd like, whether that be an API call or some other local web page that calls a local script, it's entirely at your discretion. You can write components that integrate into the tools menu, you can see box293's Performance Data Tool here as an example:

https://exchange.nagios.org/directory/Addons/Components/Performance-Data-Tool/details

But I don't think the Tools menu is what you're looking for, I'd probably use the Actions component, it's likely do most of what you want, see here:

https://assets.nagios.com/downloads/nagiosxi/docs/How-To-Use-The-Actions-Component-in-Nagios-XI.pdf

Read that and let us know if you have any questions.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
ssax
Dreams In Code
 
Posts: 3920
Joined: Wed Feb 11, 2015 12:54 pm

Re: User Tools Config

Postby dfmco » Wed Apr 17, 2019 11:20 am

Actions seems to be a perfect fit for what I am trying to do. Thanks! Please close the post.
dfmco
 
Posts: 186
Joined: Wed Dec 04, 2013 11:05 am

Re: User Tools Config

Postby benjaminsmith » Wed Apr 17, 2019 1:00 pm

Actions seems to be a perfect fit for what I am trying to do. Thanks! Please close the post.

Great. Closing. Thank your for using the Nagios Support Forum.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
benjaminsmith
 
Posts: 726
Joined: Wed Aug 22, 2018 4:39 pm


Return to Nagios XI

Who is online

Users browsing this forum: 2iretegas, Google [Bot] and 13 guests