You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: support for local mibs in docker compose installation (#1244)
* fix: support for local mibs in docker compose installation
* doc: update documentation
---------
Co-authored-by: omrozowicz-splunk <[email protected]>
|`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). |
16
+
|`SC4SNMP_VERSION`| Version of SC4SNMP |
16
17
17
18
18
19
## Network configuration
@@ -128,6 +129,7 @@ Inside the directory with the docker compose files, there is a `.env`. Variables
128
129
|`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 |
129
130
|`INCLUDE_SECURITY_CONTEXT_ID`| Controls whether to add the context_engine_id field to v3 trap events |
130
131
|`TRAPS_PORT`| External port exposed for traps server |
This creates a Kubernetes pvc with MIB files inside and maps it to the MIB server pod.
86
-
Also, you can change the storageClass and size of persistence according to the `mibserver` schema, see https://github.com/pysnmp/mibs/blob/main/charts/mibserver/values.yaml.
88
+
Also, you can change the storageClass and size of persistence according to the `mibserver` schema, see [values.yaml of the mibserver](https://github.com/pysnmp/mibs/blob/main/charts/mibserver/values.yaml).
87
89
The default persistence size is 1 Gibibyte, so consider reducing or expanding it to the amount you actually need.
90
+
88
91
Whenever you add new MIB files, rollout restart MIB server pods to compile them again, using the following command:
89
92
90
93
```bash
@@ -96,3 +99,33 @@ using `persistence.existingClaim`. If you go with the `localMibs.pathToMibs` sol
96
99
(with `nodeSelector` set up to schedule MIB server pods on the same node where the MIB files are),
97
100
when the Node with the mapped hostPath fails, you will have to access the MIB files on another node.
98
101
102
+
### Configuring path to local mibs for docker-compose installation
103
+
104
+
To point to the directory with your local MIBs, set the `LOCAL_MIBS_PATH` variable in the `.env` file located in the `docker_compose` directory:
105
+
106
+
```yaml
107
+
LOCAL_MIBS_PATH="./local_mibs"
108
+
```
109
+
110
+
By default, it is set to be `./local_mibs`, which means such directory will be created anyway in the `docker_compose` directory if the variable remains unchanged.
111
+
You can put your MIB files there, following the same structure as described above.
112
+
113
+
!!!warning
114
+
Make sure that the user running docker has read and write permissions to the `LOCAL_MIBS_PATH` directory. Assign the user with permissions if necessary.
115
+
116
+
Whenever you add new MIB files, restart MIB service to compile them again, using the following command:
117
+
118
+
```bash
119
+
sudo docker compose restart snmp-mibserver
120
+
```
121
+
122
+
To verify that the process of compilation was completed successfully, check the mibserver logs using the following command:
123
+
124
+
```bash
125
+
sudo docker logs snmp-mibserver
126
+
```
127
+
128
+
If you want to use a different directory, you can change the mapping in the `docker-compose.yaml` file and set an absolute path to your directory.
129
+
130
+
!!!note
131
+
It is a good practice to update `LOCAL_MIBS_PATH` to be an absolute path to `local_mibs` directory. For example `LOCAL_MIBS_PATH=/home/user/local_mibs`.
0 commit comments