nagios status map doesn't draw links

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

nagios status map doesn't draw links

Postby blackcypher » Fri Dec 21, 2018 4:36 am

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.
blackcypher
 
Posts: 3
Joined: Tue Oct 30, 2018 10:51 am

Re: nagios status map doesn't draw links

Postby cdienger » Wed Dec 26, 2018 3:25 pm

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.
User avatar
cdienger
Support Tech
 
Posts: 2484
Joined: Tue Feb 07, 2017 11:26 am

Re: nagios status map doesn't draw links

Postby blackcypher » Fri Dec 28, 2018 5:20 am

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&amp;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&amp;style=overview" target="<?php echo $link_target;?>">Host Groups</a>
            <ul>
               <li><a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?hostgroup=all&amp;style=summary" target="<?php echo $link_target;?>">Summary</a></li>
               <li><a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?hostgroup=all&amp;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&amp;style=overview" target="<?php echo $link_target;?>">Service Groups</a>
            <ul>
               <li><a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?servicegroup=all&amp;style=summary" target="<?php echo $link_target;?>">Summary</a></li>
               <li><a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?servicegroup=all&amp;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&amp;servicestatustypes=28" target="<?php echo $link_target;?>">Problems</a>
            <ul>
               <li><a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?host=all&amp;servicestatustypes=28" target="<?php echo $link_target;?>">Services</a> (<a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?host=all&amp;type=detail&amp;hoststatustypes=3&amp;serviceprops=42&amp;servicestatustypes=28" target="<?php echo $link_target;?>">Unhandled</a>)</li>
               <li><a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?hostgroup=all&amp;style=hostdetail&amp;hoststatustypes=12" target="<?php echo $link_target;?>">Hosts</a> (<a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?hostgroup=all&amp;style=hostdetail&amp;hoststatustypes=12&amp;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 41 times
Last edited by blackcypher on Thu Jan 31, 2019 3:38 am, edited 1 time in total.
blackcypher
 
Posts: 3
Joined: Tue Oct 30, 2018 10:51 am

Re: nagios status map doesn't draw links

Postby cdienger » Fri Dec 28, 2018 2:26 pm

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.
User avatar
cdienger
Support Tech
 
Posts: 2484
Joined: Tue Feb 07, 2017 11:26 am

Re: nagios status map doesn't draw links

Postby blackcypher » Fri Feb 08, 2019 4:20 am

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.
blackcypher
 
Posts: 3
Joined: Tue Oct 30, 2018 10:51 am

Re: nagios status map doesn't draw links

Postby cdienger » Fri Feb 08, 2019 3:53 pm

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.
User avatar
cdienger
Support Tech
 
Posts: 2484
Joined: Tue Feb 07, 2017 11:26 am


Return to Nagios Core

Who is online

Users browsing this forum: Google [Bot] and 25 guests