Page 1 of 2
XI2024 | MyTools
Posted: Wed Dec 06, 2023 3:35 pm
by snapier3
All URLs prefixed with "https://<nagiosserver>/nagiosxi/tools" and all entries in the URL field are passed URL encoded when clicked
In order for the URLs entered to work you're only allowed to reference files in the "/usr/local/nagiosxi/html/tools" path
What is the proper formatting for using external URLs as tools with this feature.
Re: XI2024 | MyTools
Posted: Wed Dec 06, 2023 5:13 pm
by kvang
Hello Snapier3,
The tools page is created to offer quick access to utilities on your Nagios web server. You can choose between using full URL links or relative links. Regarding external links beyond your Nagios web server, you should be able to utilize full URL links aswell. Some full URL links may or may not work from my experience. Check out
this documentation for more information.
To guarantee proper display of Nagios XI links on the tools page, adhere to these steps:
1) Go to any side menu on the NagiosXI webserver.
2) Right-click it, and choose "Copy link address" from the context menu.
3) Access your tool configuration and click "Add Tool".
4) Paste the copied link into the designated field and click "Save".
5) Refresh the tools page or click the tools tab again.
6) Your newly added tool should now appear on the tool's side menu. Test it to ensure it displays as expected.
Best regards,
Re: XI2024 | MyTools
Posted: Wed Dec 06, 2023 5:51 pm
by snapier3
It's currently not working as described in the docs.
XI 2024R1
Re: XI2024 | MyTools
Posted: Thu Dec 07, 2023 10:39 am
by snapier3
The MyTools configuration is broken.
As per the docs, External URL
google-tool.PNG
google-link.PNG
URL Encoding of local file paths
absolute-uri.PNG
url-encode-everything.PNG
ope!
Re: XI2024 | MyTools
Posted: Thu Dec 07, 2023 11:26 am
by bbahn
If you want to use an external URL as a tool, you must precede it with http:// or https://. This will inform the tools component that you're trying to access a website. As for accessing local files, I believe you must put them inside of your /usr/local/nagiosxi/html directory or a subdirectory of that directory as this will allow them to be accessed through http://[nagiosxi-ip/hostname]/nagiosxi
Re: XI2024 | MyTools
Posted: Thu Dec 07, 2023 12:27 pm
by snapier3
Tool Configuration
Add Link to NRDP
http://nagiosserver/NRDP <-- default Port 80, non forced SSL
In this instance XI2024R1 Server
Still Broken:
The URL encoded form value is appended to the tools URL.
nrdp-tool-404.PNG
Re: XI2024 | MyTools
Posted: Thu Dec 07, 2023 12:59 pm
by snapier3
Nothing that exists outside of the folder "/usr/local/nagiosxi/html/tools/" will render properly within the tools component.
URLs <-- Fail
Files on the XI instance above or below the absolute path "/usr/local/nagiosxi/html/tools/" <-- Fail
Configured Tool
tools-subfolder-entry.PNG
The Nagios Server File Struct
tools-subfolder.PNG
XI Interface for Tool
tools-subfolder-404.PNG
Validated service of static HTML
but-i-do-exist.PNG
--SN
Re: XI2024 | MyTools
Posted: Thu Dec 07, 2023 4:51 pm
by kvang
Hello snapier3,
In reference to NRDP, simply input /nrdp/ into the entry field; there's no requirement for an IP address.
Concerning other external links, they should function with the full URL.
However, it's crucial to note that the site owner must permit embedding for it to work. This is why Google did not work for you, as they do not allow embedding.
For instance, if you use
https://chat.openai.com, it will work.
Also in reference to /usr/local/nagiosxi/html/tools/
Have you followed the initial instructions I provided? If you have, please give it a try and check if it works. You shouldn't be restricted to HTML/tools for this process.
For example, give this a try
Code: Select all
http://yourXI-IP-Address/nagiosxi/includes/page-home-main.php
The homepage should now be accessible as a tool. Hope this makes sense and helps!
Re: XI2024 | MyTools
Posted: Thu Dec 07, 2023 5:14 pm
by snapier3
Embedding foobar was a good theory but, didn't work either.
Same outcome with the URL.
nope-openai.PNG
I have tried using absolute paths to the include shares and they don't work either.
Core of the problem is, it's appending the URL-Encoded value of the form field to the end of the base path for the component as the link to load in the new tab loaded outside XI.
Re: XI2024 | MyTools
Posted: Fri Dec 08, 2023 2:00 am
by kg2857
For the web server on the nagios host to serve local files, they have to be under documentroot (with a subdir as desired). This is just normal web server stuff. The permissions on the local dir have to allow the web server to access the page. /usr/local/nagios has never worked for me because it isn't defined in the local web server config. /var/www/html/... has.
To open an external page, make sure the URL is valid and can be fetched w/ wget/curl from the nagios host (same for local files).
The idea is regardless, the URL has to be valid from the nagios host.