| 1 |
=== color text |
| 2 |
Ranges: |
| 3 |
shared net name first ip last ip max cur percent touch t+c t+c perc |
| 4 |
example1 10.0.0.1 - 10.0.0.20 20 11 55.000 0 11 55.000 |
| 5 |
example1 10.1.0.1 - 10.1.0.20 20 10 50.000 0 10 50.000 |
| 6 |
example2 10.2.0.1 - 10.2.0.20 20 8 40.000 0 8 40.000 |
| 7 |
example2 10.3.0.1 - 10.3.0.20 20 9 45.000 0 9 45.000 |
| 8 |
All networks 10.4.0.1 - 10.4.0.20 20 5 25.000 0 5 25.000 |
| 9 |
|
| 10 |
Shared networks: |
| 11 |
name max cur percent touch t+c t+c perc |
| 12 |
example1 40 21 52.500 0 21 52.500 |
| 13 |
example2 40 17 42.500 0 17 42.500 |
| 14 |
|
| 15 |
Sum of all ranges: |
| 16 |
name max cur percent touch t+c t+c perc |
| 17 |
All networks 100 43 43.000 0 43 43.000 |
| 18 |
=== html |
| 19 |
<!DOCTYPE html> |
| 20 |
<html> |
| 21 |
<head> |
| 22 |
<title>ISC dhcpd dhcpd-pools output</title> |
| 23 |
<meta charset="utf-8"> |
| 24 |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| 25 |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
| 26 |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" type="text/css"> |
| 27 |
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.12.1/css/jquery.dataTables.min.css"> |
| 28 |
<style type="text/css"> |
| 29 |
table.dhcpd-pools th { text-transform: capitalize } |
| 30 |
</style> |
| 31 |
</head> |
| 32 |
<body> |
| 33 |
<div class="container"> |
| 34 |
<h2>ISC DHCPD status</h2> |
| 35 |
<h3>Sum of all</h3> |
| 36 |
<table id="a" class="dhcpd-pools order-column table table-hover" summary="all"> |
| 37 |
<thead> |
| 38 |
<tr> |
| 39 |
<th>name</th> |
| 40 |
<th>max</th> |
| 41 |
<th>cur</th> |
| 42 |
<th>free</th> |
| 43 |
<th>percent</th> |
| 44 |
<th>touch</th> |
| 45 |
<th>t+c</th> |
| 46 |
<th>t+c perc</th> |
| 47 |
</tr> |
| 48 |
</thead> |
| 49 |
<tbody> |
| 50 |
<tr> |
| 51 |
<td>All networks</td> |
| 52 |
<td>100</td> |
| 53 |
<td>43</td> |
| 54 |
<td>57</td> |
| 55 |
<td>43.000</td> |
| 56 |
<td>0</td> |
| 57 |
<td>43</td> |
| 58 |
<td>43.000</td> |
| 59 |
</tr> |
| 60 |
</tbody> |
| 61 |
</table> |
| 62 |
<h3>Shared networks</h3> |
| 63 |
<table id="s" class="dhcpd-pools order-column table table-hover" summary="snet"> |
| 64 |
<thead> |
| 65 |
<tr> |
| 66 |
<th>name</th> |
| 67 |
<th>max</th> |
| 68 |
<th>cur</th> |
| 69 |
<th>free</th> |
| 70 |
<th>percent</th> |
| 71 |
<th>touch</th> |
| 72 |
<th>t+c</th> |
| 73 |
<th>t+c perc</th> |
| 74 |
</tr> |
| 75 |
</thead> |
| 76 |
<tbody> |
| 77 |
<tr> |
| 78 |
<td>example1</td> |
| 79 |
<td>40</td> |
| 80 |
<td>21</td> |
| 81 |
<td>19</td> |
| 82 |
<td>52.5</td> |
| 83 |
<td>0</td> |
| 84 |
<td>21</td> |
| 85 |
<td>52.500</td> |
| 86 |
</tr> |
| 87 |
<tr> |
| 88 |
<td>example2</td> |
| 89 |
<td>40</td> |
| 90 |
<td>17</td> |
| 91 |
<td>23</td> |
| 92 |
<td>42.5</td> |
| 93 |
<td>0</td> |
| 94 |
<td>17</td> |
| 95 |
<td>42.500</td> |
| 96 |
</tr> |
| 97 |
</tbody> |
| 98 |
</table> |
| 99 |
<h3>Ranges</h3> |
| 100 |
<table id="r" class="dhcpd-pools order-column table table-hover" summary="ranges"> |
| 101 |
<thead> |
| 102 |
<tr> |
| 103 |
<th>shared net name</th> |
| 104 |
<th>first ip</th> |
| 105 |
<th>last ip</th> |
| 106 |
<th>max</th> |
| 107 |
<th>cur</th> |
| 108 |
<th>free</th> |
| 109 |
<th>percent</th> |
| 110 |
<th>touch</th> |
| 111 |
<th>t+c</th> |
| 112 |
<th>t+c perc</th> |
| 113 |
</tr> |
| 114 |
</thead> |
| 115 |
<tbody> |
| 116 |
<tr> |
| 117 |
<td>example1</td> |
| 118 |
<td>10.0.0.1</td> |
| 119 |
<td>10.0.0.20</td> |
| 120 |
<td>20</td> |
| 121 |
<td>11</td> |
| 122 |
<td>9</td> |
| 123 |
<td>55</td> |
| 124 |
<td>0</td> |
| 125 |
<td>11</td> |
| 126 |
<td>55.000</td> |
| 127 |
</tr> |
| 128 |
<tr> |
| 129 |
<td>example1</td> |
| 130 |
<td>10.1.0.1</td> |
| 131 |
<td>10.1.0.20</td> |
| 132 |
<td>20</td> |
| 133 |
<td>10</td> |
| 134 |
<td>10</td> |
| 135 |
<td>50</td> |
| 136 |
<td>0</td> |
| 137 |
<td>10</td> |
| 138 |
<td>50.000</td> |
| 139 |
</tr> |
| 140 |
<tr> |
| 141 |
<td>example2</td> |
| 142 |
<td>10.2.0.1</td> |
| 143 |
<td>10.2.0.20</td> |
| 144 |
<td>20</td> |
| 145 |
<td>8</td> |
| 146 |
<td>12</td> |
| 147 |
<td>40</td> |
| 148 |
<td>0</td> |
| 149 |
<td>8</td> |
| 150 |
<td>40.000</td> |
| 151 |
</tr> |
| 152 |
<tr> |
| 153 |
<td>example2</td> |
| 154 |
<td>10.3.0.1</td> |
| 155 |
<td>10.3.0.20</td> |
| 156 |
<td>20</td> |
| 157 |
<td>9</td> |
| 158 |
<td>11</td> |
| 159 |
<td>45</td> |
| 160 |
<td>0</td> |
| 161 |
<td>9</td> |
| 162 |
<td>45.000</td> |
| 163 |
</tr> |
| 164 |
<tr> |
| 165 |
<td>All networks</td> |
| 166 |
<td>10.4.0.1</td> |
| 167 |
<td>10.4.0.20</td> |
| 168 |
<td>20</td> |
| 169 |
<td>5</td> |
| 170 |
<td>15</td> |
| 171 |
<td>25</td> |
| 172 |
<td>0</td> |
| 173 |
<td>5</td> |
| 174 |
<td>25.000</td> |
| 175 |
</tr> |
| 176 |
</tbody> |
| 177 |
</table> |
| 178 |
<br /><div class="well well-lg"> |
| 179 |
More info at <a href="http://dhcpd-pools.sourceforge.net/">http://dhcpd-pools.sourceforge.net/</a> |
| 180 |
</small></div></div> |
| 181 |
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" type="text/javascript"></script> |
| 182 |
<script type="text/javascript" src="https://cdn.datatables.net/v/bs/jq-3.2.1/dt-1.10.16/datatables.min.js"></script> |
| 183 |
<script type="text/javascript" class="init">$(document).ready(function() { $('#s').DataTable({ "iDisplayLength": 50, "lengthMenu": [ [25, 50, 100, -1], [25, 50, 100, "All"] ], "order": [[ 4, "desc" ]] } ); } );</script> |
| 184 |
<script type="text/javascript" class="init">$(document).ready(function() { $('#r').DataTable({ "iDisplayLength": 100, "lengthMenu": [ [25, 50, 100, -1], [25, 50, 100, "All"] ], "order": [[ 6, "desc" ]] } ); } );</script> |
| 185 |
</body></html> |
| 186 |
=== xml |
| 187 |
<dhcpstatus> |
| 188 |
<subnet> |
| 189 |
<location>example1</location> |
| 190 |
<range>10.0.0.1 - 10.0.0.20</range> |
| 191 |
<defined>20</defined> |
| 192 |
<used>11</used> |
| 193 |
<touched>0</touched> |
| 194 |
<free>9</free> |
| 195 |
</subnet> |
| 196 |
<subnet> |
| 197 |
<location>example1</location> |
| 198 |
<range>10.1.0.1 - 10.1.0.20</range> |
| 199 |
<defined>20</defined> |
| 200 |
<used>10</used> |
| 201 |
<touched>0</touched> |
| 202 |
<free>10</free> |
| 203 |
</subnet> |
| 204 |
<subnet> |
| 205 |
<location>example2</location> |
| 206 |
<range>10.2.0.1 - 10.2.0.20</range> |
| 207 |
<defined>20</defined> |
| 208 |
<used>8</used> |
| 209 |
<touched>0</touched> |
| 210 |
<free>12</free> |
| 211 |
</subnet> |
| 212 |
<subnet> |
| 213 |
<location>example2</location> |
| 214 |
<range>10.3.0.1 - 10.3.0.20</range> |
| 215 |
<defined>20</defined> |
| 216 |
<used>9</used> |
| 217 |
<touched>0</touched> |
| 218 |
<free>11</free> |
| 219 |
</subnet> |
| 220 |
<subnet> |
| 221 |
<location>All networks</location> |
| 222 |
<range>10.4.0.1 - 10.4.0.20</range> |
| 223 |
<defined>20</defined> |
| 224 |
<used>5</used> |
| 225 |
<touched>0</touched> |
| 226 |
<free>15</free> |
| 227 |
</subnet> |
| 228 |
<shared-network> |
| 229 |
<location>example1</location> |
| 230 |
<defined>40</defined> |
| 231 |
<used>21</used> |
| 232 |
<touched>0</touched> |
| 233 |
<free>19</free> |
| 234 |
</shared-network> |
| 235 |
<shared-network> |
| 236 |
<location>example2</location> |
| 237 |
<defined>40</defined> |
| 238 |
<used>17</used> |
| 239 |
<touched>0</touched> |
| 240 |
<free>23</free> |
| 241 |
</shared-network> |
| 242 |
<summary> |
| 243 |
<location>All networks</location> |
| 244 |
<defined>100</defined> |
| 245 |
<used>43</used> |
| 246 |
<touched>0</touched> |
| 247 |
<free>57</free> |
| 248 |
</summary> |
| 249 |
</dhcpstatus> |
| 250 |
=== csv |
| 251 |
"Ranges:" |
| 252 |
"shared net name","first ip","last ip","max","cur","percent","touch","t+c","t+c perc" |
| 253 |
"example1","10.0.0.1","10.0.0.20","20","11","55.000","0","11","55.000" |
| 254 |
"example1","10.1.0.1","10.1.0.20","20","10","50.000","0","10","50.000" |
| 255 |
"example2","10.2.0.1","10.2.0.20","20","8","40.000","0","8","40.000" |
| 256 |
"example2","10.3.0.1","10.3.0.20","20","9","45.000","0","9","45.000" |
| 257 |
"All networks","10.4.0.1","10.4.0.20","20","5","25.000","0","5","25.000" |
| 258 |
|
| 259 |
"Shared networks:" |
| 260 |
"name","max","cur","percent","touch","t+c","t+c perc" |
| 261 |
"example1","40","21","52.500","0","21","52.500" |
| 262 |
"example2","40","17","42.500","0","17","42.500" |
| 263 |
|
| 264 |
"Sum of all ranges:" |
| 265 |
"name","max","cur","percent","touch","t+c","t+c perc" |
| 266 |
"All networks","100","43","43.000","0","43","43.000" |
| 267 |
=== json |
| 268 |
{ |
| 269 |
"subnets": [ |
| 270 |
{ "location":"example1", "range":"10.0.0.1 - 10.0.0.20", "first_ip":"10.0.0.1", "last_ip":"10.0.0.20", "defined":20, "used":11, "touched":0, "free":9, "percent":55, "touch_count":11, "touch_percent":55, "status":0 }, |
| 271 |
{ "location":"example1", "range":"10.1.0.1 - 10.1.0.20", "first_ip":"10.1.0.1", "last_ip":"10.1.0.20", "defined":20, "used":10, "touched":0, "free":10, "percent":50, "touch_count":10, "touch_percent":50, "status":0 }, |
| 272 |
{ "location":"example2", "range":"10.2.0.1 - 10.2.0.20", "first_ip":"10.2.0.1", "last_ip":"10.2.0.20", "defined":20, "used":8, "touched":0, "free":12, "percent":40, "touch_count":8, "touch_percent":40, "status":0 }, |
| 273 |
{ "location":"example2", "range":"10.3.0.1 - 10.3.0.20", "first_ip":"10.3.0.1", "last_ip":"10.3.0.20", "defined":20, "used":9, "touched":0, "free":11, "percent":45, "touch_count":9, "touch_percent":45, "status":0 }, |
| 274 |
{ "location":"All networks", "range":"10.4.0.1 - 10.4.0.20", "first_ip":"10.4.0.1", "last_ip":"10.4.0.20", "defined":20, "used":5, "touched":0, "free":15, "percent":25, "touch_count":5, "touch_percent":25, "status":0 } |
| 275 |
], |
| 276 |
"shared-networks": [ |
| 277 |
{ "location":"example1", "defined":40, "used":21, "touched":0, "free":19, "percent":52.5, "touch_count":21, "touch_percent":52.5, "status":0 }, |
| 278 |
{ "location":"example2", "defined":40, "used":17, "touched":0, "free":23, "percent":42.5, "touch_count":17, "touch_percent":42.5, "status":0 } |
| 279 |
] |
| 280 |
} |
| 281 |
=== perfdata |
| 282 |
CRITICAL: dhcpd-pools: Ranges - crit: 3 warn: 2 ok: 0; | range_crit=3 range_warn=2 range_ok=0 10.4.0.1_r=5;4;8;0;20 10.4.0.1_rt=0 10.3.0.1_r=9;4;8;0;20 10.3.0.1_rt=0 10.2.0.1_r=8;4;8;0;20 10.2.0.1_rt=0 10.1.0.1_r=10;4;8;0;20 10.1.0.1_rt=0 10.0.0.1_r=11;4;8;0;20 10.0.0.1_rt=0 |
| 283 |
Shared nets - crit: 2 warn: 0 ok: 0; | snet_crit=2 snet_warn=0 snet_ok=0 'example1_s'=21;8;16;0;40 'example1_st'=0 'example2_s'=17;8;16;0;40 'example2_st'=0 |
| 284 |
|