Giter Club home page Giter Club logo

docker-snmpd's Introduction

NET-SNMP Daemon

CircleCI Build Status master
CircleCI Build Status alpine
GitHub Open Issues GitHub Stars GitHub Forks
Stars on Docker Hub Pulls on Docker Hub

Deploy to Docker Cloud

This is polinux/snmpd docker image with snmpd daemon running in foreground and based on offcial CentOS-7 and offers ability to provide any argument to snmpd process.

For super small image use tag alpine

This container is built that any extra parameters provided to docker run will be passed directly to snmpd command. For example, if you run docker run [options] polinux/snmpd -c FILE you pass -c FILE to snmpd daemon.

Usage

Basic

docker run \
-d \
--name snmpd \
-p 161:161/udp \
polinux/snmpd

Basic alpine

docker run \
-d \
--name snmpd \
-p 161:161/udp \
polinux/snmpd:alpine

Mount custom config , override some options

Using custom config file:

docker run \
-d \
--name snmpd \
-p 161:161/udp \
-v /my-snmpd.conf:/etc/snmpd/snmpd.conf \
polinux/snmpd \
-c /etc/snmpd/snmod.conf

Alpine

docker run \
-d \
--name snmpd \
-p 161:161/udp \
-v /my-snmpd.conf:/etc/snmpd/snmpd.conf \
polinux/snmpd:alpine \
-c /etc/snmpd/snmod.conf

SNMPD CMD params

snmpd command can be used with some parameters to define monitoring server address and other parameters. Simple --help output below:

-f (foregroud) used as default in this image

Usage:  snmpd [OPTIONS] [LISTENING ADDRESSES]

        Version:  5.7.3
        Web:      http://www.net-snmp.org/
        Email:    [email protected]

  -a                    log addresses
  -A                    append to the logfile rather than truncating it
  -c FILE[,...]         read FILE(s) as configuration file(s)
  -C                    do not read the default configuration files
                          (config search path: /etc/snmp:/usr/share/snmp:/usr/lib/snmp:/root/.snmp)
  -d                    dump sent and received SNMP packets
  -D[TOKEN[,...]]       turn on debugging output for the given TOKEN(s)
                          (try ALL for extremely verbose output)
                          Don't put space(s) between -D and TOKEN(s).
  -f                    do not fork from the shell
  -g GID                change to this numeric gid after opening
                          transport endpoints
  -h, --help            display this usage message
  -H                    display configuration file directives understood
  -I [-]INITLIST        list of mib modules to initialize (or not)
                          (run snmpd with -Dmib_init for a list)
  -L <LOGOPTS>          toggle options controlling where to log to
        e:           log to standard error
        o:           log to standard output
        n:           don't log at all
        f file:      log to the specified file
        s facility:  log to syslog (via the specified facility)

        (variants)
        [EON] pri:   log to standard error, output or /dev/null for level 'pri' and above
        [EON] p1-p2: log to standard error, output or /dev/null for levels 'p1' to 'p2'
        [FS] pri token:    log to file/syslog for level 'pri' and above
        [FS] p1-p2 token:  log to file/syslog for levels 'p1' to 'p2'
  -m MIBLIST            use MIBLIST instead of the default MIB list
  -M DIRLIST            use DIRLIST as the list of locations to look for MIBs
                          (default $HOME/.snmp/mibs:/usr/share/snmp/mibs)
  -p FILE               store process id in FILE
  -q                    print information in a more parsable format
  -r                    do not exit if files only accessible to root
                          cannot be opened
  -u UID                change to this uid (numeric or textual) after
                          opening transport endpoints
  -v, --version         display version information
  -V                    verbose display
  -x ADDRESS            use ADDRESS as AgentX address
  -X                    run as an AgentX subagent rather than as an
                          SNMP master agent

Deprecated options:
  -l FILE               use -Lf <FILE> instead
  -P                    use -p instead
  -s                    use -Lsd instead
  -S d|i|0-7            use -Ls <facility> instead

docker-snmpd's People

Contributors

pozgo avatar v-zhuravlev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

docker-snmpd's Issues

How to run agentx

Hi,

I was trying to setup net-snmp for agentx inside the container for my application. however I can't start the snmpd daemon.

The host on which my container is running has an IP 172.16.111.195. Now my container's IP will change everytime I bounce them so I can't configure the internal IP and also my snmp traps from my NMS need to communicate to the master agent on the host IP. So I 'm not able to figure out how do I map the agentx IP and port with the host

This is what I 'm getting in snmpd.logs.
Error: Couldn't open a master agentx socket to listen on (tcp:172.16.111.195:10705):

Looking forward to some help from you.

Thanks.

typo

-c /etc/snmpd/snmod.conf

should be

-c /etc/snmpd/snmpd.conf

right?

Small typo in/etc/snmpd/snmod.conf

Please correct the typo in -c /etc/snmpd/snmod.conf to -c /etc/snmp/snmpd.conf. Thanks.

# docker exec snmpd ls -l /etc/snmp
total 24
-rw------- 1 root root 18861 Jan 25 15:52 snmpd.conf
-rw------- 1 root root   220 Jan 25 15:52 snmptrapd.conf

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.