nagios status map doesn't draw links

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
blackcypher
Posts: 8
Joined: Tue Oct 30, 2018 10:51 am

nagios status map doesn't draw links

Post by blackcypher »

Hello everyone,

I recently updated nagios core from 4.3.1 to 4.4.2 and have had to to do many tweaks to fit the web interface like the old one.
But I encouter a problem with the new map, I was unable to save the changes in the web interface each time I set the cgi.cfg to default_statusmap_layout=0, so I edited the link in the side.php to have a default frame. But unfortunately since the update when I use user supplied as layout method, the links between the hosts disappears and I just have hosts dispersed all over although they have 2d_cords and parents defined. When using the legacy map I have no problem with links.

How can I arrange that please ?

Thanks in advance
distrib used : Red Hat Enterprise Linux Server release 6.10 (Santiago)
Nagios' version : 4.4.2
Last edited by blackcypher on Fri Feb 08, 2019 4:27 am, edited 1 time in total.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: nagios status map doesn't draw links

Post by cdienger »

No changes have been made to the default cgi.cfg but side.php has been modified, correct? Does the side.php modification use the "nolinks" option which can be used to disable link display(https://support.nagios.com/kb/print-725.html). Please PM us a copy of these files as well as a copy of the contents found in /usr/local/nagios/etc/ directory if this doesn't help resolve the issue.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
blackcypher
Posts: 8
Joined: Tue Oct 30, 2018 10:51 am

Re: nagios status map doesn't draw links

Post by blackcypher »

cdienger wrote:No changes have been made to the default cgi.cfg but side.php has been modified, correct? Does the side.php modification use the "nolinks" option which can be used to disable link display(https://support.nagios.com/kb/print-725.html). Please PM us a copy of these files as well as a copy of the contents found in /usr/local/nagios/etc/ directory if this doesn't help resolve the issue.
Thanks for your reply,

Unforntunately the KB file wasn't able to help resolve the issue, I had gone through it over and over before posting about my issue.
The only modification done in the cgi.cfg file is the authorization section for users and setting the value of the default map layout.
In the Side.php file I didn't set the nolink option to true I just placed the arguments in the map link.

This is the content of my side.php

Code: Select all

<?php
include_once(dirname(__FILE__).'/includes/utils.inc.php');

$this_version = '4.4.2';
$link_target = 'main';
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>

<head>
<meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
<title>Nagios Core</title>
<link href="stylesheets/common.css?<?php echo $this_version; ?>" type="text/css" rel="stylesheet">
</head>


<body class='navbar'>

<div class="navbarlogo">
	<a href="https://www.nagios.org" target="_blank"><img src="images/sblogo.png" height="39" width="140" border="0" alt="Nagios" /></a>
</div>

<div class="navsection">
	<div class="navsectiontitle">General</div>
	<div class="navsectionlinks">
		<ul class="navsectionlinks">
			<li><a href="main.php" target="<?php echo $link_target;?>">Home</a></li>
			<li><a href="https://go.nagios.com/nagioscore/docs" target="_blank">Documentation</a></li>
		</ul>
	</div>
</div>

<div class="navsection">
	<div class="navsectiontitle">Current Status</div>
	<div class="navsectionlinks">
		<ul class="navsectionlinks">
			<li><a href="<?php echo $cfg["cgi_base_url"];?>/tac.cgi" target="<?php echo $link_target;?>">Tactical Overview</a></li>
			<li><a href="<?php echo $cfg["cgi_base_url"];?>/statusmap.cgi?host=all" target="<?php echo $link_target;?>">Map</a></li>
			<li><a href="map.php?host=all&layout=0&dimensions=fixed" target="<?php echo $link_target;?>">Map Nouveau Design </a></li>
			<li><a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?hostgroup=all&style=hostdetail" target="<?php echo $link_target;?>">Hosts</a></li>
			<li><a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?host=all" target="<?php echo $link_target;?>">Services</a></li>
			<li>
				<a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?hostgroup=all&style=overview" target="<?php echo $link_target;?>">Host Groups</a>
				<ul>
					<li><a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?hostgroup=all&style=summary" target="<?php echo $link_target;?>">Summary</a></li>
					<li><a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?hostgroup=all&style=grid" target="<?php echo $link_target;?>">Grid</a></li>
				</ul>
			</li>
			<li>
				<a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?servicegroup=all&style=overview" target="<?php echo $link_target;?>">Service Groups</a>
				<ul>
					<li><a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?servicegroup=all&style=summary" target="<?php echo $link_target;?>">Summary</a></li>
					<li><a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?servicegroup=all&style=grid" target="<?php echo $link_target;?>">Grid</a></li>
				</ul>
			</li>
			<li>
				<a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?host=all&servicestatustypes=28" target="<?php echo $link_target;?>">Problems</a>
				<ul>
					<li><a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?host=all&servicestatustypes=28" target="<?php echo $link_target;?>">Services</a> (<a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?host=all&type=detail&hoststatustypes=3&serviceprops=42&servicestatustypes=28" target="<?php echo $link_target;?>">Unhandled</a>)</li>
					<li><a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?hostgroup=all&style=hostdetail&hoststatustypes=12" target="<?php echo $link_target;?>">Hosts</a> (<a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?hostgroup=all&style=hostdetail&hoststatustypes=12&hostprops=42" target="<?php echo $link_target;?>">Unhandled</a>)</li>
					<li><a href="<?php echo $cfg["cgi_base_url"];?>/outages.cgi" target="<?php echo $link_target;?>">Network Outages</a></li>
				</ul>
			</li>
		</ul>
	</div>
	<div class="navbarsearch"> 
		<form method="get" action="<?php echo $cfg["cgi_base_url"];?>/status.cgi" target="<?php echo $link_target;?>"> 
			<fieldset> 
				<legend>Quick Search:</legend> 
				<input type='hidden' name='navbarsearch' value='1'> 
				<input type='text' name='host' size='15' class="NavBarSearchItem"> 
			</fieldset> 
		</form> 
	</div>	
	<div class="navbarsearch"> 
		<form method="get" action="<?php echo $cfg["cgi_base_url"];?>/search.cgi" target="<?php echo $link_target;?>"> 
			<fieldset> 
				<legend>Host Search:</legend> 
				<input type='hidden' name='search' value='host'> 
				<input type='text' name='host' size='15' class="NavBarSearchItem"> 
			</fieldset> 
		</form> 
	</div> 	
<div class="navsection">
	<div class="navsectiontitle">Reports</div>
	<div class="navsectionlinks">
		<ul class="navsectionlinks">
			<li><a href="<?php echo $cfg["cgi_base_url"];?>/avail.cgi" target="<?php echo $link_target;?>">Availability</a></li>
			<li>
				<a href="trends.html" target="<?php echo $link_target;?>">Trends</a>
				
			</li>
			<li><a href="<?php echo $cfg["cgi_base_url"];?>/history.cgi?host=all" target="<?php echo $link_target;?>">Alerts</a>
			<ul>
				<li><a href="<?php echo $cfg["cgi_base_url"];?>/history.cgi?host=all" target="<?php echo $link_target;?>">History</a></li>
				<li><a href="<?php echo $cfg["cgi_base_url"];?>/summary.cgi" target="<?php echo $link_target;?>">Summary</a></li>
				<li>
					<a href="histogram.html" target="<?php echo $link_target;?>">Histogram</a>
									</li>
			</ul>
			</li>
			<li><a href="<?php echo $cfg["cgi_base_url"];?>/notifications.cgi?contact=all" target="<?php echo $link_target;?>">Notifications</a></li>
			<li><a href="<?php echo $cfg["cgi_base_url"];?>/showlog.cgi" target="<?php echo $link_target;?>">Event Log</a></li>
		</ul>
	</div>
</div>

<div class="navsection">
	<div class="navsectiontitle">System</div>
	<div class="navsectionlinks">
		<ul class="navsectionlinks">
			<li><a href="<?php echo $cfg["cgi_base_url"];?>/extinfo.cgi?type=3" target="<?php echo $link_target;?>">Comments</a></li>
			<li><a href="<?php echo $cfg["cgi_base_url"];?>/extinfo.cgi?type=6" target="<?php echo $link_target;?>">Downtime</a></li>
			<li><a href="<?php echo $cfg["cgi_base_url"];?>/extinfo.cgi?type=0" target="<?php echo $link_target;?>">Process Info</a></li>
			<li><a href="<?php echo $cfg["cgi_base_url"];?>/extinfo.cgi?type=4" target="<?php echo $link_target;?>">Performance Info</a></li>
			<li><a href="<?php echo $cfg["cgi_base_url"];?>/extinfo.cgi?type=7" target="<?php echo $link_target;?>">Scheduling Queue</a></li>
			<li><a href="<?php echo $cfg["cgi_base_url"];?>/config.cgi" target="<?php echo $link_target;?>">Configuration</a></li>
		</ul>
	</div>
</div>

</body>
</html>
thanks in advance for your help
Attachments
cgi.cfg
My cgi.cfg file
(13.95 KiB) Downloaded 210 times
Last edited by blackcypher on Thu Jan 31, 2019 3:38 am, edited 1 time in total.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: nagios status map doesn't draw links

Post by cdienger »

Edit side.php and change the Map Nouveu Design link code like so:

Code: Select all

<li><a href="map.php?host=all&layout=0" target="<?php echo $link_target;?>">Map Nouveau Design </a></li>
Make sure to refresh the page after saving changes and verify the link now points to map.php?host=all&layout=0. When you visit the link you should then get prompted to enter settings for the map. Are you able to see links if you choose different options here? One of the options is "Disable Display of Links" that should be disabled by default.

The cgi.cfg had one difference to that I'd like you to try changing. It's the "escape_html_tags" option. Try setting it to 1:

escape_html_tags=1

If this still doesn't help, please PM a copy of the complete /usr/local/nagios/etc/ directory so we can verify more of the configuration files.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
blackcypher
Posts: 8
Joined: Tue Oct 30, 2018 10:51 am

Re: nagios status map doesn't draw links

Post by blackcypher »

Sorry for my late response, unfortunately I'm not always in the company cause am a part time worker.
I added the line in side.php as you indicated but each time I click on the link I'm always prompted to enter settings that's quite irritating that's why I modified side.php in order to have a default frame. When I visit the link and choose different options such as circular baloon, balanced tree, etc. I have the links between hosts but for the employer it doesn't provide a quite attractive view and is very confusing. What is wanted is a disposition of hosts similar to that of the legacy which had user supplied coordinates as default.

I equally modified escape_html_tags=1 in cgi.cfg but it had no effect on the map.
Find attached the files in /usr/local/nagios/etc/

Here is the url containing the files. I can't upload more than one 1 file in PMs
https://drive.google.com/open?id=14gzxv ... DGJGD3tGgH

Thanks,
Best regards.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: nagios status map doesn't draw links

Post by cdienger »

Some files and folders are missing from the config and I can't full test without them. These appear to be missing:

/usr/local/nagios/etc/objects/groups/
/usr/local/nagios/etc/objects/hosts/
/usr/local/nagios/etc/objects/websites/


Please provide a complete copy of the /usr/local/nagios/etc/ directory.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
blackcypher
Posts: 8
Joined: Tue Oct 30, 2018 10:51 am

Re: nagios status map doesn't draw links

Post by blackcypher »

Good Morning or Evening (GMT),

As demanded this is the link to all the files and folders.

Thanks.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: nagios status map doesn't draw links

Post by cdienger »

I've recieved the files and will review them. I've removed the link you provided since it can contain sensitive info.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: nagios status map doesn't draw links

Post by cdienger »

Just a quick update that I was able to import the config and replicate the problem. I'll let you know what I find.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
blackcypher
Posts: 8
Joined: Tue Oct 30, 2018 10:51 am

Re: nagios status map doesn't draw links

Post by blackcypher »

I thank you for the update and the time you put in.
Locked