Working with KHIKA Adapters
Contents
Introduction
Adapters are data collection programs (scripts or executables) run by the KHIKA data collection framework at a predefined polling interval on the configured Data Aggregators. An Adapter reads the data/log messages from a data source when they appear, parses them to useful tokens (KHIKA Data format), and then writes them back to standard output (stdout) in the KHIKA data format. To access Adapter tab, go to the main screen, click the left side menu bar. Click Configure and then click Adapter tab. The following screen is displayed.
adapter1
Adding Adapters
To access Adapter tab, go to the main screen, click the left side menu bar. Click Configure and then click Adapter tab. To add an Adapter, click Add Adapter button shown.The following dialog box is displayed.
adapter2
Click on “Add Adaptor” button. Following pop up appears. Enter adaptor details as mentioned.
adapter3
The fields in the pop up are explained
Fields | Description |
---|---|
Name | Logical name of the Adapter. Give any alphanumeric name without white spaces to your Adapter (SimpleFileReader). |
Type | Type of Adaptor. Select appropriate |
Command | The path to the Adapter script (the script/program must be present on the specified path with appropriate permission on the selected Data Aggregator). |
Collection Cycle | Select “POLLED” from the dropdown. |
Node | The Data Aggregator or collector node, where the adapter is supposed to run at a periodic polling interval. |
Polling Interval | Specify in seconds. The script will execute itself after the specified polling interval, check for new data each time, and convert it to the KHIKA format according to the logic coded in it. |
Enable Raw Logs | Keep this checkbox unchecked for now |
The Adapter is added successfully, and the confirmation message is displayed as shown below.
adapter4
Searching Adapters
To access Adapter tab, go to the main screen, click the left side menu bar. Click Configure and then click Adapter tab. Search for Adapters by entering either of the following options - the Adapter Name, Polling Interval, Command or the Data Aggregator Name.
adapter5
Assigning Data Aggregator Node to Adapters
To access Adapter tab, go to the main screen, click the left side menu bar. Click Configure and then click Adapter tab. To assign a Data Aggregator to an Adapter, click the Assign Hosts to Adapter icon next to it as shown in figure below.
adapter6
Select the Data Aggregator and click Add Host button. The Data Aggregator is added (assigned) to the Adapter, and the following confirmation message is displayed.
adapter7
Disabling Data Aggregator to Adapters
To access Adapter tab, go to the main screen, click the left side menu bar. Click Configure and then click Adapter tab. To disable a particular Data Aggregator from an Adapter, click the Disable Hosts to Adapter icon next to it as shown in figure below.
adapter8
Select the Data Aggregator and click Disable Host button. The Data Aggregator is disabled from the Adapter, and the following confirmation message is displayed.
adapter9
Modifying Adapters
To access Adapter tab, go to the main screen, click the left side menu bar. Click Configure and then click Adapter tab. To modify an Adapter, click the Modify Adapter icon next to it as shown in figure below.
adapter10
The following dialog box is displayed.
adapter11
For more information on the fields in Modify Adapter dialog box refer to Error! Reference source not found. Fields in Add Adapter on page Error! Bookmark not defined..
To modify an Adapter, follow these steps:
- Enter new Adapter Name.
- Enter new Command.
- Enter new Polling Interval.
- Enter the required Data Aggregator name. Click All Hosts check box if required.
- Click Save.
The Adapter is modified successfully, and the following confirmation message is displayed.
adapter12
Deleting Adapters
To access Adapter tab, go to the main screen, click the left side menu bar. Click Configure and then click Adapter tab. To delete an adapter, click Delete Adapter From Workspace icon next to it as shown in figure below.
adapter13
Click OK to confirm the deletion. The Adapter is deleted successfully.
Writing your own Adaptor
For a dedicated section on developing your own KHIKA Adapters, go to Write Your Own Adapter