Views section: Newly added view does not display
Views section: Newly added view does not display
Nagios XI, version 5.4.13
After adding a new view:
- Nothing happens when clicking on the newly added view
- View doesn’t show up in the view rotation
Steps to repro:
1. Click on ‘Views’ --> “Add New View”
2. Enter title and URL and click submit
3. Under ‘My Views’, click on the new link that was added
After adding a new view:
- Nothing happens when clicking on the newly added view
- View doesn’t show up in the view rotation
Steps to repro:
1. Click on ‘Views’ --> “Add New View”
2. Enter title and URL and click submit
3. Under ‘My Views’, click on the new link that was added
Re: Views section: Newly added view does not display
I was not able to recreate the issue in Nagios XI 5.4.13. I added a new view:
and I can see if just fine. It is also included in the rotation.
What is the URL that you are using? Do you see any errors when you inspect the element in the browser (F12)?
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Views section: Newly added view does not display
No external link works. The screenshot is a test for www.google.com. It doesn't show anything except for a blank page.
You do not have the required permissions to view the files attached to this post.
Re: Views section: Newly added view does not display
After pressing F12. I see an error "The requested URL /nagios/views/www.google.com was not found on this server (see F12_error-2.png).
And also notice a java error on the debug screen (see F12_error-1.png).
You do not have the required permissions to view the files attached to this post.
Re: Views section: Newly added view does not display
Google won't work - it's a setting on their site. They don't allow loading iframes in the browser (as many other sites). Try adding 'https://www.nagios.com/'. Did this work?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Views section: Newly added view does not display
https://www.nagios.com/ worked.
Is there a way for me to check if a site will work in the Nagios XI view rotation (short of adding it and see what happens)?
Is there a way for me to check if a site will work in the Nagios XI view rotation (short of adding it and see what happens)?
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Views section: Newly added view does not display
No, you pretty much are going to have to trial/error.Phisith wrote:https://www.nagios.com/ worked.
Is there a way for me to check if a site will work in the Nagios XI view rotation (short of adding it and see what happens)?
I will note you need to add the full url including https:// otherwise XI thinks it is local and just a path on the nagios server.
Re: Views section: Newly added view does not display
@Phisith, you could use a php script to try to find out if you could use this website in Views.
Example php script (test.php):
The way you would use it is by running the following from the command line:
where you substitute <url> with the actual URL of the website. See below:
Hope this helps.
Example php script (test.php):
Code: Select all
#!/usr/bin/php
<?php
$url = $argv[1];
$header = get_headers($url, 1);
//echo $header["X-Frame-Options"];
if ((@$header["X-Frame-Options"] == "DENY") || (@$header["X-Frame-Options"] == "SAMEORIGIN") || (@$header["X-Frame-Options"] == "ALLOW-FROM")) {
echo "You can't use this website\n\r";
} else {
echo "Go ahead. You can use this website\n\r";
}
?>Code: Select all
php test.php <url>Code: Select all
[root@main-nagios-xi tmp]# php test.php https://www.npr.org
Go ahead. You can use this website
[root@main-nagios-xi tmp]# php test.php https://www.yahoo.com
You can't use this websiteBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Views section: Newly added view does not display
Nice! Thank you for the php script.
Re: Views section: Newly added view does not display
You are welcome! Can we close this topic?
Be sure to check out our Knowledgebase for helpful articles and solutions!