Sample CGI scripts and syntaxes
Sample syntaxes that show how to perform useful actions in CGI scripts.
nco_ping script
The following example shows the URL for the nco_ping CGI script when it is run on an event that generated from a device with the node name zen1 and the data source NCOMS. The GET query string is as follows.selected_rows.Node=zen1&datasource=NCOMS
The
following data is passed to the CGI script.protocol://server:port/ibm/console/webtop/cgi-bin/
nco_ping.cgi?%24selected_rows.Node=zen1&datasource=NCOMS
Using values from cookies
CGI scripts can also use values from cookies that originate from the same domain as the Web GUI server. You are responsible for setting browser cookies and using cookie values correctly. To reference a value from a cookie, use the following syntax.{%cookie.cookiename}
Where cookiename is
the name of the cookie. For example, the full syntax of referencing
a value from a cookie is as follows.$(SERVER)cgi-bin/scriptname.cgi?parametername={%cookie.cookiename}
Referencing a value from an ObjectServer field
To reference a value from an ObjectServer field in a query string, use the following syntax.{@fieldname}
Where fieldname is
the name of the field.Showing a query string
The following example shows a query string using the Node and Summary fields.$(SERVER)cgi-bin/scriptname.cgi?node={@Node}&abstract={@Summary}
Where scriptname is
the name of the CGI script.