blob: 5a32fb733d4606877598515e342c2b5cb9bc4e22 (
plain)
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
|
[%#
Template-Toolkit template for OpenNMS Torrus config generation.
Author: Gustavo Torres
$Id: onms.tmpl,v 1.1 2010-12-27 00:04:40 ivan Exp $
%]
<?xml version="1.0"?>
<!--
This file is autogenerated from [% $data %]
-->
[% PROCESS $data %]
<configuration>
<datasources>
<template name="onms-response">
<param name="ds-type" value="rrd-file" />
<param name="rrd-hwpredict" value="disabled" />
<param name="leaf-type" value="rrd-def" />
<param name="rrd-cf" value="AVERAGE" />
<param name="graph-lower-limit" value="0" />
<param name="vertical-label" value="milliseconds"/>
</template>
<template name="onms-response-icmp">
<leaf name="ICMP">
<param name="comment" value="ICMP response time"/>
<param name="rrd-ds" value="icmp" />
<param name="data-file" value="icmp.rrd" />
<param name="graph-legend" value="ICMP" />
<param name="vertical-label" value="microseconds" />
</leaf>
</template>
[% FOREACH interface = ifs %]
<!-- ********************************************************** -->
<!-- IP address: [% interface.addr %] -->
<subtree name="[% interface.addr %]">
<param name="data-dir" value="[% responcedir _ "/" _ interface.addr %]"/>
<apply-template name="onms-response"/>
[% FOREACH svc = interface.services;
IF svc.name == 'icmp' %]
<apply-template name="icmp" />
[% ELSE %]
<leaf name="[% svc.legend %]">
<param name="comment" value="[% svc.legend %] response time" />
<param name="rrd-ds" value="[% svc.name %]" />
<param name="data-file" value="[% svc.name %].rrd" />
<param name="graph-legend" value="[% svc.legend %]" />
</leaf>
[% END;
END %]
</subtree>
[% END %]
</datasources>
</configuration>
|