Setting up a Hyperlink from Status to Cacti Graphs

Contents

Summary

GroundWork has created an extension to the Status application to allow direct access to the Cacti screens for displaying a large number of performance-data graphs for a host. This is done via a link in Status, in the "Related Links" section of the status information page for the host. Please note the our mechanism for supporting hyperlinks to Cacti graphs from within Status is broken in the GWMEE 7.0.x releases. Fixing this requires some file changes discussed in this document.

Features

To Install

Decide what Cacti graph tree you will want to show up when the link is traversed. This graph tree will be mentioned in the link that you configure (below). Configure hosts under that graph tree as desired. You may also configure those and additional hosts under the Default Tree graph tree, if that makes sense for your monitoring situation.

Steps 1 and 2 below are for 6.5 and earlier releases only
Downloading and installing the cacti_graphs.cgi script should only be done for GroundWork Monitor releases 6.5 and earlier. GroundWork Monitor 6.6 and later releases already include a proper version of this script.
  1. Download the file cacti_graphs.cgi:
    Name Size Creator Creation Date Comment  
    File cacti_graphs.cgi 18 kB NotSupportContact-Mark Carey Aug 17, 2011 14:04    
  2. With the owner group nagios:nagios and 755 permissions, install the cacti_graphs.cgi file as:
    /usr/local/groundwork/core/performance/cgi-bin/graphs/cacti_graphs.cgi
  3. At least in GroundWork Monitor 7.x.x releases, a specific form of the hostname must be used in the config/cacti.properties file and in the config/status-viewer.properties file. It is the value of the gatein.sso.josso.host property that is found with this simple command:
    fgrep gatein.sso.josso.host= /usr/local/groundwork/config/configuration.properties

    For example, if the result is:

    gatein.sso.josso.host=MY-SERVER.MY-COMPANY.com

    then MY-SERVER.MY-COMPANY.com is the form of hostname you will need in the cacti.1.host line, and as the replacement text for MY_GW_SERVER in the sample portal.statusviewer.host.custom.url.2 template line.

  4. Modify the /usr/local/groundwork/config/status-viewer.properties file, in the Custom host URLs section near the bottom of the file, to create the links to Cacti graph pages. Choose the first unused pair of lines to modify. You need to make two substitutions in the first sample line below, one for the hostname of the GroundWork Monitor server (here, MY_GW_SERVER), and one to specify the preferred graph tree you decided on above (here, MY_PREFERRED_TREE).
    portal.statusviewer.host.custom.url.2=http://MY_GW_SERVER/graphs/cgi-bin/cacti_graphs.cgi?graph_tree_name=MY_PREFERRED_TREE&host_name=$HOST$
    portal.statusviewer.host.custom.url.2.display.name=Cacti Graphs
    

    In the first line, use the standard URL encoding of %20 instead of space characters in your preferred graph tree name, if that name contains spaces. For example, if your GroundWork Monitor server is carolina and your preferred graph tree is Special Graph Tree, you would specify:

    portal.statusviewer.host.custom.url.3=http://carolina/graphs/cgi-bin/cacti_graphs.cgi?graph_tree_name=Special%20Graph%20Tree&host_name=$HOST$
    

    In the second ("display.name") line, note the intentional lack of quotes around the value, even though it contains a space, and no
    special encoding of that space character.

  5. In the GWMEE 7.0.0 and 7.0.1 releases, you will need to add the following line near the end of /usr/local/groundwork/apache2/conf/httpd.conf, in the section of other ProxyPassMatch lines:
    ProxyPassMatch ^/graphs/cgi-bin/(.*)$ http://localhost:8080/performance/cgi-bin/graphs/$1

    This line has been added for the next release (7.0.2), so no change will be necessary there. For the 7.0.0 and 7.0.1 releases, you must restart Apache after making that change:

    service groundwork restart apache
  6. Restart GroundWork Monitor to pick up the configuration changes:
    service groundwork restart gwservices
    

Notes