Summary Portals

The combination of inheritance and control structures, in particular for and endfor, can be used to build multi-server portals with minimal configuration.

In this example, the list of servers is assigned to a list which is re-used in many widgets to display various metrics for the same group of servers.

list servers = awsswgvml001, nurswgvml003, nurswgvml009
[widget]
    type = chart   
    metric = nmon.cpu_total.busy%
    for server in servers
	[series]
	   entity = @{server}
    endfor

In cases when the list includes elements with multiple fields, such as hostname, its IP address, location, function, use the var array instead of list to print out field values as tooltips or properties.

This example displays how a var array incorporates server property displayed in legend tooltip on mouse-over.

As an alternative to specifying list elements manually, the lists can be retrieved from the server using freemarker methods.

getResourcesForGroup(group_id[, list of product codes])

Return the list of agents collecting data. If the group contains hosts with agents, they will be traversed to the agent level in order to return the list of agents.
For example, if the groups contains hosts ABC (ITM Linux) and CDE.axibase.com (SCOM), the method will return agent identifiers: abc:LX and Microsoft.Window.Computer:CDE.axibase.com.

list resources = ${getResourcesForGroup("linux")?join(",")}
list resources = ${getResourcesForGroup("windows_server_2008")?join(",")}

getHostsForGroup(group_id [, list of product codes])

Return the list of hosts. If the group contains agents, they will be traversed up the tree to return hosts.

list hosts = ${getHostsForGroup("scom-itm_group", "LZ")?join(",")}

If the group contains agents with different product codes, its specifics can be addressed using a if or endif condition based on the agent name, or the method can executed multiple times by filtering the group by different product codes.

[widget]
  type = chart
  title = Memory Usage for Linux and Windows Servers
  #retrieve SCOM agents first
  list resources = ${getResourcesForGroup("scom-itm_group", "01")?join(",")}
  for rsc in resources
    [series]
      table = Microsoft.Windows.Server.2008.Monitoring_Memory
      attribute = % Committed Bytes In Use    
      entity = @{rsc}
  endfor
  #retrieve Linux agents second
  list resources = ${getResourcesForGroup("scom-itm_group", "LZ")?join(",")}
  for rsc in resources
    [series]
      table = KLZ_VM_Stats
      attribute = Memory_Used_Pct
      entity = @{rsc}
endfor

The most compact way to summarize many metrics is provided by the table widget.