-
Notifications
You must be signed in to change notification settings - Fork 6
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 #3 from isalgueiro/snmpv3
Add _some_ SNMP v3 support, and hopefully solve #2
- Loading branch information
Showing
9 changed files
with
152 additions
and
11 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
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
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 |
---|---|---|
@@ -0,0 +1,79 @@ | ||
################### Otilio Configuration Example ######################### | ||
|
||
############################# Otilio ###################################### | ||
|
||
otilio: | ||
# Defines how often an event is sent to the output | ||
period: 1s | ||
|
||
# SNMP host to query | ||
host: "127.0.0.1" | ||
port: 10161 | ||
|
||
# SMNP version | ||
version: 3 | ||
|
||
# SNMP user security model parameters | ||
user: "theuser" | ||
authpass: "theauthpassword" | ||
privpass: "theprivacyencryptionpassword" | ||
|
||
# oids to query | ||
# (the starting dot is intended) | ||
oids: | ||
- {oid: ".1.3.6.1.2.1.25.1", name: hrSystem} | ||
#================================ General ===================================== | ||
|
||
# The name of the shipper that publishes the network data. It can be used to group | ||
# all the transactions sent by a single shipper in the web interface. | ||
#name: | ||
|
||
# The tags of the shipper are included in their own field with each | ||
# transaction published. | ||
#tags: ["service-X", "web-tier"] | ||
|
||
# Optional fields that you can specify to add additional information to the | ||
# output. | ||
#fields: | ||
# env: staging | ||
|
||
#================================ Outputs ===================================== | ||
|
||
# Configure what outputs to use when sending the data collected by the beat. | ||
# Multiple outputs may be used. | ||
|
||
#-------------------------- Elasticsearch output ------------------------------ | ||
output.elasticsearch: | ||
# Array of hosts to connect to. | ||
hosts: ["localhost:9200"] | ||
|
||
# Optional protocol and basic auth credentials. | ||
#protocol: "https" | ||
#username: "elastic" | ||
#password: "changeme" | ||
|
||
#----------------------------- Logstash output -------------------------------- | ||
#output.logstash: | ||
# The Logstash hosts | ||
#hosts: ["localhost:5044"] | ||
|
||
# Optional SSL. By default is off. | ||
# List of root certificates for HTTPS server verifications | ||
#ssl.certificate_authorities: ["/etc/pki/root/ca.pem"] | ||
|
||
# Certificate for SSL client authentication | ||
#ssl.certificate: "/etc/pki/client/cert.pem" | ||
|
||
# Client Certificate Key | ||
#ssl.key: "/etc/pki/client/cert.key" | ||
|
||
#================================ Logging ===================================== | ||
|
||
# Sets log level. The default log level is info. | ||
# Available log levels are: critical, error, warning, info, debug | ||
#logging.level: debug | ||
|
||
# At debug level, you can selectively enable logging only for some components. | ||
# To enable all selectors use ["*"]. Examples of other selectors are "beat", | ||
# "publish", "service". | ||
#logging.selectors: ["*"] |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM alpine:3.6 | ||
RUN apk add --update net-snmp net-snmp-tools | ||
RUN sed -i 's/agentAddress udp:127.0.0.1:161/agentAddress udp:10161/g' /etc/snmp/snmpd.conf | ||
RUN net-snmp-create-v3-user -ro -A theauthpassword -a SHA -X theprivacyencryptionpassword -x DES theuser | ||
EXPOSE 10161/tcp | ||
RUN rm -rf /var/cache/apk/* | ||
ENTRYPOINT [ "snmpd", "-f" ] |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Use this dockerfile to start a testing SNMP v3 server | ||
|
||
``` | ||
$ docker build . | ||
[...] | ||
Successfully built <image id> | ||
$ docker run -p 10161:10161/udp <image id> | ||
``` |