]> git.itanic.dy.fi Git - rrdd/blob - database.sysinfo.conf
rrdtool: get_last_update: Fix file descriptor leak
[rrdd] / database.sysinfo.conf
1     {
2         name = "cpumem";
3         filename = "sysinfo/sysinfo.rrd";
4         interval = 120;
5         parser = "cpu_mem";
6         image = (
7             {
8                 rrd_database = "";
9                 filename = "sysinfo/images/cpu_daily.png";
10                 width = 720;
11                 height = 480;
12                 timestart = "end-1d";
13                 timeend = "now";
14                 imageformat = "PNG";
15                 options = (
16                         "--alt-autoscale-max",
17                         "--lower-limit",
18                         "0",
19                         "--vertical-label",
20                         "CPU Tics"
21                 );
22                 text_lead = 0;
23                 text = (
24                      "DEF:us=sysinfo/sysinfo.rrd:User:AVERAGE",
25                      "DEF:ni=sysinfo/sysinfo.rrd:Nice:AVERAGE",
26                      "DEF:sy=sysinfo/sysinfo.rrd:Sys:AVERAGE",
27                      "DEF:id=sysinfo/sysinfo.rrd:Idle:AVERAGE",
28                      "DEF:wa=sysinfo/sysinfo.rrd:Wait:AVERAGE",
29                      "DEF:in=sysinfo/sysinfo.rrd:IRQ:AVERAGE",
30                      "DEF:so=sysinfo/sysinfo.rrd:SoftIRQ:AVERAGE",
31                      "COMMENT:\\n",
32                      "COMMENT:       ",
33                      "COMMENT:                   MIN          MAX         AVG        Last\\n",
34                      "COMMENT:       ",
35                      "AREA:sy#ff0000:System   ",
36                      "GPRINT:sy:MIN: % 8.2lf ",
37                      "GPRINT:sy:MAX: % 8.2lf ",
38                      "GPRINT:sy:AVERAGE: % 8.2lf ",
39                      "GPRINT:sy:LAST: % 8.2lf \\n",
40                      "COMMENT:       ",
41                      "STACK:us#0000ff:User     ",
42                      "GPRINT:us:MIN: % 8.2lf ",
43                      "GPRINT:us:MAX: % 8.2lf ",
44                      "GPRINT:us:AVERAGE: % 8.2lf ",
45                      "GPRINT:us:LAST: % 8.2lf \\n",
46                      "COMMENT:       ",
47                      "STACK:ni#00ff00:Nice     ",
48                      "GPRINT:ni:MIN: % 8.2lf ",
49                      "GPRINT:ni:MAX: % 8.2lf ",
50                      "GPRINT:ni:AVERAGE: % 8.2lf ",
51                      "GPRINT:ni:LAST: % 8.2lf \\n",
52                      "COMMENT:       ",
53                      "STACK:id#ffffff:Idle     ",
54                      "GPRINT:id:MIN: % 8.2lf ",
55                      "GPRINT:id:MAX: % 8.2lf ",
56                      "GPRINT:id:AVERAGE: % 8.2lf ",
57                      "GPRINT:id:LAST: % 8.2lf \\n",
58                      "COMMENT:       ",
59                      "STACK:wa#ff00ff:IO wait  ",
60                      "GPRINT:wa:MIN: % 8.2lf ",
61                      "GPRINT:wa:MAX: % 8.2lf ",
62                      "GPRINT:wa:AVERAGE: % 8.2lf ",
63                      "GPRINT:wa:LAST: % 8.2lf \\n",
64                      "COMMENT:       ",
65                      "STACK:in#ffff00:IRQ      ",
66                      "GPRINT:in:MIN: % 8.2lf ",
67                      "GPRINT:in:MAX: % 8.2lf ",
68                      "GPRINT:in:AVERAGE: % 8.2lf ",
69                      "GPRINT:in:LAST: % 8.2lf \\n",
70                      "COMMENT:       ",
71                      "STACK:so#00ffff:Soft IRQ ",
72                      "GPRINT:so:MIN: % 8.2lf ",
73                      "GPRINT:so:MAX: % 8.2lf ",
74                      "GPRINT:so:AVERAGE: % 8.2lf ",
75                      "GPRINT:so:LAST: % 8.2lf \\n",
76                      "COMMENT: \\n"
77                      );
78             },
79             {
80                 filename = "sysinfo/images/cpu_weekly.png";
81                 timestart = "end-1w";
82             },
83             {
84                 filename = "sysinfo/images/cpu_monthly.png";
85                 timestart = "end-1m";
86             },
87             {
88                 filename = "sysinfo/images/cpu_yearly.png";
89                 timestart = "end-1y";
90             },
91             {
92                 filename = "sysinfo/images/mem_daily.png";
93                 timestart = "end-1d";
94                 options = (
95                         "--alt-autoscale-max",
96                         "--lower-limit",
97                         "0",
98                         "--vertical-label",
99                         "Mem usage (MB)",
100                         "--units-exponent",
101                         "0",
102                         "--base",
103                         "1024"
104                         );
105                 text = (
106                      "DEF:fr=sysinfo/sysinfo.rrd:Free:AVERAGE",
107                      "DEF:bu=sysinfo/sysinfo.rrd:Buffers:AVERAGE",
108                      "DEF:ca=sysinfo/sysinfo.rrd:Cached:AVERAGE",
109                      "DEF:an=sysinfo/sysinfo.rrd:Anon:AVERAGE",
110                      "DEF:sl=sysinfo/sysinfo.rrd:Slab:AVERAGE",
111                      "DEF:ta=sysinfo/sysinfo.rrd:Tables:AVERAGE",
112                      "DEF:ot=sysinfo/sysinfo.rrd:Other:AVERAGE",
113                      "DEF:sw=sysinfo/sysinfo.rrd:Swap:AVERAGE",
114                      "COMMENT:\\n",
115                      "COMMENT:       ",
116                      "COMMENT:                     MIN          MAX         AVG        Last\\n",
117                      "COMMENT:       ",
118                      "AREA:bu#ffff00:Buffers    ",
119                      "GPRINT:bu:MIN: % 8.2lf ",
120                      "GPRINT:bu:MAX: % 8.2lf ",
121                      "GPRINT:bu:AVERAGE: % 8.2lf ",
122                      "GPRINT:bu:LAST: % 8.2lf \\n",
123                      "COMMENT:       ",
124                      "STACK:an#000000:AnonPages  ",
125                      "GPRINT:an:MIN: % 8.2lf ",
126                      "GPRINT:an:MAX: % 8.2lf ",
127                      "GPRINT:an:AVERAGE: % 8.2lf ",
128                      "GPRINT:an:LAST: % 8.2lf \\n",
129                      "COMMENT:       ",
130                      "STACK:ca#00ff00:Cached     ",
131                      "GPRINT:ca:MIN: % 8.2lf ",
132                      "GPRINT:ca:MAX: % 8.2lf ",
133                      "GPRINT:ca:AVERAGE: % 8.2lf ",
134                      "GPRINT:ca:LAST: % 8.2lf \\n",
135                      "COMMENT:       ",
136                      "STACK:fr#ffffff:Free       ",
137                      "GPRINT:fr:MIN: % 8.2lf ",
138                      "GPRINT:fr:MAX: % 8.2lf ",
139                      "GPRINT:fr:AVERAGE: % 8.2lf ",
140                      "GPRINT:fr:LAST: % 8.2lf \\n",
141                      "COMMENT:       ",
142                      "STACK:sl#00ffff:Slab       ",
143                      "GPRINT:sl:MIN: % 8.2lf ",
144                      "GPRINT:sl:MAX: % 8.2lf ",
145                      "GPRINT:sl:AVERAGE: % 8.2lf ",
146                      "GPRINT:sl:LAST: % 8.2lf \\n",
147                      "COMMENT:       ",
148                      "STACK:ta#0000ff:PageTables ",
149                      "GPRINT:ta:MIN: % 8.2lf ",
150                      "GPRINT:ta:MAX: % 8.2lf ",
151                      "GPRINT:ta:AVERAGE: % 8.2lf ",
152                      "GPRINT:ta:LAST: % 8.2lf \\n",
153                      "COMMENT:       ",
154                      "STACK:ot#a0a0a0:Other      ",
155                      "GPRINT:ot:MIN: % 8.2lf ",
156                      "GPRINT:ot:MAX: % 8.2lf ",
157                      "GPRINT:ot:AVERAGE: % 8.2lf ",
158                      "GPRINT:ot:LAST: % 8.2lf \\n",
159                      "COMMENT:       ",
160                      "STACK:sw#ff0000:Swap       ",
161                      "GPRINT:sw:MIN: % 8.2lf ",
162                      "GPRINT:sw:MAX: % 8.2lf ",
163                      "GPRINT:sw:AVERAGE: % 8.2lf ",
164                      "GPRINT:sw:LAST: % 8.2lf \\n",
165                      "COMMENT: \\n"
166                      );
167             },
168             {
169                 filename = "sysinfo/images/mem_weekly.png";
170                 timestart = "end-1w";
171             },
172             {
173                 filename = "sysinfo/images/mem_monthly.png";
174                 timestart = "end-1m";
175             },
176             {
177                 filename = "sysinfo/images/mem_yearly.png";
178                 timestart = "end-1y";
179             } );
180         sources = (
181             {
182                 type = "COUNTER";
183                 name = "User";
184                 heartbeat = 240;
185                 min = 0.0;
186                 max = 1200.0;
187             },
188             {
189                 type = "COUNTER";
190                 name = "Nice";
191             },
192             {
193                 type = "COUNTER";
194                 name = "Sys";
195             },
196             {
197                 type = "COUNTER";
198                 name = "Idle";
199             },
200             {
201                 type = "COUNTER";
202                 name = "Wait";
203             },
204             {
205                 type = "COUNTER";
206                 name = "IRQ";
207             },
208             {
209                 type = "COUNTER";
210                 name = "SoftIRQ";
211             },
212             {
213                 type = "GAUGE";
214                 name = "Free";
215                 max = 32768.0;
216             },
217             {
218                 type = "GAUGE";
219                 name = "Buffers";
220             },
221             {
222                 type = "GAUGE";
223                 name = "Cached";
224             },
225             {
226                 type = "GAUGE";
227                 name = "Active";
228             },
229             {
230                 type = "GAUGE";
231                 name = "Inactive";
232             },
233             {
234                 type = "GAUGE";
235                 name = "SwapFree";
236             },
237             {
238                 type = "GAUGE";
239                 name = "Anon";
240             },
241             {
242                 type = "GAUGE";
243                 name = "Slab";
244             },
245             {
246                 type = "GAUGE";
247                 name = "Tables";
248             },
249             {
250                 type = "GAUGE";
251                 name = "Other";
252             },
253             {
254                 type = "GAUGE";
255                 name = "Swap";
256             } );
257         archives = (
258             {
259                 type = "AVERAGE";
260                 xff = 0.5;
261                 steps = 1;
262                 rows = 720;
263             },
264             {
265                 type = "AVERAGE";
266                 steps = 7;
267             },
268             {
269                 type = "AVERAGE";
270                 steps = 31;
271             },
272             {
273                 type = "AVERAGE";
274                 steps = 365;
275             },
276             {
277                 type = "MIN";
278                 steps = 1;
279             },
280             {
281                 type = "MIN";
282                 steps = 7;
283             },
284             {
285                 type = "MIN";
286                 steps = 31;
287             },
288             {
289                 type = "MIN";
290                 steps = 365;
291             },
292             {
293                 type = "MAX";
294                 steps = 1;
295             },
296             {
297                 type = "MAX";
298                 steps = 7;
299             },
300             {
301                 type = "MAX";
302                 steps = 31;
303             },
304             {
305                 type = "MAX";
306                 steps = 365;
307             } );
308     },
309     {
310         name = "network";
311         filename = "sysinfo/network.rrd";
312         interval = 120;
313         parser = "netstats";
314         parser_data = ( "eth0", "eth1" );
315         image = (
316             {
317                 rrd_database = "";
318                 filename = "sysinfo/images/eth0_daily.png";
319                 width = 720;
320                 height = 200;
321                 timestart = "end-1d";
322                 timeend = "now";
323                 imageformat = "PNG";
324                 options = (
325                         "--alt-autoscale-max",
326                         "--vertical-label",
327                         "Bytes",
328                         "--lower-limit",
329                         "0"
330                         );
331                 text_lead = 0;
332                 text = (
333                      "DEF:rxb=sysinfo/network.rrd:eth0rxb:AVERAGE",
334                      "DEF:txb=sysinfo/network.rrd:eth0txb:AVERAGE",
335                      "COMMENT:\\n",
336                      "COMMENT:       ",
337                      "COMMENT:                          MIN            MAX             AVG             Last\\n",
338                      "COMMENT:       ",
339                      "LINE1:rxb#0000FF:eth0 receive     ",
340                      "GPRINT:rxb:MIN:  % 3.2lf %sB",
341                      "GPRINT:rxb:MAX:     % 3.2lf %sB",
342                      "GPRINT:rxb:AVERAGE:      % 3.2lf %sB",
343                      "GPRINT:rxb:LAST:      % 3.2lf %sB\\n",
344                      "COMMENT:       ",
345                      "LINE1:txb#00FF00:eth0 transmit    ",
346                      "GPRINT:txb:MIN:  % 3.2lf %sB",
347                      "GPRINT:txb:MAX:     % 3.2lf %sB",
348                      "GPRINT:txb:AVERAGE:      % 3.2lf %sB",
349                      "GPRINT:txb:LAST:      % 3.2lf %sB\\n",
350                      "COMMENT: \\n"
351                      );
352             },
353             {
354                 filename = "sysinfo/images/eth0_weekly.png";
355                 timestart = "end-1w";
356             },
357             {
358                 filename = "sysinfo/images/eth0_monthly.png";
359                 timestart = "end-1m";
360             },
361             {
362                 filename = "sysinfo/images/eth0_yearly.png";
363                 timestart = "end-1y";
364             },
365             {
366                 filename = "sysinfo/images/eth1_daily.png";
367                 timestart = "end-1d";
368                 text = (
369                      "DEF:rxb=sysinfo/network.rrd:eth1rxb:AVERAGE",
370                      "DEF:txb=sysinfo/network.rrd:eth1txb:AVERAGE",
371                      "COMMENT:\\n",
372                      "COMMENT:       ",
373                      "COMMENT:                          MIN            MAX             AVG             Last\\n",
374                      "COMMENT:       ",
375                      "LINE1:rxb#0000FF:eth1 receive     ",
376                      "GPRINT:rxb:MIN:  % 3.2lf %sB",
377                      "GPRINT:rxb:MAX:     % 3.2lf %sB",
378                      "GPRINT:rxb:AVERAGE:      % 3.2lf %sB",
379                      "GPRINT:rxb:LAST:      % 3.2lf %sB\\n",
380                      "COMMENT:       ",
381                      "LINE1:txb#00FF00:eth1 transmit    ",
382                      "GPRINT:txb:MIN:  % 3.2lf %sB",
383                      "GPRINT:txb:MAX:     % 3.2lf %sB",
384                      "GPRINT:txb:AVERAGE:      % 3.2lf %sB",
385                      "GPRINT:txb:LAST:      % 3.2lf %sB\\n",
386                      "COMMENT: \\n"
387                      );
388             },
389             {
390                 filename = "sysinfo/images/eth1_weekly.png";
391                 timestart = "end-1w";
392             },
393             {
394                 filename = "sysinfo/images/eth1_monthly.png";
395                 timestart = "end-1m";
396             },
397             {
398                 filename = "sysinfo/images/eth1_yearly.png";
399                 timestart = "end-1y";
400             } );
401         sources = (
402             {
403                 type = "COUNTER";
404                 name = "eth0rxb";
405                 heartbeat = 240;
406                 min = 0.0;
407                 max = 1.2e+11;
408             },
409             {
410                 type = "COUNTER";
411                 name = "eth0rxp";
412             },
413             {
414                 type = "COUNTER";
415                 name = "eth0txb";
416             },
417             {
418                 type = "COUNTER";
419                 name = "eth0txp";
420             },
421             {
422                 type = "COUNTER";
423                 name = "eth1rxb";
424             },
425             {
426                 type = "COUNTER";
427                 name = "eth1rxp";
428             },
429             {
430                 type = "COUNTER";
431                 name = "eth1txb";
432             },
433             {
434                 type = "COUNTER";
435                 name = "eth1txp";
436             } );
437         archives = (
438             {
439                 type = "AVERAGE";
440                 xff = 0.5;
441                 steps = 1;
442                 rows = 720;
443             },
444             {
445                 type = "AVERAGE";
446                 steps = 7;
447             },
448             {
449                 type = "AVERAGE";
450                 steps = 31;
451             },
452             {
453                 type = "AVERAGE";
454                 steps = 365;
455             },
456             {
457                 type = "MIN";
458                 steps = 1;
459             },
460             {
461                 type = "MIN";
462                 steps = 7;
463             },
464             {
465                 type = "MIN";
466                 steps = 31;
467             },
468             {
469                 type = "MIN";
470                 steps = 365;
471             },
472             {
473                 type = "MAX";
474                 steps = 1;
475             },
476             {
477                 type = "MAX";
478                 steps = 7;
479             },
480             {
481                 type = "MAX";
482                 steps = 31;
483             },
484             {
485                 type = "MAX";
486                 steps = 365;
487             } );
488     }