multiple host example

Bug #1214324 reported by George Vieira
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Jarmon
New
Undecided
Unassigned

Bug Description

Not really a bug per se but would be good to provide samples if possible of multiple host configuration. I've had a crack at it and host it to work to a point using example setup below but when changing host in the combo, the UI corrupts the layout and double/triples everything so again, an example would be good. thx.

jarmon.TAB_RECIPES_STANDARD = [
    ['System', ['seth.cpu', 'seth.memory','seth.load']],
    ['Network', ['seth.interface']]
];

jarmon.TAB_RECIPES_ARRAY = [
    [ "anubis" ,
        [
            ['System', ['anubis.cpu', 'anubis.memory','anubis.load']],
            ['Network', ['anubis.interface']]
        ]
    ],
    [ "seth" ,
        [
            ['System', ['seth.cpu', 'seth.memory','seth.load']],
            ['Network', ['seth.interface']]
        ]
    ]
];

jarmon.CHART_RECIPES_COLLECTD = {
    'anubis.cpu': {
        title: 'CPU Usage',
        data: [
            ['data/anubis.hosts.emperor-it.com/cpu-0/cpu-wait.rrd', 0, 'CPU-0 Wait', '%'],
            ['data/anubis.hosts.emperor-it.com/cpu-1/cpu-wait.rrd', 0, 'CPU-1 Wait', '%'],
            ['data/anubis.hosts.emperor-it.com/cpu-0/cpu-system.rrd', 0, 'CPU-0 System', '%'],
            ['data/anubis.hosts.emperor-it.com/cpu-1/cpu-system.rrd', 0, 'CPU-1 System', '%'],
            ['data/anubis.hosts.emperor-it.com/cpu-0/cpu-user.rrd', 0, 'CPU-0 User', '%'],
            ['data/anubis.hosts.emperor-it.com/cpu-1/cpu-user.rrd', 0, 'CPU-1 User', '%']
        ],
        options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS,
                                         jarmon.Chart.STACKED_OPTIONS)
    },
    'seth.cpu': {
        title: 'CPU Usage',
        data: [
            ['data/seth.hosts.emperor-it.com/cpu-0/cpu-wait.rrd', 0, 'CPU-0 Wait', '%'],
            ['data/seth.hosts.emperor-it.com/cpu-1/cpu-wait.rrd', 0, 'CPU-1 Wait', '%'],
            ['data/seth.hosts.emperor-it.com/cpu-0/cpu-system.rrd', 0, 'CPU-0 System', '%'],
            ['data/seth.hosts.emperor-it.com/cpu-1/cpu-system.rrd', 0, 'CPU-1 System', '%'],
            ['data/seth.hosts.emperor-it.com/cpu-0/cpu-user.rrd', 0, 'CPU-0 User', '%'],
            ['data/seth.hosts.emperor-it.com/cpu-1/cpu-user.rrd', 0, 'CPU-1 User', '%']
        ],
        options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS,
                                         jarmon.Chart.STACKED_OPTIONS)
    },
.
.
etc

            $('#server').change( function() {
                var server = $('#server :selected').val();
                var tab = jarmon.getRecipeByServer( server );

                jarmon.buildTabbedChartUi(
                    $('.chart-container').remove(),
                    jarmon.CHART_RECIPES_COLLECTD,
                    $('.tabbed-chart-interface'),
                    tab,
                    $('.chartRangeControl')
                );
            });
        });

.
.

                    <select id='server'>
                        <option></option>
                        <option>anubis</option>
                        <option>seth</option>
                    </select>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.