-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from testainers/dev
Version 0.0.4.
- Loading branch information
Showing
8 changed files
with
67 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ jobs: | |
- 3.17 | ||
- 3.18 | ||
- 3.19 | ||
- 3.20 | ||
steps: | ||
- name: Code Checkout | ||
uses: actions/checkout@v4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,18 +31,21 @@ Obrigado pelo seu apoio contínuo! | |
|
||
## Environment Variables | ||
|
||
| Variable | Options | Default | | ||
|-----------------------|-----------------|--------------------------------| | ||
| SNMP_COMMUNITY | -- | public | | ||
| SNMP_LOCATION | -- | At flying circus | | ||
| SNMP_CONTACT | -- | Testainers <[email protected]> | | ||
| SNMP_SERVICES | -- | 72 | | ||
| SNMP_V3_USER | -- | -- | | ||
| SNMP_V3_USER_TYPE | rouser - rwuser | rouser | | ||
| SNMP_V3_AUTH_PROTOCOL | MD5 - SHA | SHA | | ||
| SNMP_V3_AUTH_PWD | -- | -- | | ||
| SNMP_V3_PRIV_PROTOCOL | DES - AES | AES | | ||
| SNMP_V3_PRIV_PWD | -- | -- | | ||
| Variable | Options | Default | | ||
|-----------------------|-----------------|---------| | ||
| SNMP_COMMUNITY | -- | public | | ||
| SNMP_LOCATION | -- | -- | | ||
| SNMP_CONTACT | -- | -- | | ||
| SNMP_SERVICES | -- | -- | | ||
| SNMP_V3_USER | -- | -- | | ||
| SNMP_V3_USER_TYPE | rouser - rwuser | rouser | | ||
| SNMP_V3_AUTH_PROTOCOL | MD5 - SHA | SHA | | ||
| SNMP_V3_AUTH_PWD | -- | -- | | ||
| SNMP_V3_PRIV_PROTOCOL | DES - AES | AES | | ||
| SNMP_V3_PRIV_PWD | -- | -- | | ||
|
||
If `SNMP_LOCATION`, `SNMP_CONTACT` or `SNMP_SERVICES` are not set, they may | ||
be writable. | ||
|
||
## How to Use | ||
|
||
|
@@ -73,7 +76,35 @@ docker build . --no-cache -t snmpd-container | |
Run: | ||
|
||
```shell | ||
docker run -d --rm --name snmpd -p 5161:161/udp snmpd-container | ||
docker run -d --rm --name snmpd -p 5161:161/udp \ | ||
-e SNMP_V3_USER_TYPE=rwuser \ | ||
-e SNMP_V3_USER=testainers \ | ||
-e SNMP_V3_AUTH_PWD=authpass \ | ||
-e SNMP_V3_PRIV_PWD=privpass \ | ||
snmpd-container | ||
``` | ||
|
||
Test: | ||
|
||
```shell | ||
snmpwalk -v3 -On -u testainers -l authPriv \ | ||
-a SHA -A authpass \ | ||
-x AES -X privpass \ | ||
localhost:5161 .1.3.6.1.2.1.1 | ||
``` | ||
|
||
```shell | ||
snmpset -v3 -u testainers -l authPriv \ | ||
-a SHA -A authpass \ | ||
-x AES -X privpass \ | ||
localhost:5161 .1.3.6.1.2.1.1.4.0 s "[email protected]" | ||
``` | ||
|
||
```shell | ||
snmpget -v3 -u testainers -l authPriv \ | ||
-a SHA -A authpass \ | ||
-x AES -X privpass \ | ||
localhost:5161 .1.3.6.1.2.1.1.4.0 | ||
``` | ||
|
||
Access: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,15 +30,21 @@ if [ -z "$SNMP_COMMUNITY" ]; then | |
export SNMP_COMMUNITY="public" | ||
fi | ||
|
||
if [ -z "$SNMP_LOCATION" ]; then | ||
export SNMP_LOCATION="At flying circus" | ||
if [ -n "$SNMP_LOCATION" ]; then | ||
export SNMP_LOCATION="sysLocation $SNMP_LOCATION" | ||
else | ||
export SNMP_LOCATION="" | ||
fi | ||
|
||
if [ -z "$SNMP_CONTACT" ]; then | ||
export SNMP_CONTACT="Testainers <[email protected]>" | ||
if [ -n "$SNMP_CONTACT" ]; then | ||
export SNMP_CONTACT="sysContact $SNMP_CONTACT" | ||
else | ||
export SNMP_CONTACT="" | ||
fi | ||
|
||
if [ -z "$SNMP_SERVICES" ]; then | ||
if [ -n "$SNMP_SERVICES" ]; then | ||
export SNMP_SERVICES="sysServices $SNMP_SERVICES" | ||
else | ||
export SNMP_SERVICES="72" | ||
fi | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
version: 0.0.3 | ||
version: 0.0.4 |