Skip to content

Commit 0e1f32f

Browse files
authored
feat: add partial walk (#1215)
1 parent 582a553 commit 0e1f32f

File tree

28 files changed

+325
-50
lines changed

28 files changed

+325
-50
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- implemented mTLS for Splunk 10
77
- update default microk8s to 1.33
88
- introduce `splunkMetricNameHyphenToUnderscore` parameter to make metric names follow Splunk schema
9+
- change default walk to get only SNMPv2-MIB
910

1011
### Fixed
1112

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Walk profiles no longer include IF-MIB family by default.
2-
If you've used this functionality before, please update the walk profile with ['IF-MIB'] varBind.
1+
Default walk no longer calls full oid tree, instead it is collecting only 'SNMPv2-MIB'.
2+
If you want to call full oid for the devices, you have to set enableFullWalk flag to true.

charts/splunk-connect-for-snmp/templates/inventory/job.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ spec:
5050
value: {{ .Values.scheduler.tasksExpiryTime | quote }}
5151
- name: CONFIG_FROM_MONGO
5252
value: {{ quote .Values.UI.enable | default "false" }}
53+
- name: ENABLE_FULL_WALK
54+
value: {{ .Values.poller.enableFullWalk | default "false" | quote }}
5355
volumeMounts:
5456
- name: config
5557
mountPath: "/app/config"

charts/splunk-connect-for-snmp/templates/ui/_helpers.tpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ spec:
5151
value: {{ .Values.scheduler.logLevel | default "INFO" }}
5252
- name: CONFIG_FROM_MONGO
5353
value: {{ quote .Values.UI.enable | default "false" }}
54+
- name: ENABLE_FULL_WALK
55+
value: {{ .Values.poller.enableFullWalk | default "false" | quote }}
5456
volumeMounts:
5557
- name: config
5658
mountPath: "/app/config"

charts/splunk-connect-for-snmp/values.schema.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,9 @@
370370
},
371371
"logLevel": {
372372
"type": "string"
373+
},
374+
"enableFullWalk": {
375+
"type": "boolean"
373376
}
374377
}
375378
},

charts/splunk-connect-for-snmp/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,9 @@ poller:
247247
# https://splunk.github.io/splunk-connect-for-snmp/main/microk8s/configuration/poller-configuration/#define-usernamesecrets
248248
usernameSecrets: []
249249

250+
# flag to enable polling full walk tree for devices
251+
enableFullWalk: false
252+
250253
# Here is where polling happens. Learn more on how to configure it here:
251254
# https://splunk.github.io/splunk-connect-for-snmp/main/microk8s/configuration/poller-configuration/
252255

docker_compose/.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ WORKER_TRAP_MEMORY_RESERVATIONS=250M
8686
# Inventory configuration
8787
INVENTORY_LOG_LEVEL=INFO
8888
CHAIN_OF_TASKS_EXPIRY_TIME=500
89+
ENABLE_FULL_WALK=false
8990

9091
# Traps configuration
9192
SNMP_V3_SECURITY_ENGINE_ID=80003a8c04

docker_compose/docker-compose.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ services:
117117
LOG_LEVEL: ${INVENTORY_LOG_LEVEL:-INFO}
118118
CHAIN_OF_TASKS_EXPIRY_TIME: ${CHAIN_OF_TASKS_EXPIRY_TIME:-500}
119119
CONFIG_FROM_MONGO: ${CONFIG_FROM_MONGO:-false}
120+
ENABLE_FULL_WALK: ${ENABLE_FULL_WALK:-false}
120121
volumes:
121122
- ${SCHEDULER_CONFIG_FILE_ABSOLUTE_PATH}:/app/config/config.yaml:ro
122123
- ${INVENTORY_FILE_ABSOLUTE_PATH}:/app/inventory/inventory.csv:ro

docs/microk8s/configuration/configuring-profiles.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ Sometimes static profiles have additional functionalities to be used in specific
137137

138138
#### WALK profile
139139

140+
!!!info
141+
By default the walk without any profile set is polling only `SNMPv2-MIB`. For changing the scope of the walk you can configure new walk profile or use `enableFullWalk` flag. More about it in [poller configuration](../poller-configuration/#poller-configuration-file).
142+
140143
If you would like to limit the scope of the walk, you should set one of the profiles in the inventory to point to the profile
141144
definition of the `walk` type:
142145
```yaml

docs/microk8s/configuration/poller-configuration.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ poller:
2323
- sc4snmp-hlab-sha-aes
2424
- sc4snmp-hlab-sha-des
2525
logLevel: "WARN"
26+
enableFullWalk: false
2627
inventory: |
2728
address,port,version,community,secret,security_engine,walk_interval,profiles,smart_profiles,delete
2829
10.202.4.202,,2c,public,,,2000,,,
@@ -31,6 +32,9 @@ poller:
3132
!!! info
3233
The header's line (`address,port,version,community,secret,security_engine,walk_interval,profiles,smart_profiles,delete`) is necessary for the correct execution of SC4SNMP. Do not remove it.
3334

35+
### Default walk scope
36+
The default walk profile is polling only `SNMPv2-MIB`. If the full oid tree walk is required it can be enabled by changing `enableFullWalk` flag to true.
37+
3438
### IPv6 hostname resolution
3539
When IPv6 is enabled and device is dual stack, the hostname resolution will try to resolve the name to the IPv6 address first, then to the IPv4 address.
3640

0 commit comments

Comments
 (0)