Skip to content

Inventory configuration

The inventory defines which devices SC4SNMP should poll using which SNMP version and credentials, and which profiles to apply.

Configuration fields

Field Description Default Required
address The IP address which SC4SNMP should collect data from, or name of the group of hosts. General information about groups can be found on the Configuring Groups page. YES
port SNMP listening port. 161 NO
version SNMP version, the allowed values are 1, 2c, or 3. YES
community SNMP community string, this field is required when the version is 1 or 2c. NO
secret The reference to the SNMPv3 secret that should be used to poll from the device. See SNMPv3 configuration for details. This field is required when the version is 3. NO
security_engine The security engine ID required by SNMPv3. If it is not provided for version 3, it will be autogenerated. NO
walk_interval The interval in seconds for SNMP walk. This value needs to be between 1800 and 604800. 42000 NO
profiles A list of SNMP profiles used for the device. More than one profile can be added by a semicolon separation, for example, profile1;profile2. Profile names must match entries defined in the Profiles configuration. NO
smart_profiles Enables smart profiles. Its allowed values are true or false. For more details see smart profiles. true NO
max_oid_to_process Maximum number of OIDs requested from SNMP Agent at once. Can be also set globally to all devices by setting poller.maxOidToProcess or MAX_OID_TO_PROCESS 70 NO
delete A flag that defines if the inventory record should be deleted from the scheduled tasks for WALKs and GETs. Its allowed value are true or false. The default value is false. false NO

Note

The profiles and smart_profiles columns reference profile names that must be defined in the Profiles configuration. If a profile name used here does not exist, SC4SNMP will not poll the device.

Configuration

Inventory is configured in the poller.inventory section of values.yaml:

poller:
    inventory: |
      address,port,version,community,secret,security_engine,walk_interval,profiles,smart_profiles,max_oid_to_process,delete
      10.202.4.202,,2c,public,,,2000,my_profile1,,,
      example_group_1,,2c,public,,,2000,my_profile2;my_profile3,,,

Info

The header line (address,port,version,community,secret,security_engine,walk_interval,profiles,smart_profiles,max_oid_to_process,delete) is necessary for the correct execution of SC4SNMP. Do not remove it.

Info

Starting with version 1.15.0, the max_oid_to_process field has been introduced as an optional addition to the inventory header. This update is backward compatible, and existing inventory headers remain fully supported.

You can also keep inventory in a separate CSV file and pass it at upgrade time:

microk8s helm3 upgrade --install snmp -f values.yaml --set-file poller.inventory=inventory.csv splunk-connect-for-snmp/splunk-connect-for-snmp --namespace=sc4snmp --create-namespace

Inventory is configured in the inventory.csv file. The path to this file must be set in .env:

INVENTORY_FILE_ABSOLUTE_PATH=/absolute/path/to/inventory.csv
address,port,version,community,secret,security_engine,walk_interval,profiles,smart_profiles,max_oid_to_process,delete
10.202.4.202,,2c,public,,,2000,my_profile1,,,
example_group_1,,2c,public,,,2000,my_profile2;my_profile3,,,

Applying changes

Adding new devices to values.yaml is resource expensive and can impact performance. SC4SNMP was designed to prevent changes in inventory tasks more often than every 5 minutes.

  1. Edit values.yaml
  2. Check if the inventory pod is still running:
microk8s kubectl -n sc4snmp get pods | grep inventory

If pods are returned, wait until the inventory job finishes before continuing.

If you need to apply changes immediately, delete the inventory job:

microk8s kubectl delete job/snmp-splunk-connect-for-snmp-inventory -n sc4snmp
  1. Run the upgrade command:
microk8s helm3 upgrade --install snmp -f values.yaml splunk-connect-for-snmp/splunk-connect-for-snmp --namespace=sc4snmp --create-namespace

Info

If you change the frequency of a profile without changing the inventory data, the change will be reflected after the next walk process for the host. The walk happens every walk_interval, or during any change in inventory.

To apply inventory changes, run the following command inside the docker_compose directory:

sudo docker compose up -d