Suppress Agent Output in Post-process: Difference between revisions
No edit summary |
No edit summary |
||
| Line 3: | Line 3: | ||
---- | ---- | ||
''Intercepting and | ''Intercepting and Modifying Agent Output by the Main Display Post-processing Script:'' | ||
'''Modifying Agent Output''' | |||
Often, is is required to intercept the output from a SEM Agent and modify it, or add additional columns of data before it is displayed in a SEM Display Window. | Often, is is required to intercept the output from a SEM Agent and modify it, or add additional columns of data before it is displayed in a SEM Display Window. | ||
Latest revision as of 10:10, 24 February 2011
'Tips for developers working within the Sysgem Enterprise Manager (SEM) environment'.
Intercepting and Modifying Agent Output by the Main Display Post-processing Script:
Modifying Agent Output
Often, is is required to intercept the output from a SEM Agent and modify it, or add additional columns of data before it is displayed in a SEM Display Window.
This section describes what has to be done in the Post Processing script if the output from the Agent is to be modified before the data is displayed in the window.
If the Agent returns data that resembles the following, then this data will be processed by the SEM framework and inserted automatically into the Display Window:
"AA : <Text>" # information for cell (AA) for first row of data "AB : <Text>" # information for cell (AB) for first row of data "AC : <Text>" # information for cell (AC) for first row of data "@" # terminates first row "AA : <Text>" # information for cell (AA) for second row of data "AB : <Text>" # information for cell (AB) for second row of data "AC : <Text>" # information for cell (AC) for second row of data "@" # terminates second row
To prevent the data being displayed before it is modified by the Post Processing script, execute the following Perl statement:
print "{{REPLACE_VALUES=YES\n"; # do NOT display data from the agent
The Post processing script can then load the data into the array: @input_array by calling the subroutine: LoadInputArray();
Once the data has been processed and potentially reformatted, the output is sent to standard output for the SEM framework to insert into the display window, with the following Perl statements
print "AA : <Modified Text>\n"; # information for cell (AA) for first row of data print "AB : <Modified Text>\n"; # information for cell (AB) for first row of data print "AC : <Modified Text>\n"; # information for cell (AC) for first row of data print "\@\n"; # terminates first row print "AA : <Modified Text>\n"; # information for cell (AA) for second row of data print "AB : <Modified Text>\n"; # information for cell (AB) for second row of data print "AC : <Modified Text>\n"; # information for cell (AC) for second row of data print "\@\n"; # terminates second row