Normally the Display Propeties of a TEC console can only be modified from the GUI, however as you'd expect the GUI calls a method to set the options. This method is as follows
# COID=`wlookup -r EnterpriseClient Root_roobarb-region`
# idlcall $COID _get_table_attributes
This produces output as follows:-
{ 17
{ "Table2" "MQSeries: Queue Manager" "Sub_Source" "Sub_Source"
0 FALSE { 4 "Class"
"Message" "Date" "Status" } { 15 "Severity" "Origin" "R" "S" "F"
"U" "EVENT_KEY"
"ID" "Source" "Sub_Source" "Sub-Origin" "Repeat Count" "dpage-key"
"Hostname"
"Administrator" } { 2 "Severity" "Date" } { 17 "Message" "EVENT_KEY"
"Source"
"Sub_Source" "Origin" "Hostname" "Administrator" "Repeat Count"
"ID" "Class"
"Sub-Origin" "S" "F" "R" "U" "dpage-key" "Status" } }
........
........
{ "Table17" "MQSERIES" "Severity" "Status" 0 FALSE { 6 "Class"
"Status" "Hostname"
"Message" "Date" "Administrator" } { 13 "Severity" "Origin" "R"
"S" "F" "U"
"EVENT_KEY" "ID" "Source" "Sub_Source" "Sub-Origin" "Repeat Count"
"dpage-key" }
{ 2 "Status" "Severity" } { 17 "Message" "EVENT_KEY" "Date" "Source"
"Sub_Source"
"Origin" "Hostname" "Administrator" "Repeat Count" "ID" "Class"
"Sub-Origin" "S" "F"
"R" "U" "dpage-key" }
} }
NOTE: the output has been shortened - there are in fact one of these sections per Event Soure & Event Group
The following table decodes one of these 'tables'.
Field | Description |
{ |
|
"Table2" | Internal name |
"MQSeries" | Console Label |
"Sub_Source" | Left column value |
"Sub_Source" | Left column value |
0 | Unknown |
TRUE | TRUE = Ascending FALSE = Descending |
{ |
|
7 | 7 Arguments - Fields to display |
"Class" | |
"Status" | |
"Hostname" | |
"Message" | |
"Date" | |
"Administrator" | |
"Sub_Source" | |
} | |
{ |
|
12 | 12 Arguments - Fields not to display |
"Severity" | |
"Origin" | |
"R" | |
"S" | |
"F" | |
"U" | |
"EVENT_KEY" | |
"ID" | |
"Source" | |
"Sub-Origin" | |
"Repeat Count" | |
"dpage-key" | |
} | |
{ |
|
1 | 1 Argument - sort by |
"Status" | |
} | |
{ |
|
18 | 18 Arguments - message fields available for sorting |
"Message" | |
"EVENT_KEY" | |
"Source" | |
"Sub_Source" | |
"Origin" | |
"Hostname" | |
"Administrator" | |
"Repeat Count" | |
"ID" | |
"Class" | |
"Sub-Origin" | |
"S" | |
"F" | |
"R" | |
"U" | |
"dpage-key" | |
"Severity" | |
"Date" | |
} | |
} |
|
} |
|
As you'd expect you can also set the propeties using the following:
# COID=`wlookup -r EnterpriseClient Root_roobarb-region`
# idlcall $COID _set_table_attributes < /tmp/display_propeties.txt
The display_propeties.txt file holds the complete (modified) dump for all of the event consoles ie Groups and Sources.
This all seems a very complex thing to do, however I've written a script which will change the properties of a specific console. This can be found in our Script Archive.
The script:- set_tec_properties.pl can be called with the following arguments:-
# perl set_tec_properties.pl -d "Field1,Field2,..." -s "Field1,Field2,...." -h Field1 -w [Ascending | Descending] -c EventConsole -n Name
where:
-d "Field1,Field2,..." | The fields to be displayed in the console |
-s "Field1,Field2,..." | The fields that you want to sort on in this order |
-h Field1 | The field that will appear as the header (displayed in the left hand column) |
-w [ Ascending | Descending ] | The direction to show the sort results |
-c EventConsole | The name of the Administrators event console to update |
-n Name | The name of the group or source window to change |