Skip to content

Commit 68e2691

Browse files
cwadhwani-splunkomrozowicz-splunk
authored andcommitted
fix: support for local mibs in docker compose installation
1 parent c8a4394 commit 68e2691

File tree

5 files changed

+36
-11
lines changed

5 files changed

+36
-11
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Unreleased
44

55
### Changed
6+
- add support for local MIB files in docker compose deployment
67
- add support for Redis HA with Sentinel integration
78
- **Redis Migration**: Replaced Bitnami Redis chart with custom Kubernetes manifests
89
- Updated to official Redis image version 8.2.2 (addresses security vulnerabilities)

docker_compose/.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ SCHEDULER_CONFIG_FILE_ABSOLUTE_PATH=
55
TRAPS_CONFIG_FILE_ABSOLUTE_PATH=
66
INVENTORY_FILE_ABSOLUTE_PATH=
77
COREFILE_ABS_PATH=
8+
LOCAL_MIBS_PATH="./local_mibs"
89
SC4SNMP_VERSION="1.14.2-beta.7"
910

1011
# Network configuration

docker_compose/docker-compose.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ services:
9999
NGINX_ENTRYPOINT_QUIET_LOGS: ${NGINX_ENTRYPOINT_QUIET_LOGS:-1}
100100
volumes:
101101
- snmp-mibserver-tmp:/tmp/
102+
- ${LOCAL_MIBS_PATH:-./local_mibs}:/app/new_mibs/src/vendor
102103
redis:
103104
<<: [*dns_and_networks, *dependend_on_core_dns]
104105
image: ${REDIS_IMAGE}:${REDIS_TAG:-latest}

docs/dockercompose/6-env-file-configuration.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ Inside the directory with the docker compose files, there is a `.env`. Variables
44

55
## Deployment
66

7-
| Variable | Description |
8-
|---------------------------------------|------------------------------------------------------------------------------------------------------|
9-
| `SC4SNMP_IMAGE` | The registry and name of the SC4SNMP image to pull |
10-
| `SC4SNMP_TAG` | SC4SNMP image tag to pull |
11-
| `SCHEDULER_CONFIG_FILE_ABSOLUTE_PATH` | Absolute path to [scheduler-config.yaml](./4-scheduler-configuration.md) file |
12-
| `TRAPS_CONFIG_FILE_ABSOLUTE_PATH` | Absolute path to [traps-config.yaml](./5-traps-configuration.md) file |
13-
| `INVENTORY_FILE_ABSOLUTE_PATH` | Absolute path to [inventory.csv](./3-inventory-configuration.md) file |
14-
| `COREFILE_ABS_PATH` | Absolute path to Corefile used by coreDNS. Default Corefile can be found inside the `docker_compose` |
15-
| `SC4SNMP_VERSION` | Version of SC4SNMP |
7+
| Variable | Description |
8+
|---------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
9+
| `SC4SNMP_IMAGE` | The registry and name of the SC4SNMP image to pull |
10+
| `SC4SNMP_TAG` | SC4SNMP image tag to pull |
11+
| `SCHEDULER_CONFIG_FILE_ABSOLUTE_PATH` | Absolute path to [scheduler-config.yaml](./4-scheduler-configuration.md) file |
12+
| `TRAPS_CONFIG_FILE_ABSOLUTE_PATH` | Absolute path to [traps-config.yaml](./5-traps-configuration.md) file |
13+
| `INVENTORY_FILE_ABSOLUTE_PATH` | Absolute path to [inventory.csv](./3-inventory-configuration.md) file |
14+
| `COREFILE_ABS_PATH` | Absolute path to Corefile used by coreDNS. Default Corefile can be found inside the `docker_compose` |
15+
| `LOCAL_MIBS_PATH` | Absolute path to the directory containing [local MIB files](../mib-request.md#configuring-path-to-local-mibs-for-docker-compose-installation). By default, it points to the `local_mibs` directory hosted with the Docker Compose package. |
16+
| `SC4SNMP_VERSION` | Version of SC4SNMP |
1617

1718

1819
## Network configuration
@@ -128,6 +129,7 @@ Inside the directory with the docker compose files, there is a `.env`. Variables
128129
| `SNMP_V3_SECURITY_ENGINE_ID` | SNMPv3 TRAPs require the configuration SNMP Engine ID of the TRAP sending application for the USM users table of the TRAP receiving application for each USM user, for example: SNMP_V3_SECURITY_ENGINE_ID=80003a8c04,aab123456 |
129130
| `INCLUDE_SECURITY_CONTEXT_ID` | Controls whether to add the context_engine_id field to v3 trap events |
130131
| `TRAPS_PORT` | External port exposed for traps server |
132+
131133
## Scheduler
132134

133135
| Variable | Description |

docs/mib-request.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ microk8s kubectl rollout restart deployment snmp-splunk-connect-for-snmp-worker-
5353
microk8s kubectl rollout restart deployment snmp-splunk-connect-for-snmp-worker-poller -n sc4snmp
5454
```
5555

56-
## Beta: use MIB server with local MIBs
56+
## Use MIB server with local MIBs
5757

5858
From the `1.15.0` version of the MIB server, there is a way to use local MIB files. This may be useful when your MIB
5959
files are proprietary, or you use SC4SNMP offline. This way, you can update necessary MIBs by yourself, without having to
@@ -68,7 +68,9 @@ vendor names will not make compilation fail, this is more for the logging purpos
6868
troubleshooting easier.
6969
3. MIB files should be named the same as the contained MIB module. The MIB module name is specified at the beginning of
7070
the MIB file before `::= BEGIN` keyword.
71-
4. Add the following to the `values.yaml`:
71+
72+
### Configuring path to local MIBs for k8s installation
73+
Add the following to the `values.yaml`:
7274

7375
```yaml
7476
mibserver:
@@ -96,3 +98,21 @@ using `persistence.existingClaim`. If you go with the `localMibs.pathToMibs` sol
9698
(with `nodeSelector` set up to schedule MIB server pods on the same node where the MIB files are),
9799
when the Node with the mapped hostPath fails, you will have to access the MIB files on another node.
98100

101+
### Configuring path to local mibs for docker-compose installation
102+
Add the following to the `.env`:
103+
104+
```
105+
LOCAL_MIBS_PATH=/home/user/local_mibs
106+
```
107+
108+
Whenever you add new MIB files, restart MIB service to compile them again, using the following command:
109+
110+
```bash
111+
sudo docker compose restart snmp-mibserver
112+
```
113+
114+
To verify that the process of compilation was completed successfully, check the mibserver logs using the following command:
115+
116+
```bash
117+
sudo docker logs snmp-mibserver
118+
```

0 commit comments

Comments
 (0)