For instructions pertaining to XRay version 1.6, see Streaming AutoPilot data to XRay (v1.6).
This article includes instructions for streaming AutoPilot data to XRay. You can choose to stream policies results, facts, or both. Keep in mind that in XRay, AutoPilot policies results become events, and AutoPilot facts become snapshots.
To set up streaming, you must first have an access token from XRay and use it to configure AutoPilot.
Generate an access token
- From the XRay Main Menu, go to Admin settings.
- Go to the Organization tab. The Organization Manager dialog opens.
- Open the Repositories tab.
- Select a repository and click Edit.
- Select the Manage Repository Tokens tab.
- At least one token should have been created for you as part of XRay backend installation process. Click
to view the token. Copy the token value and go to step 8. If no tokens are present, proceed to the next step to generate a new token.
- Click Generate Token.
- Verify that for the token you are using, the Stream setting is set to Active. All other settings can be left Inactive.
Configure AutoPilot for Streaming
It is recommended that you set up the streaming token in global.properties so that it applies to all servers. It can also be set up in node.properties for a single server.
- Go to the AutoPilot root directory (for example,
/opt/Nastel/AutoPilotM6/
) and open global.properties. - Find the line that reads:
"; uncomment if streaming events or metrics to Nastel XRay."
- Uncomment the following two lines by removing the semicolon from the beginning of the line:
;property tnt4j.source.hosturl=https://data.jkoolcloud.com
;property tnt4j.source.access.token=your_accesstoken
- On the first line, replace the placeholder host URL with the address of your local streaming server (for on-premises installations) or cloud service (for cloud installations). The host URL must be a full address. The following ports are examples only. Ports from the gateway settings could be used instead.
http: 6580
https: 6585 - On the second line, replace your_accesstoken with the access token from XRay.
Stream events (Recommended)
If you want to stream events to XRay, do the following:
- In the AutoPilot root directory, open log4j2.xml.
- Find the line that reads:
<!-- uncomment the following to stream policies events to Nastel XRay -->
- Uncomment the following lines:
<!-- Logger name=”policies” Level=”info” additivity=”false”>
<AppenderRef ref=”Tnt4j”/>
</Logger-->
Event streaming is now enabled. AutoPilot policies results are streamed to XRay as events.
Stream facts
If you want to stream facts to XRay, such as facts from Domain Manager, Operating System Monitor, or from the workgroup server expert, you can do so by following the instructions below. Every expert that can stream data to AutoPilot has a Streaming Options tab where streaming can be configured. The example below covers the Domain Manager.
- In AutoPilot, right-click the Domain Manager and go to Properties.
- Look for the Streaming Options tab. This tab controls which facts get streamed and the location they stream to. Many of the fields are optional and have default values provided in the tnt4j.properties file that is part of the XRay installation package. However, they can be overridden.
- For streaming the facts as they update, select Stream Facts. Again, keep in mind that AutoPilot facts become snapshots in XRay.
- For streaming periodic derived metrics, select Derived Metrics and set a frequency by entering a time interval in milliseconds in the Interval of derived metrics field.
- Since some experts produce a large number of facts, we do not recommend that you stream all of them. Instead, in the Exclude filter and Include filter provided, it is recommended that you enter regular expressions to control which facts are streamed.
- The default Streaming configuration is com.nastel.autopilot.
- Click Apply to apply changes.
Fact streaming is now enabled. AutoPilot facts are streamed to XRay as snapshots.