Working with KHIKA Adapters

From khika
Jump to navigation Jump to search

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.jpg


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.jpg


Click on “Add Adaptor” button. Following pop up appears. Enter adaptor details as mentioned.


Adapter3.jpg


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.jpg

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.jpg


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.jpg


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.jpg


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.jpg


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.jpg


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.jpg


The following dialog box is displayed.


Adapter11.jpg


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:

  1. Enter new Adapter Name.
  2. Enter new Command.
  3. Enter new Polling Interval.
  4. Enter the required Data Aggregator name. Click All Hosts check box if required.
  5. Click Save.

The Adapter is modified successfully, and the following confirmation message is displayed.


Adapter12.jpg


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.jpg


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


Previous

The next section is about Working with KHIKA Aggregators

Back to Index