-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathmini-snmpd.8
146 lines (146 loc) · 4.31 KB
/
mini-snmpd.8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
.Dd Feb 2, 2020
.Dt MINI-SNMPD 8 SMM
.Os
.Sh NAME
.Nm mini-snmpd
.Nd a minimal implementation of an SNMP daemon
.Sh SYNOPSIS
.Nm mini-snmpd
.Op Fl 4, -use-ipv4
.Op Fl 6, -use-ipv6
.Op Fl a, -auth
.Op Fl c, -community Ar STR
.Op Fl C, -contact Ar NAME
.Op Fl d, -disks Ar DIR
.Op Fl D, -description Ar STR
.Op Fl f, -file Ar FILE
.Op Fl h, -help
.Op Fl i, -interfaces Ar IFNAME
.Op Fl I, -listen Ar IFNAME
.Op Fl l, -loglevel Ar LEVEL
.Op Fl L, -location Ar STR
.Op Fl n, -foreground
.Op Fl p, -udp-port Ar PORT
.Op Fl P, -tcp-port Ar PORT
.Op Fl s, -syslog
.Op Fl t, -timeout Ar SEC
.Op Fl u, -drop-privs Ar USER
.Op Fl v, -version
.Op Fl V, -vendor Ar OID
.Sh DESCRIPTION
.Nm
is a program that serves basic system parameters to clients using the
Simple Network Management Protocol (SNMP) version 1 or 2c.
.Pp
By default
.Nm
starts in the background, detaching from the controlling terminal, like
a traditional UNIX daemon. Modern init systems may require services to
run in the foreground, to that end the
.Fl n
option in combination with the
.Fl s
option to enable logging using syslog.
.Pp
The default vendor OID is only a placeholder where you need to insert
the PEN (private enterprise number) of your organization. If you do not
have one you can get one assigned by the Internet Assigned Numbers
Authority (IANA), free of charge. See their PEN application web page at
.Xr http://pen.iana.org/ .
.Sh OPTIONS
.Bl -tag -width Ds
.It Fl 4, -use-ipv4
Use IPv4, default
.It Fl 6, -use-ipv6
Use IPv6
.It Fl a, -auth
Require client authentication, thus SNMP version 2c, default is off.
.It Fl c, Fl -community Ar STR
SNMP version 2c authentication, or community, string, default is
"public". Remember to also enable
.Fl -auth
to activate authentication.
.It Fl C, Fl -contact Ar NAME
Contact address to device administrator, default is none.
.It Fl d, Fl -disks Ar DIR[,DIR,DIR]
The list of disk mount points to monitor, default is '/'. Separate
multiple directories with a comma, colon, or a semicolon.
.It Fl D, Fl -description Ar STR
The description of the device, default is empty.
.It Fl f, -file Ar FILE
Configuration file, default:
.Pa /etc/mini-snmpd.conf
.It Fl h, -help
Show summary of command line options and exit.
.It Fl i, Fl -interface Ar IFNAME[,IFNAME]
List of network interfaces to monitor for IF-MIB, default is none.
Separate multiple interface names with comma or semicolon,
.Em not
colon!
.It Fl I, Fl -listen Ar IFNAME
Network interface to bind to, default is listen on all interfaces.
.It Fl l, Fl -loglevel Ar LEVEL
Set log level: none, err, info, notice, debug. Default: notice.
.It Fl L, Fl -location Ar STR
The location of the device, default is empty.
.It Fl n, -foreground
Run in foreground, do not detach from controlling terminal.
.It Fl p, Fl -udp-port Ar PORT
UDP port to listen to for incoming connections, default is 161.
.It Fl P, Fl -tcp-port Ar PORT
TCP port to listen to for incoming connections, default is 161.
.It Fl s, -syslog
Use syslog for logging, even if running in the foreground.
.It Fl t, Fl -timeout Ar SEC
Timeout for updating the MIB variables, default is 1 second.
.It Fl u, -drop-privs Ar USER
Drop privileges after opening sockets to
.Ar USER ,
default: no.
.It Fl v, Fl -version
Show program version and exit.
.It Fl V, Fl -vendor Ar OID
The OID of the device vendor, this MUST be changed to your own
organization's OID. Default is .1.3.6.1.4.1
.El
.Sh SIGNALS
.Nm
responds to the following signals:
.Pp
.Bl -tag -width TERM -compact
.It TERM
Tell
.Nm
to exit gracefully
.It HUP
Same as TERM
.El
.Sh FILES
.Bl -tag -width /var/run/mini-snmpd.pid -compact
.It Pa /etc/mini-snmpd.conf
configuration file. See
.Xr mini-snmpd.conf 5
for more information.
.It Pa /etc/default/mini-snmpd
Sourced by systemd unit file,
.Sy $DAEMON_OPTS
is supported
.It Pa /var/run/mini-snmpd.pid
default process ID file
.El
.Sh SEE ALSO
.Xr mini-snmpd.conf 5
.Sh EXAMPLE
mini-snmpd -a -c secret -D "My device" -d /cf -i lo,eth0
.Pp
This command starts the program at the default port, using the community
string "secret", the system description "My device" and provides disk
statistics for the "/cf" (compact flash) mount point, with network
interface statistics for the interfaces "lo" and "eth0".
.Sh AUTHORS
.Nm
was originally written by Robert Ernst
.Aq mailto:robert.ernst@aon.at .
It is currently maintained by Joachim Nilsson
.Aq mailto:troglobit@gmail.com
at GitHub.