Create a Collector or Fetcher from the Director Console API

The following diagram illustrates the API call processes for configuring a collector/fetcher or an SNMP fetcher using the Director Console API.

The required steps are mentioned below:

Creating a Collector/Fetcher in the Director Console API

Follow the steps mentioned below to create a collector/fetcher or an SNMP fetcher in a Logpoint.

Create a Device

A device can be created with or without the use of device groups.

Option A: To create a device using device groups:

  1. Execute the DeviceGroups - Create API in the Director Console API.

  2. Execute the DeviceGroups - List API to obtain the value of the id parameter. Use this value in the devicegroup parameter of the Devices - Create API.

  3. Execute the Devices - Create API.

Option B: To create a device without using device groups:

  • Execute the Devices - Create API with the remaining parameters.

Create a Repo

  • Execute the Repos - Create API in the Director Console API.

Create a Routing Policy

  1. Execute the Repos - List API to obtain the value of the name parameter. Use this value in the repo parameter of the RoutingPolicies - Create API.

  2. Execute the RoutingPolicies - Create API.

The normalization policy can be created with or without the use of the normalization package and with or without the use of compiled normalizer. You can also use the existing vendor packages to make the normalization policy.

Option A: To create a normalization policy using a normalization package:

  1. Execute the NormalizationPackage - Create API from the Director Console API.

  2. Execute the NormalizationPackage - RefreshList API from the Director Console API.

  3. Execute the NormalizationPackage - List API from the Director Console API to obtain the value of the id parameter of the created normalization package or the id parameter of the existing vendor packages. Use this value in the norm_packages parameter of the NormalizationPolicy - Create API.

  4. Execute the NormalizationPolicy - Create API.

Option B: To create a normalization policy without normalization Package:

  • Execute the NormalizationPolicy - Create API with the remaining parameters.

Option C: To create a normalization policy with compiled normalizer.

  • Execute the NormalizationPackage - ListCompiledNormalizers API to obtain the value of the name parameter. Use this value in the compiled_normalizer parameter of the NormalizationPolicy - Create API.

Create an Enrichment Policy (if required)

  1. Create an enrichment source from the LogPoint user interface (mandatory).

    circle-info

    You can configure the Threat Intelligence Plugin using the Director Console API. Refer to Threat Intelligence API Documentation for more information.

  2. Execute the EnrichmentSource - RefreshList API from the Director Console API.

  3. Execute the EnrichmentSource - List API to obtain the value of the source_name parameter. Use this value in the source parameter of the EnrichmentPolicy - Create API.

  4. Execute the EnrichmentPolicy - Create API.

Create a Processing Policy

  1. Execute the EnrichmentPolicy - List API to obtain the value of the id parameter. Use this value in the enrich_policy parameter of the ProcessingPolicy - Create API. If you have not created an enrichment policy, the value of enrich_policy must be None.

  2. Execute the NormalizationPolicy - List API to obtain the value of the name parameter. Use this value in the norm_policy parameter of the ProcessingPolicy - Create API. If you have not created a normalization policy, the value of norm_policy must be None.

  3. Execute the RoutingPolicies - List API to obtain the value of the id parameter. Use this value in the routing_policy parameter of the ProcessingPolicy - Create API.

  4. Execute the ProcessingPolicy - Create API.

Create a Parser (if required)

  • Execute the Parser - Create API in the Director Console API.

Create a Collector or Fetcher

  1. Execute the Parser - List API to obtain the value of the name parameter. Use this value in the parser parameter of the Collector/Fetcher - Create API.

  2. Execute the ProcessingPolicy - List API to obtain the value of the id parameter. Use this value in the processpolicy parameter of the Collector/Fetcher - Create API.

  3. Execute the Devices - List API to obtain the value of the id parameter. Use this value in the device_id parameter of the Collector/Fetcher - Create API.

  4. Execute the Collector/Fetcher - Create API. For instance, to create an FTP collector, execute the FTPCollectorPlugin - Create API.

Create an SNMP Policy (mandatory if you want to create an SNMP Fetcher)

  • Execute the SNMPPolicy - Create API in the Director Console API.

Create an SNMP Fetcher

  1. Execute the ProcessingPolicy - List API to obtain the value of the id parameter. Use this value in the processpolicy parameter of the SNMP Fetcher - Create API.

  2. Execute the Devices - List API to obtain the value of the id parameter. Use this value in the device_id parameter of the SNMP Fetcher - Create API.

  3. Execute the SNMP Policy - List API to obtain the value of the id parameter. Use this value in the snmp_policy parameter of the SNMP Fetcher - Create API.

  4. Execute the SNMP Fetcher - Create API.

Sample API Requests and Responses for creating an FTP Collector

Create a Device (without creating Device Groups)

  • Execute the Devices - Create API.

This step successfully creates a device.

Create a Repo

  • Execute the Repos - Create API (mandatory).

This step successfully creates a repo.

Create a Routing Policy

  1. Execute the Repos - List API.

  2. Execute the RoutingPolicies - Create API and use the value of the name parameter obtained from step 1 in the repo parameter of the API.

This step successfully creates a routing policy.

Create a Normalization Policy (using vendor package)

  1. Execute the NormalizationPackage - List API. You can use one or multiple vendor packages. We have used "LogPoint Alert Triggered Incident" vendor package for this example.

  2. Execute the NormalizationPolicy - Create API and use the value of the id parameter obtained from step 1 in the norm_packages parameter of the API.

This step successfully creates a normalization policy.

Create an Enrichment Policy (if required)

  1. As a mandatory step, create an enrichment source from the LogPoint user interface.

  2. Execute the EnrichmentPolicy - RefreshList API.

  3. Execute the EnrichmentSource - List API.

  4. Execute the EnrichmentPolicy - Create API. Use the value of the source_name parameter obtained from step 3 in the source parameter of the API.

circle-info

source_key must be present in the enrichment source and should be consistent with the value of field parameter from step 3.

This step successfully creates an enrichment policy.

Create a Processing Policy

  1. Execute the EnrichmentPolicy - List API to obtain the id of the desired enrichment policy.

  2. Execute the NormalizationPolicy - List API to obtain the name of the desired normalization policy.

  3. Execute the RoutingPolicies - List API to obtain the id of the desired routing policy.

  4. Execute the ProcessingPolicy - Create API. Use the values of the id parameter obtained from step 1 in the enrich_policy parameter, the name parameter obtained from step 2 in the norm_policy parameter and the id parameter obtained from step 3 in the routing_policy parameter of the API.

This step successfully creates a processing policy.

Create a Parser (if required)

  • Execute the Parser - Create API.

This step successfully creates a parser.

Create a Collector/Fetcher (FTP Collector)

  1. Execute the Parser - List API to obtain the value of the name parameter.

  2. Execute the ProcessingPolicy - List API to obtain the value of the id parameter.

  3. Execute the Devices - List API to obtain the value of the id parameter.

  4. Execute the FTPCollectorPlugin - Create API. Use the values of the name parameter obtained from step 1 in the parser parameter, the id parameter obtained from step 2 in the processpolicy parameter and the id parameter obtained from step 3 in the device_id parameter of the API.

This step successfully creates an FTP collector.

Last updated

Was this helpful?