Settings
If you have specified From Plugin as the source component for your channel, the Source screen for this channel definition enables you to configure this source component.
Note: In versions of Iguana that are older than Iguana 4.0, the From Plugin source component is known as the From Client Executable source component.
Once you have created a plugin component the plugin output can be monitored from the channel properties.
To configure the From Plugin source component:
- Select the Iguana starts executable check box to start the plugin when the channel is started and shut it down when the channel is stopped. If this check box is not selected, the channel waits for a connection from the plugin.
Note: If Iguana starts executable is not selected, the Full executable path, Working directory, Executable parameters, Startup timeout and Shutdown timeout fields disappear. The values that you have typed into these fields are preserved. If Iguana starts executable is selected, you can monitor the plugin output while the channel is running.
- In the Full executable path field, type or browse for the location of the plugin to be run. When you supply the file path for the plugin, its absolute path is displayed.To include the value of an environment variable in the file path, use ${name}, where name is the name of the environment variable that you have defined. For example, the file path ${MYDIR}\myfile.exe includes the value of the MYDIR environment variable.The iguana_dir environment variable, which is defined by Iguana, is set to be the location of the Iguana configuration directory. To include this directory in your file path, specify ${iguana_dir} as part of the path.
- From the Working directory list box, select Use executable directory if the working directory and the executable directory are the same. Select Use alternate directory if your working directory is not the executable directory.
- If you have selected Use alternate directory from the Working directory list box, a text field appears. In this text field, type the complete path of the working directory.
- In the Executable parameters field, type any parameters that you want to supply to the plugin when it is started. The default parameters are the macros $hostname$, $port$, $channel$ and $component$, which are described in the table below. If you have changed the parameters and want to go back to using these defaults, click Use Defaults.The following table lists the macros that can be included as executable parameters:
Macro Description $hostname$ The host name of the Iguana Server. $port$ The port number of the Iguana Server. $channel$ The name of the Iguana channel. $component$ Set to source if the plugin is communicating with a source component (as it is here), or to destination if the plugin is communicating with a destination component. $clientid$ A string consisting of the channel name with source1 appended (for example, mychannelname.source1). This macro is provided for plugins that use the deprecated connect method, which expects this as a parameter.If you are creating a new plugin, use $channel$ and $component$ instead of $clientid$. To include the value of an environment variable in the Executable parameters field, use ${name}, where name is the name of the environment variable that you have defined. If you include an environment variable, a preview field appears that displays the value of the field after the environment variable is replaced by its value.
- In the Startup timeout field, type the time, in milliseconds, that Iguana will wait for a connection from the plugin after it has been started. After this time has elapsed, an error is logged and the plugin is terminated.
- In the Shutdown timeout field, type the time, in milliseconds, that Iguana will wait for the plugin to be shut down after a shutdown request has been issued. After this time has elapsed, an error is logged and the plugin is terminated.
- In the Polling time field, type the polling time in milliseconds. This is the amount of time between attempts to obtain a message from the plugin if no message was found at the last attempt. If a message is found, it is processed, and the next attempt happens immediately after that. This polling time must be at least 10 milliseconds.
- In the Plugin timeout field, type the length of time, in milliseconds, to wait after an event is sent to the plugin before an error is logged.
Monitoring Plugin Output [top]
If you have created a channel that specifies From Plugin as a source component or To Plugin as a destination component, and the plugin is automatically started by Iguana when the channel is started, you can monitor the plugin output from Iguana.
To monitor plugin output:
- In your channel, in the plugin component, ensure that the Iguana starts executable check box is selected.
- Start the channel.
- From the Dashboard, click on the name of the channel.
- If your channel specifies From Plugin as a source component, click the Source tab. If your channel specifies To Plugin as a destination component, click the Destination tab.
- In the screen that appears, locate the Diagnostic tools link:
- Click the Monitor executable output link. A screen appears, displaying the output that is being written to the plugin:
- This screen also contains a control panel that provides information on the plugin and on the channel in which it is running:
From this Control Panel, you can:
- Start and stop the channel (if you have permission to start and stop this channel);
- View the status of the channel, the time of the last channel activity, and whether any errors have occurred;
- View information on the state of the plugin.
Note: This screen displays only the most recent 32KB of plugin output.
If your plugin output is not immediately displayed, but is displayed in large chunks once sufficient output is available, your plugin may be buffering its output streams.