Debian Codegraph @

man/dhcpd-pools.1.in

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 .TH DHCPD-POOLS "1" "2017-11-15" "@VERSION@" "User Commands"
2 .SH NAME
3 dhcpd-pools \- ISC dhcpd pools usage analysis
4 .SH SYNOPSIS
5 .SY dhcpd-pools
6 .OP \-\-config file
7 .OP \-\-leases file
8 .OP \-\-sort nimcptTe
9 .OP \-\-reverse
10 .OP \-\-format tHcxXjJ
11 .OP \-\-mustach template
12 .OP \-\-output file
13 .OP \-\-limit nr
14 .OP \-\-color when
15 .OP \-\-warning percent
16 .OP \-\-critical percent
17 .OP \-\-warn\-count number
18 .OP \-\-crit\-count number
19 .OP \-\-snet\-alarms
20 .OP \-\-minsize size
21 .OP \-\-perfdata
22 .OP \-\-version
23 .OP \-\-help
24 .YS
25 .SH DESCRIPTION
26 The program analyses ISC dhcpd shared network and pool usage and outputs the
27 results in a format selected by user.
28 .SH OUTPUT FIELDS
29 .TP
30 .I "shared net name"
31 Name of the shared-network for the range.
32 .TP
33 .I "first ip"
34 First IP in lease pool range.
35 .TP
36 .I "last ip"
37 Last IP in lease pool range.
38 .TP
39 .I "max"
40 Number of IPs which exist in a pool, shared network or all together.
41 .TP
42 .I "cur"
43 Number of leases currently in use.
44 .TP
45 .I "percent"
46 Percent of IPs currently in use compared to max.
47 .TP
48 .I "touch"
49 Number of IP's which appear in the lease file, but who's leases have expired.
50 A touched IP is either expired or abandoned. The touched IP count is
51 somewhat misleading when you try to determine if an IP pool is big enough; it
52 is a better indicator of whether a pool is too large.
53 .TP
54 .I "t+c"
55 The sum of Touched and Currently in-use leases.
56 .TP
57 .I "t+c perc"
58 Percent of IPs either touched or currently in use, compared to max.
59 .TP
60 .I "bu"
61 Failover pair can allocate these addresses. The count appears only if there
62 is failover configuration.
63 .TP
64 .I "bu perc"
65 Percent of addresses that failover pair can allocate. The percent appears
66 only if there is failover configuration.
67 .SH OPTIONS
68 .TP
69 \fB\-c\fR, \fB\-\-config\fR=\fIFILE\fR
70 Path to the dhcpd.conf file. If the dhcpd.conf has include files they
71 can be analysed separately, that can be useful when trying to understand
72 or monitor subset of data.
73 .TP
74 \fB\-l\fR, \fB\-\-leases\fR=\fIFILE\fR
75 Path to the dhcpd.leases file.
76 .TP
77 \fB\-s\fR, \fB\-\-sort\fR=\fI[nimcptTe]\fR
78 Sort ranges by chosen fields as a sorting keys. Keys weight from left to
79 right, i.e., if more weighting keys are equal next one is used. The IP
80 field is default sort key.
81 .TP
82 \fB\-r\fR, \fB\-\-reverse\fR
83 Sort results in reverse order.
84 .TP
85 \fB\-f\fR, \fB\-\-format\fR=\fI[tHcxXjJ]\fR
86 Output format.
87 Text
88 .RI ( t ).
89 Full-html
90 .RI ( H )
91 page output. In html page critical and warning thresholds can be visualized
92 with \-\-color=always option. The
93 .RI ( c )
94 stands for comma-separated values. Output format xml
95 .RI ( x )
96 is similar to the dhcpstatus Perl module output. The extended xml
97 .RI ( X )
98 format will print ethernet address details. The
99 .RI ( j )
100 will output in json format, which can be extended with
101 .RI ( J )
102 to include ethernet address.
103 .IP
104 The default format is
105 .IR @OUTPUT_FORMAT@ .
106 .TP
107 \fB\-\-mustach\fR=\fITEMPLATE\fR
108 Output using mustach
109 .I template
110 file. This is useful when the native output formats controlled with
111 .B \-\-format
112 option do not provide what you need. See below example mustach template
113 that is using all available {{tags}} to demonstrate what can be displayed
114 and how.
115 .IP
116 @bindir@/dhcpd-pools --config @docdir@/dhcpd.conf --leases
117 @docdir@/dhcpd.leases --mustach @docdir@/mustach.template
118 .TP
119 \fB\-o\fR, \fB\-\-output\fR=\fIFILE\fR
120 .I File
121 where output is written. Default is stdout.
122 .TP
123 \fB\-L\fR, \fB\-\-limit\fR=\fINR\fR
124 The
125 .I NR
126 will limit what will be printed. Syntax is similar to
127 .IR chmod (1)
128 permission string. The
129 .I NR
130 limit string uses two digits which vary between
131 .IR 0 \ to \ 7 .
132 The first digit determines which headers to display, and the second digit
133 determines which numeric analysis tables to include in the output. The
134 following values are "OR'd" together to create the desired output. The
135 default is
136 .IR @OUTPUT_LIMIT@ .
137 .IP
138 .TS
139 tab(:);
140 ll.
141 0\fI1\fR:Print ranges
142 0\fI2\fR:Print shared networks
143 0\fI4\fR:Print total summary
144 \fI1\fR0:Print range header
145 \fI2\fR0:Print shared network header
146 \fI4\fR0:Print total summary header
147 .TE
148 .IP
149 The output limit for total summary has special meaning in
150 .B \-\-warning
151 and
152 .B \-\-critical
153 alarming context. When the alarming is in use, and total is not wanted
154 to be seen then in the case of alarming returning success nothing is
155 printed.
156 .TP
157 \fB\-\-color\fR=\fIwhen\fR
158 Use yellow for warning, red for critical, green for suppressed by \-\-minsize
159 and blue when \-\-snet\-alarms is the cause of suppression or shared network
160 does not have any ranges. The
161 .I when
162 string can be
163 .BR always ,
164 .BR never ,
165 or
166 .BR auto .
167 Default is auto, that uses colors when command is running in interactive
168 terminal. With use of
169 .B \-\-warning
170 or
171 .B \-\-critical
172 coloring thresholds can be changed, but one must also use
173 .B \-\-format=text
174 to avoid turning on alarting mode.
175 .TP
176 \fB\-\-skip\fR=\fIwhen\fR
177 The
178 .I when
179 can be one of the following:
180 .IR ok ,
181 .IR warning ,
182 .IR critical ,
183 .IR minsize ,
184 or
185 .IR suppressed .
186 The skipping criteria is exact match with colors in \-\-color option.
187 .TP
188 \fB\-\-warning\fR=\fIpercent\fR
189 Turn on alarm output format, and specify percentage number which will
190 cause an alarm. If either a range or shared network will exceed
191 warning level return value of the command is
192 .BR 1 .
193 If only range monitoring is needed one can use limit option for scoping,
194 for example
195 .IR \-L10 .
196 To monitor shared network only the limit would be
197 .IR \-L20 .
198 If warning percentage is not specified it defaults to
199 .BR @ALARM_WARN@ .
200 The
201 .I percent
202 argument allows fractions, e.g., 88.8, to be used.
203 .TP
204 \fB\-\-critical\fR=\fIpercent\fR
205 The option is similar to warning, with exception of return value which
206 is
207 .BR 2 .
208 If critical percentage is not specified it defaults to
209 .BR @ALARM_CRIT@ .
210 .TP
211 \fB\-\-warn\-count\fR=\fInumber\fR
212 A
213 .I number
214 of free leases before alarm is raised. When specified both \-\-warning
215 .I percent
216 and count
217 .I number
218 are required to be exceeded in order to alarm criteria being fulfilled.
219 .IP
220 This option is intended to be used in setup where very large and small
221 shared-networks and ranges co-exists. In such environments percent based
222 alarming can lead to either flood of alarms about small ranges, or way too
223 great overhead of free addresses in large shared-networks. Suggested usage
224 is to set percentage to a level that makes small ranges to ring, and set the
225 count to match level when an enormous shared-network is too few free leases.
226 .IP
227 Defaults to 2^32, that is size of entire IPv4 address space.
228 .TP
229 \fB\-\-crit\-count\fR=\fInumber\fR
230 Same as \-\-warn\-count, but for critical alarms.
231 .TP
232 \fB\-\-snet\-alarms
233 Suppress range alarms that are part of shared networks. Use of this option
234 will keep alarm criteria applied to ranges that are not part of shared-net
235 along with shared-net alarms. This option may help reducing alarm noise for
236 configurations that has lots of small ranges in big shared-networks.
237 .TP
238 \fB\-\-minsize\fR=\fIsize\fR
239 Ignore ranges and shared networks that are smaller or equal to the
240 defined size. This option is meaningful only in context of alarming, and
241 will intended to suppress for example single host ranges. By default this
242 option is not in use.
243 .TP
244 \fB\-p\fR, \fB\-\-perfdata\fR
245 Print additional performance data, like lease count, touched leases and
246 backup leases. This option is meaningful only in context of alarming and
247 will print lots of data, if there are many networks. By default this option
248 is not in use.
249 .TP
250 \fB\-A\fR, \fB\-\-all\-as\-shared\fR
251 Treat all stand-alone subnets as shared-network with named formed from it's
252 CIDR. By default this option is not in use for backwards compatibility.
253 .TP
254 \fB\-\-ip\-version\fR=\fI4|6\fR
255 Force command to read configuration and leases files in IPv4 or IPv6 mode.
256 Notice that when inputs do not match with what is forced analysis output is
257 garbage. This option should not be necessary to use, and exists only to
258 allow debugging.
259 .TP
260 \fB\-v\fR, \fB\-\-version\fR
261 Print version information to standard output and exit successfully.
262 .TP
263 \fB\-h\fR, \fB\-\-help\fR
264 Print help to standard output and exit successfully.
265 .SH EXAMPLES
266 .TP
267 Print ranges header, and analysis.
268 $ dhcpd-pools \-L 11 \-c dhcpd.conf \-l dhcpd.leases
269 .br
270 Ranges:
271 .br
272 shared net name [...]
273 .TP
274 Print shared networks and totals, both headers and results
275 $ dhcpd-pools \-L 66 \-c dhcpd.conf \-l dhcpd.leases shared net name
276 .br
277 [...]
278 .TP
279 Alarming
280 $ dhcpd-pools \-c dhcpd.conf \-l dhcpd.leases \-\-critical 80.1 \-\-warning 75
281 .br
282 CRITICAL: dhcpd-pools: Ranges; crit: 14 warn: 22 ok: 220 Shared nets; crit: 1 warn: 0 ok: 4
283 .IP
284 $ dhcpd-pools \-c dhcpd.conf \-l dhcpd.leases \-L 22 \-\-critical 70 \-\-warning 50
285 .br
286 [no-output]
287 .br
288 Suppress printing OK, and make alarm only to go off if shared networks
289 exceed critial or warning levels.
290 .SH FILES
291 .TP
292 @DHCPDCONF_FILE@
293 ISC dhcpd configuration file.
294 .TP
295 @DHCPDLEASE_FILE@
296 ISC dhcpd lease file.
297 .TP
298 @docdir@/prometheus.template
299 Prometheus text file collector mustach template.
300 .SH AUTHORS
301 Original design by Sami Kerola.
302 .br
303 uthash by Troy D. Hanson.
304 .br
305 XML support by Dominic Germain, Sogetel inc.
306 .br
307 IPv6 support by Cheer Xiao.
308 .br
309 Mustache templating support by José Bollo.
310 .SH LICENSE
311 The dhcpd-pools uses FreeBSD License, uthash uses BSD license, the mustache
312 uses Apache License, and the gnulib modules are mostly, but not entirely,
313 GPL.
314 .SH "REPORTING BUGS"
315 Report bugs to
316 .MT @PACKAGE_BUGREPORT@
317 @PACKAGE_MAINTAINER@
318 .ME
319 .br
320 .UR @PACKAGE_URL@
321 Home page
322 .UE
323 .SH "SEE ALSO"
324 .BR dhcpd.leases (5),
325 .BR dhcpd.conf (5),
326 .BR chmod (1),
327 .UR https://mustache.github.io/
328 .UE