Setting up a Hyperlink from Status to Cacti Graphs



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.


  • A particular Cacti graph tree is designated as the preferred graph tree to be displayed for each host when accessed through this link.
  • The "Default Tree" graph tree is automatically used as a possible secondary graph tree if the host is not found to be associated with the preferred graph tree.
  • The Cacti graphs appear in a new window, so as not to disturb the state of the Status window and take extra time to get back to where you were before the graphs were displayed. (Most users configure their browsers so that new windows like this simply appear as a new tab in the same browser context.)
  • The new window is unencumbered by any of the GroundWork Monitor layout chrome, leaving more room for the graphs. However, security is still maintained, as access to the page is still subject to JBoss session controls.

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:
  3. At least in GroundWork Monitor 7.x.x releases, a specific form of the hostname must be used in the config/ file and in the config/ file. It is the value of the property that is found with this simple command:
    fgrep /usr/local/groundwork/config/

    For example, if the result is:

    then is the form of hostname you will need in the line, and as the replacement text for MY_GW_SERVER in the sample template line.

  4. Modify the /usr/local/groundwork/config/ 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).$HOST$ 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:$HOST$

    In the second ("") 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


  • The Graphs Per Page and Thumbnails settings at the top of the Cacti Graphs > Tree Mode page seem to be global settings that persist even across sessions. So they are completely under user control, and not set by this new link.
  • The cacti_graphs.cgi script looks successively in each database configured in the file, not just in one particular database, so it will easily handle complex setups. Wherever it first finds what it's looking for, that's what it runs with. Also, Cacti itself does not enforce uniqueness of applying a graph tree to a host, though perhaps it should. If duplication across databases or within a single database appears in your Cacti setup, the script will use the first match it finds, regardless of whether additional matches exist.


cacti cacti Delete
links links Delete
status status Delete
graphs graphs Delete
nms nms Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.