source: ccsd/private/templates/host/rrdbot/rrdbot_conf.tmpl @ 1411

Last change on this file since 1411 was 1411, checked in by ckb6, 6 years ago

This update to the template allows for the new feature of setting bounds on 'exist' during discovery. example usage is setting a lower bound of 0 on the associated clients so that -1 is ignored(used to indicate unsuported).

File size: 3.1 KB
Line 
1#*doc-module:
2crcnetd - CRCnet Configuration System Daemon Template
3
4This template creates the rrdbot-script configuration file
5*#
6#attr $author = "Chris Browning (ckb6@cs.waikato.ac.nz)"
7#attr $version = "$Id: rrdbot_script_conf.tmpl 1163 2006-12-01 02:09:36Z ckb6 $"
8#attr $copyright = "Copyright (C) 2006  The University of Waikato"
9#attr $license = "No usage or redistribution rights are granted. See LICENSE for details."
10#attr $eventList = []
11#attr $fileName = "rrdbot.conf"
12#attr $serviceName = "rrdbot"
13#from crcnetd._utils.ccsd_cfengine import ccs_template
14#extends ccs_template
15#compiler-settings
16## Change the Cheetah start tokens so that we don't conflict with DHCP syntax
17cheetahVarStartToken = %
18directiveStartToken = !
19commentStartToken = !!
20#end compiler-settings
21#
22# CRCnet rrdbot-script.conf
23#
24# This file was automatically generated on the date below, DO NOT EDIT
25# $Date$
26
27
28#This is where we setup the configuration
29!set %rrd = %services["rrdbot"]
30[config]
31    server = %server_name:%port
32    graphport = %rrd.graphport
33!for %classname in %rrd.classes
34!set %clas = %rrd.classes[%classname]
35[%clas["class_name"] = %clas["poll"]]
36    !if %clas["ipfromoid"]:
37        ipfromoid = %clas["ipfromoid"]
38    !end if
39    !if %clas["skip_software_loop"]:
40        skip_software_loop = %clas["skip_software_loop"]
41    !end if
42    !if %clas["key"]:
43        key = %clas["key"]
44    !end if
45    !if %clas["interval"]:
46        interval = %clas["interval"]
47    !end if
48    !if %clas["cf"]:
49        cf = %clas["cf"]
50    !end if
51    !if %clas["archive"]:
52        archive = %clas["archive"]
53    !end if
54    !if %clas["upper_bound"] != '':
55        upper_bound = %clas["upper_bound"]
56    !end if
57    !if %clas["lower_bound"] != '':
58        lower_bound = %clas["lower_bound"]
59    !end if
60   
61    !for %var in %clas["variables"]
62        %var["name"]:poll = %var["poll"]
63        %var["name"]:type = %var["type"]
64        !if %var["type"] == "GAUGE" and %var["min"] != '':
65        %var["name"]:min = %var["min"]
66        !end if
67        !if %var["type"] == "GAUGE" and %var["max"] != '':
68        %var["name"]:max = %var["max"]
69        !end if
70       
71    !end for
72   
73   
74    !set %subclasses = %clas["subs"]
75    !for %sub in %subclasses
76    {%sub["class_name"] = %sub["poll"]}
77        !if %sub["interval"]:
78            interval = %sub["interval"]
79        !end if
80        !if %sub["cf"]:
81            cf = %sub["cf"]
82        !end if
83        !if %sub["archive"]:
84            archive = %sub["archive"]
85        !end if
86        !if %sub["upper_bound"] != '':
87            upper_bound = %sub["upper_bound"]
88        !end if
89        !if %sub["lower_bound"] != '':
90            lower_bound = %sub["lower_bound"]
91        !end if
92
93        !for %var in %sub["variables"]
94            %var["name"]:poll = %var["poll"]
95            %var["name"]:type = %var["type"]
96            !if %var["type"] == "GAUGE" and %var["min"] != '':
97            %var["name"]:min = %var["min"]
98            !end if
99            !if %var["type"] == "GAUGE" and %var["max"] != '':
100            %var["name"]:max = %var["max"]
101            !end if
102           
103        !end for
104    !end for
105
106!end for
Note: See TracBrowser for help on using the repository browser.