Chapter 8. Configure the Tungsten Dashboard

Replace the service names and ports in $jsonConfig to match your HA Proxy setup:

shell> sudo su - tungsten
shell> cd /volumes/data/www/tungsten/html/
shell> mv config.php.sample config.php
shell> vim config.php

Important

*** There is a one-to-one relationship between Tungsten services and haproxy ports. See examples following this section. ***

  • Host and port are required for all clusters.

  • A cluster is marked as a composite parent if it has the "children" array, even if the array is empty.

  • A cluster is marked as a composite child if it has the "memberOf" key defined.

  • All Composite member (child) clusters require their own definitions so we know about the host and port for each.

  • Please note that the `host: localhost` should remain localhost because this tells the app to call the haproxy server on the GUI server node, which will then handle routing to the appropriate manager/database node.

  • You may add your own custom menu options to the tools menu by editing the menus->tools section in the json configuration.

  • By default the Auto-refresh feature is disabled (i.e. set to zero). You may enable autoRefreshDelay by setting it it to one of the Auto-Refresh time interval values.

  • By default, the list of Auto-Refresh time intervals is defined as 5, 10, 30, 60, 120 or 300 seconds. You may change that by using the autoRefreshList setting, i.e.:

     "autoRefreshList": [3,5,10,30,60,120,300,600] 

    Important

    PLEASE NOTE: autoRefreshList values less than 3 seconds are strongly discouraged.

  • By default the nodes will display for each cluster. You may set startExpanded to 0 to have the display start in collapsed view

  • Under normal circumstances, you should not need to get a lock, since all operations automatically attempt to obtain a lock for efficiency purposes. This has the side-effect of leaving your session in a locked state.

    There are two settings that help address this situation, autoUnlockHeartbeat and autoUnlockAll.

    You may set autoUnlockHeartbeat to 1 to automatically unlock after issuing a heartbeat command.

    You may set autoUnlockAll to 1 to automatically unlock after issuing any command.

  • You may set dashboardMaintenanceScreen to 1 to display a Maintenance-In-Progress message.

  • The default Tab Badge update rate is 30 seconds. You may disable it by setting tabUpdateRate to zero (0). You may change the refresh rate in seconds by specifying a non-zero value.

     "tabUpdateRate":60 
  • Use lockBaseDir to change the location of the temporary lock files. The default is {WEBROOT}/locks/, (i.e. a lockBaseDir of /tmp (in [Tungsten Clustering for MySQL 5.0 Manual]) will yield a lock directory of /tmp/locks)

     "lockBaseDir":"/tmp" 

This is a sample standalone cluster configuration from config.php:


$jsonConfig = <<<EOJ
{
    "clusters": {
        "north": {
            "host":"localhost",
            "port":"8093"
        }
    },
    "menus": {
        "tools": {
"Add your links here":"http://docs.continuent.com/tungsten-dashboard-1.0/tungsten-dashboard-configure-dashboard.html",
"Archive Mode Docs":"http://docs.continuent.com/tungsten-clustering-5.2/operations-status-changingstates.html#operations-status-changingstates-archive",
"Cluster Heartbeat Docs":"http://docs.continuent.com/tungsten-clustering-5.2/cmdline-tools-cctrl-commands.html#cmdline-tools-cctrl-commands-cluster-heartbeat"
        }

    },
    "settings": {
        "dashboardMaintenanceScreen":0,
        "autoRefreshList": [5,10,30,60,120,300],
        "autoRefreshDelay":0,
        "startExpanded":1,
        "jumpToTopOnMsg":1
    }
}
EOJ;

This is a sample composite cluster configuration from config.php:


$jsonConfig = <<<EOJ
{
    "clusters": {
        "global": {
            "host":"localhost",
            "port":8091,
            "children": [ "west","east" ]
        },
        "east": {
            "host":"localhost",
            "port":"8092",
            "memberOf":"global"
        },
        "west": {
            "host":"localhost",
            "port":"8093",
            "memberOf":"global"
        }
    },
    "menus": {
        "tools": {
"Add your links here":"http://docs.continuent.com/tungsten-dashboard-1.0/tungsten-dashboard-configure-dashboard.html",
"Archive Mode Docs":"http://docs.continuent.com/tungsten-clustering-5.2/operations-status-changingstates.html#operations-status-changingstates-archive",
"Cluster Heartbeat Docs":"http://docs.continuent.com/tungsten-clustering-5.2/cmdline-tools-cctrl-commands.html#cmdline-tools-cctrl-commands-cluster-heartbeat"
        }

    },
    "settings": {
        "dashboardMaintenanceScreen":0,
        "autoRefreshList": [5,10,30,60,120,300],
        "autoRefreshDelay":0,
        "startExpanded":1,
        "jumpToTopOnMsg":1
    }
}
EOJ;