User Tools Config

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
dfmco
Posts: 257
Joined: Wed Dec 04, 2013 11:05 am

User Tools Config

Post by dfmco »

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.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: User Tools Config

Post by ssax »

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!
dfmco
Posts: 257
Joined: Wed Dec 04, 2013 11:05 am

Re: User Tools Config

Post by dfmco »

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.
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: User Tools Config

Post by ssax »

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/A ... ol/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/nag ... ios-XI.pdf

Read that and let us know if you have any questions.
dfmco
Posts: 257
Joined: Wed Dec 04, 2013 11:05 am

Re: User Tools Config

Post by dfmco »

Actions seems to be a perfect fit for what I am trying to do. Thanks! Please close the post.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: User Tools Config

Post by benjaminsmith »

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!
Locked