Skip to main content

How to Collect DigitalOcean Resource Data

The DigitalOcean collector is configured within the Fix Inventory Worker configuration via the config command in Fix Inventory Shell.

Prerequisites​

This guide assumes that you have already installed Fix Inventory.

Directions​

1. Enable the DigitalOcean Collector​

  1. Open the Fix Inventory Worker configuration via the config command in Fix Inventory Shell:

    > config edit fix.worker
  2. Add digitalocean to the list of collectors by modifying the configuration as follows:

    fixworker:
    ...
    # List of collectors to run
    collector:
    - 'digitalocean'
    ...
    ...

2. Authenticate with DigitalOcean​

DigitalOcean uses access tokens to authenticate API requests. You can provide access tokens to Fix Inventory via the Fix Inventory Worker configuration or environment variables.

  1. Open the Fix Inventory Worker configuration via the config command in Fix Inventory Shell:

    > config edit fix.worker
  2. Modify the digitalocean section of the configuration as follows, adding your API tokens and/or access keys:

    digitalocean:
    # DigitalOcean API tokens for the teams to be collected
    api_tokens:
    - 'dop_v1_e5c759260e6a43f003f3b53e2cfec79cxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
    # DigitalOcean Spaces access keys for the teams to be collected, separated by colons
    spaces_access_keys: []
    ...

3. Trigger Resource Collection​

  1. By default, Fix Inventory performs resource collection each hour. To immediately trigger a collect run, use the workflow run command in Fix Inventory Shell:

    > workflow run collect
  2. Once the collect run completes, you can view a summary of collected DigitalOcean resources using the following search:

    > search is(digitalocean_resource) | count kind