Suppress Agent Output in Post-process: Difference between revisions

From Sysgem Support
Jump to navigationJump to search
Created page with "'Tips for developers working within the Sysgem Enterprise Manager (SEM) environment'. == Suppress Agent Output in the Main Display Post-processing Script == ''Intercepting and ..."
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
'Tips for developers working within the Sysgem Enterprise Manager (SEM) environment'.
'Tips for developers working within the Sysgem Enterprise Manager (SEM) environment'.


== Suppress Agent Output in the Main Display Post-processing Script ==
----


''Intercepting and modifying Agent Output by the Main Display Post-processing Script:''
''Intercepting and Modifying Agent Output by the Main Display Post-processing Script:''


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 it is displayed in the window.
'''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:
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:
Line 36: Line 39:
     print "AC : <Modified Text>\n";    # information for cell (AC) for second row of data
     print "AC : <Modified Text>\n";    # information for cell (AC) for second row of data
     print "\@\n";                      # terminates second row
     print "\@\n";                      # terminates second row
Other printed output recognised by the SEM framework includes the display of a dialogue box. See [[Dialogue Boxes]] for more information.

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