diff options
author | ivan <ivan> | 2010-12-27 00:04:44 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-12-27 00:04:44 +0000 |
commit | 74e058c8a010ef6feb539248a550d0bb169c1e94 (patch) | |
tree | 6e8d3efb218dd0f41970b62c7f29758d1ae9a937 /torrus/xmlconfig/examples | |
parent | 35359a73152b3d7a9ad5e3d37faf81f6fedb76e8 (diff) |
import torrus 1.0.9
Diffstat (limited to 'torrus/xmlconfig/examples')
-rw-r--r-- | torrus/xmlconfig/examples/apc-ups.xml | 64 | ||||
-rw-r--r-- | torrus/xmlconfig/examples/ascend.max.xml | 58 | ||||
-rw-r--r-- | torrus/xmlconfig/examples/docsis-monitors.xml | 433 | ||||
-rw-r--r-- | torrus/xmlconfig/examples/generic-netsnmp.xml | 158 | ||||
-rw-r--r-- | torrus/xmlconfig/examples/hpux.xml | 103 | ||||
-rw-r--r-- | torrus/xmlconfig/examples/monitors.xml | 156 | ||||
-rw-r--r-- | torrus/xmlconfig/examples/multigraph.xml | 60 | ||||
-rw-r--r-- | torrus/xmlconfig/examples/rainbow-schema.xml | 164 | ||||
-rw-r--r-- | torrus/xmlconfig/examples/servers.data | 69 | ||||
-rw-r--r-- | torrus/xmlconfig/examples/servers.tmpl | 82 |
10 files changed, 1347 insertions, 0 deletions
diff --git a/torrus/xmlconfig/examples/apc-ups.xml b/torrus/xmlconfig/examples/apc-ups.xml new file mode 100644 index 000000000..b85b26421 --- /dev/null +++ b/torrus/xmlconfig/examples/apc-ups.xml @@ -0,0 +1,64 @@ +<?xml version="1.0"?> +<!-- + Copyright (C) 2002 Stanislav Sinyagin + Copyright (C) 2003 Aaron S. Bush <abush at microelectronics dot com> + + File: apc-ups.xml + Description: APC UPS battery monitor example for Torrus. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +--> + +<!-- + This is the example of using the definitions from + "vendor/apc.ups.xml" configuration file. + Currently the tree structure has to be built by hand, the same way as + the example below. In the future, there will be device discovery + support for this vendor. +--> + +<configuration> + +<datasources> + + <subtree name="SNMP"> + + <subtree name="UPS"> + + <param name="snmp-community" value="public" /> + <param name="domain-name" value="example.com" /> + <param name="data-dir" value="/var/snmpcollector" /> + + + <subtree name="ups1"> + <param name="legend"> + Location: Chen's take-away, Duebendorf; + Contact: Chen; + Power consumer: Microwave oven + </param> + <param name="snmp-host" value="ups1" /> + + <param name="snmp-version" value="1" /> + + <apply-template name="apcups-health" /> + + </subtree> + <!-- ups1 --> + + </subtree> + </subtree> +</datasources> + +</configuration> diff --git a/torrus/xmlconfig/examples/ascend.max.xml b/torrus/xmlconfig/examples/ascend.max.xml new file mode 100644 index 000000000..ac70f5645 --- /dev/null +++ b/torrus/xmlconfig/examples/ascend.max.xml @@ -0,0 +1,58 @@ +<?xml version="1.0"?> +<!-- + Copyright (C) 2003 Roman Hochuli, Stanislav Sinyagin + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + + $Id: ascend.max.xml,v 1.1 2010-12-27 00:04:28 ivan Exp $ + Roman Hochuli <roman@hochu.li> + Stanislav Sinyagin <ssinyagin@yahoo.com> + + Ascend MAC Call statistics. + Tested with Ascent MAX 4000 with Software-Release feik.m40 7.0.26 +--> + +<configuration> +<datasources> + <subtree name="SNMP"> + <subtree name="Dialup"> + + <param name="snmp-version" value="1" /> + <param name="snmp-community" value="xxxx" /> + <param name="domain-name" value="" /> + <param name="data-dir" value="/var/snmpcollector" /> + + <subtree name="myhost.mydomain.com"> + <param name="legend"> + Location: Hardstrasse 235; + Contact: GPS Technik AG, Zuercherstrasse 139, CH-8952 Schlieren + </param> + <param name="snmp-host" value="myhost.mydomain.com" /> + + <subtree name="Call_Statistics"> + <apply-template name="ascend-totalcalls" /> + + <leaf name="E1_2_CurrentCalls"> + <param name="ascend-ifidx" value="2" /> + <apply-template name="ascend-e1stats" /> + </leaf> + </subtree> + + </subtree> + + </subtree> + </subtree> +</datasources> +</configuration> diff --git a/torrus/xmlconfig/examples/docsis-monitors.xml b/torrus/xmlconfig/examples/docsis-monitors.xml new file mode 100644 index 000000000..0a5ffd69f --- /dev/null +++ b/torrus/xmlconfig/examples/docsis-monitors.xml @@ -0,0 +1,433 @@ +<?xml version="1.0"?> +<!-- + Copyright (C) 2005 Stanislav Sinyagin + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + + $Id: docsis-monitors.xml,v 1.1 2010-12-27 00:04:28 ivan Exp $ + Stanislav Sinyagin <ssinyagin@yahoo.com> + + Example monitors that may be applied to DOCSIS CMTS monitoring + +--> + + +<configuration> + +<token-sets> + + <token-set name="docs-warnings"> + <param name="comment" value="DOCSIS Warnings" /> + </token-set> + + <token-set name="docs-minor"> + <param name="comment" value="DOCSIS Minor failures" /> + </token-set> + + <token-set name="docs-major"> + <param name="comment" value="DOCSIS Major failures" /> + </token-set> + +</token-sets> + +<monitors> + + <!-- ********************************************************** + Three levels of actions for different severity levels + ********************************************************** --> + <action name="docs-tset-warnings"> + <param name="action-type" value="tset" /> + <param name="tset-name" value="docs-warnings" /> + </action> + + <action name="docs-tset-minor"> + <param name="action-type" value="tset" /> + <param name="tset-name" value="docs-minor" /> + </action> + + <action name="docs-tset-major"> + <param name="action-type" value="tset" /> + <param name="tset-name" value="docs-major" /> + </action> + + + <!-- ========================================================== + == RFC2670 monitors == + ========================================================== --> + + + <!-- ********************************************************** + SNR monitors + ********************************************************** --> + <monitor name="docsis-snr-1"> + <param name="monitor-type" value="expression" /> + <param name="rpn-expr" + value="DUP,0,GT,EXC,DUP,24.5,LT,EXC,22,GE,AND,AND" /> + <param name="action" value="docs-tset-warnings" /> + <param name="expires" value="1800" /> + <param name="comment"> + Signal/Noise-Ratio lower than 30dB + </param> + </monitor> + + <monitor name="docsis-snr-2"> + <param name="monitor-type" value="expression" /> + <param name="rpn-expr" + value="DUP,0,GT,EXC,DUP,22,LT,EXC,18,GE,AND,AND" /> + <param name="action" value="docs-tset-minor" /> + <param name="expires" value="21600" /> + <param name="comment"> + Signal/Noise-Ratio lower than 25dB + </param> + </monitor> + + <monitor name="docsis-snr-3"> + <param name="monitor-type" value="expression" /> + <param name="rpn-expr" value="DUP,0,GT,EXC,18,LT,AND" /> + <param name="action" value="docs-tset-major" /> + <param name="expires" value="21600" /> + <param name="comment"> + Signal/Noise-Ratio lower than 18dB + </param> + </monitor> + + + <!-- ********************************************************** + Correctable FEC error rate monitors + ********************************************************** --> + <monitor name="docsis-feccor-1"> + <param name="monitor-type" value="expression" /> + <param name="rpn-expr"> + DUP, + {Error-Free},{Uncorrectable},+,+, + /,100,*,DUP, + 10,GT,EXC,20,LE,AND + </param> + <param name="action" value="docs-tset-warnings" /> + <param name="expires" value="1800" /> + <param name="comment"> + FEC correctable error rate more than 10% + </param> + </monitor> + + <monitor name="docsis-feccor-2"> + <param name="monitor-type" value="expression" /> + <param name="rpn-expr"> + DUP, + {Error-Free},{Uncorrectable},+,+, + /,100,*, + 20,GT + </param> + <param name="action" value="docs-tset-minor" /> + <param name="expires" value="21600" /> + <param name="comment"> + FEC correctable error rate more than 20% + </param> + </monitor> + + + <!-- ********************************************************** + Uncorrectable FEC error rate monitors + ********************************************************** --> + <monitor name="docsis-fecuncor-1"> + <param name="monitor-type" value="expression" /> + <param name="rpn-expr"> + DUP, + {Error-Free},{Correctable},+,+, + /,100,*,DUP, + 0.5,GT,EXC,1,LE,AND + </param> + <param name="action" value="docs-tset-warnings" /> + <param name="expires" value="1800" /> + <param name="comment"> + FEC uncorrectable error rate more than 0.5% + </param> + </monitor> + + <monitor name="docsis-fecuncor-2"> + <param name="monitor-type" value="expression" /> + <param name="rpn-expr"> + DUP, + {Error-Free},{Correctable},+,+, + /,100,*,DUP, + 1,GT,2,EXC,LE,AND + </param> + <param name="action" value="docs-tset-minor" /> + <param name="expires" value="21600" /> + <param name="comment"> + FEC uncorrectable error rate more than 1% + </param> + </monitor> + + <monitor name="docsis-fecuncor-3"> + <param name="monitor-type" value="expression" /> + <param name="rpn-expr"> + DUP, + {Error-Free},{Correctable},+,+, + /,100,*, + 2,GT + </param> + <param name="action" value="docs-tset-major" /> + <param name="expires" value="21600" /> + <param name="comment"> + FEC uncorrectable error rate more than 2% + </param> + </monitor> + + + <!-- ********************************************************** + Downstream utilization monitors + ********************************************************** --> + <monitor name="docsis-downutl-1"> + <param name="monitor-type" value="expression" /> + <param name="rpn-expr"> + {TotalBytes},/,100,*, + DUP, + 75,GT,EXC,80,LE,AND + </param> + <param name="action" value="docs-tset-warnings" /> + <param name="expires" value="1800" /> + <param name="comment"> + DOCSIS downstream utilization more than 75% + </param> + </monitor> + + <monitor name="docsis-downutl-2"> + <param name="monitor-type" value="expression" /> + <param name="rpn-expr"> + {TotalBytes},/,100,*, + DUP, + 80,GT,EXC,85,LE,AND + </param> + <param name="action" value="docs-tset-minor" /> + <param name="expires" value="21600" /> + <param name="comment"> + DOCSIS downstream utilization more than 80% + </param> + </monitor> + + <monitor name="docsis-downutl-3"> + <param name="monitor-type" value="expression" /> + <param name="rpn-expr"> + {TotalBytes},/,100,*, + 85,GT + </param> + <param name="action" value="docs-tset-minor" /> + <param name="expires" value="21600" /> + <param name="comment"> + DOCSIS downstream utilization more than 85% + </param> + </monitor> + + + + <!-- ========================================================== + == Cisco-specific monitors == + ========================================================== --> + <!-- ********************************************************** + Upstream utilization monitors + ********************************************************** --> + + <monitor name="docsis-uputil-1"> + <param name="monitor-type" value="expression" /> + <param name="rpn-expr"> + DUP, + 75,GT,EXC,80,LE,AND + </param> + <param name="action" value="docs-tset-warnings" /> + <param name="expires" value="1800" /> + <param name="comment"> + DOCSIS upstream utilization more than 75% + </param> + </monitor> + + <monitor name="docsis-uputil-2"> + <param name="monitor-type" value="expression" /> + <param name="rpn-expr"> + DUP, + 80,GT,EXC,85,LE,AND + </param> + <param name="action" value="docs-tset-minor" /> + <param name="expires" value="21600" /> + <param name="comment"> + DOCSIS upstream utilization more than 80% + </param> + </monitor> + + <monitor name="docsis-uputil-3"> + <param name="monitor-type" value="expression" /> + <param name="rpn-expr"> + 85,GT + </param> + <param name="action" value="docs-tset-major" /> + <param name="expires" value="21600" /> + <param name="comment"> + DOCSIS upstream utilization more than 85% + </param> + </monitor> + + + <!-- ********************************************************** + Upstream free contention slots monitors + ********************************************************** --> + + <monitor name="docsis-upslots-1"> + <param name="monitor-type" value="expression" /> + <param name="rpn-expr"> + DUP, + 17,LT,EXC,12,GE,AND + </param> + <param name="action" value="docs-tset-warnings" /> + <param name="expires" value="1800" /> + <param name="comment"> + free DOCSIS upstream minislots less than 17% + </param> + </monitor> + + <monitor name="docsis-upslots-2"> + <param name="monitor-type" value="expression" /> + <param name="rpn-expr"> + DUP, + 12,LT,EXC,7,GE,AND + </param> + <param name="action" value="docs-tset-minor" /> + <param name="expires" value="21600" /> + <param name="comment"> + free DOCSIS upstream minislots less than 12% + </param> + </monitor> + + <monitor name="docsis-upslots-3"> + <param name="monitor-type" value="expression" /> + <param name="rpn-expr"> + 7,LT + </param> + <param name="action" value="docs-tset-major" /> + <param name="expires" value="21600" /> + <param name="comment"> + free DOCSIS upstream minislots less than 7% + </param> + </monitor> + + <!-- ********************************************************** + Modems online monitors + ********************************************************** --> + + <!-- If Modems_Total < 100, then + Active < 10% ===> warning + If Modems_Total >= 100, then + Active < 50% ===> minor + Active < 10% ===> major --> + + <monitor name="docsis-modems-1"> + <param name="monitor-type" value="expression" /> + <param name="rpn-expr"> + {Modems_Total},/,100,*,10,LT, + {Modems_Total},100,LT,AND + </param> + <param name="action" value="docs-tset-warnings" /> + <param name="expires" value="1800" /> + <param name="comment"> + Less than 10% of DOCSIS modems online on a low-loaded interface + </param> + </monitor> + + <monitor name="docsis-modems-2"> + <param name="monitor-type" value="expression" /> + <param name="rpn-expr"> + {Modems_Total},/,100,*, + DUP, + 50,LT,EXC,10,GE,AND, + {Modems_Total},100,GE,AND + </param> + <param name="action" value="docs-tset-minor" /> + <param name="expires" value="21600" /> + <param name="comment"> + Less than 50% of DOCSIS modems online + </param> + </monitor> + + <monitor name="docsis-modems-3"> + <param name="monitor-type" value="expression" /> + <param name="rpn-expr"> + {Modems_Total},/,100,*,10,LT, + {Modems_Total},100,GE,AND + </param> + <param name="action" value="docs-tset-major" /> + <param name="expires" value="21600" /> + <param name="comment"> + Less than 10% of DOCSIS modems online + </param> + </monitor> + + <!-- ========================================================== + == IF-MIB monitors for cable interfaces == + ========================================================== --> + + <monitor name="docs-inerrors-1"> + <param name="monitor-type" value="expression" /> + <param name="rpn-expr"> + {Packets_In},/,100,*,DUP, + 10,GT,EXC,50,LE,AND + </param> + <param name="action" value="docs-tset-warnings" /> + <param name="expires" value="21600" /> + <param name="comment"> + Input packet errors more than 10% + </param> + </monitor> + + <monitor name="docs-inerrors-2"> + <param name="monitor-type" value="expression" /> + <param name="rpn-expr"> + {Packets_In},/,100,*,DUP, + 50,GT + </param> + <param name="action" value="docs-tset-minor" /> + <param name="expires" value="21600" /> + <param name="comment"> + Input packet errors more than 50% + </param> + </monitor> + + <monitor name="docs-outerrors-1"> + <param name="monitor-type" value="expression" /> + <param name="rpn-expr"> + {Packets_Out},/,100,*,DUP, + 10,GT,EXC,50,LE,AND + </param> + <param name="action" value="docs-tset-warnings" /> + <param name="expires" value="21600" /> + <param name="comment"> + Output packet errors more than 10% + </param> + </monitor> + + <monitor name="docs-outerrors-2"> + <param name="monitor-type" value="expression" /> + <param name="rpn-expr"> + {Packets_Out},/,100,*,DUP, + 50,GT + </param> + <param name="action" value="docs-tset-minor" /> + <param name="expires" value="21600" /> + <param name="comment"> + Output packet errors more than 50% + </param> + </monitor> + +</monitors> + +</configuration> diff --git a/torrus/xmlconfig/examples/generic-netsnmp.xml b/torrus/xmlconfig/examples/generic-netsnmp.xml new file mode 100644 index 000000000..79f514085 --- /dev/null +++ b/torrus/xmlconfig/examples/generic-netsnmp.xml @@ -0,0 +1,158 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (C) 2003 Shawn Ferry + + File: generic-netsnmp.xml + Description: System monitor example for Torrus. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + + Shawn Ferry <sferry at sevenspace dot com> <lalartu at obscure dot org> + + $Id: generic-netsnmp.xml,v 1.1 2010-12-27 00:04:28 ivan Exp $ + @(#) 10/18/03 generic-netsnmp.xml 1.2 (10/18/03 18:33:14) sferry +--> +<!-- + This is the example of using templates from vendor and generic definition + files: + generic/rfc1213.xml, generic/rfc2790.host-resources.xml, + vendor/ucd-snmp.xml + + This file can be used as an example for any host using ucd-snmp + + You are encouraged to look at one of the tree-<name> configurations. + +--> +<configuration> + <datasources> + <!-- + Apply the one-minute-period template, which sets the collector period + to one minute and uses the appropriate RRA values for the period + --> + <!-- The top subtree for for the Generic Tree--> + <subtree name="Generic"> + <apply-template name="snmp-defaults"/> + <!-- + Set the snmp community port and version + All of these settings override any previously + set values and are in effect for everything + inside this subtree + --> + <param name="snmp-community" value="public"/> + <param name="snmp-port" value="191"/> + <param name="snmp-version" value="1"/> + <param name="domain-name" value=""/> + + <!-- Set the data-dir for rrd files created because of this subtree + I use a directory per tree and a directory per host. The directories + must be manually created --> + <param name="data-dir"> + /usr/local/torrus-data/generic/snmp/%system-id% + </param> + + <!-- This subtree wraps up the applied configuration for "SolarisHost" + It is also appropriate for most net/ucd snmp hosts --> + <subtree name="SolarisHost"> + <apply-template name="one-minute-period"/> + + <!-- Text to display while showing this tree --> + <param name="legend"> + Location: System Localtion ; Contact: System Contact + </param> + + <!-- The IP address of the host that is being queried --> + <param name="snmp-host" value="127.0.0.1"/> + <!-- + Apply the template named ucd-snmp + ucd-snmp attempts to capture and graph system memory + blockio and system/processor information(similar to vmstat) + it is actually a wrap up of the following templates + ucd-memory, ucd-blockio, ucd-context_interrupts + --> + <apply-template name="ucd-snmp"/> + + <!-- Apply the template named rfc2790.host-resources + rfc2790.host-resources, wraps up the template + hrsystem, which attempts to graph the number of users + and processes on a system. + --> + <apply-template name="rfc2790.host-resources"/> + + <!-- The Storage Subtree, it is not required that a tree exist + at this level --> + <subtree name="Storage"> + + <!-- the root filesystem --> + <subtree name="root"> + + <!-- the string that is returned for hrStorageDescr --> + <param name="storage-description" value="/"/> + + <!-- The Name of the file system without any special characters + Used to create the datafile --> + <param name="filesystem" value="root"/> + + <!-- Apply the template hrstorage --> + <apply-template name="hrstorage"/> + </subtree> + + <subtree name="tmp"> + <param name="storage-description" value="/tmp"/> + <param name="filesystem" value="tmp"/> + <apply-template name="hrstorage"/> + </subtree> + + <subtree name="var"> + <param name="storage-description" value="/var"/> + <param name="filesystem" value="var"/> + <apply-template name="hrstorage"/> + </subtree> + + <subtree name="opt"> + <param name="storage-description" value="/opt"/> + <param name="filesystem" value="opt"/> + <apply-template name="hrstorage"/> + </subtree> + + </subtree> + + <!-- Interfaces --> + <!-- The NetworkInterfaces Subtree, it is not required that a + tree exist at this level --> + <subtree name="NetworkInterfaces"> + + <!-- The network interface hme0 --> + <subtree name="hme0"> + <!-- The name of the interface as returned by rfc1213_ifDescr --> + <param name="interface-name" value="hme0"/> + + <!-- Apply the template rfc1213-interface --> + <apply-template name="rfc1213-interface"/> + </subtree> + + <subtree name="qfe0"> + <param name="interface-name" value="qfe0"/> + <apply-template name="rfc1213-interface"/> + </subtree> + + <subtree name="qfe1"> + <param name="interface-name" value="qfe1"/> + <apply-template name="rfc1213-interface"/> + </subtree> + </subtree> + </subtree> + </subtree> + </datasources> +</configuration> diff --git a/torrus/xmlconfig/examples/hpux.xml b/torrus/xmlconfig/examples/hpux.xml new file mode 100644 index 000000000..2d91f2d9c --- /dev/null +++ b/torrus/xmlconfig/examples/hpux.xml @@ -0,0 +1,103 @@ +<?xml version="1.0"?> +<!-- + Copyright (C) 2002 Stanislav Sinyagin + Copyright (C) 2003 Aaron S. Bush <abush at microelectronics dot com> + + File: hpux.xml + Description: HP-UX system monitor example for Torrus. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +--> + +<!-- + This is the example of using the definitions from + "vendor/hp.hpux.xml" configuration file. + Currently the tree structure has to be built by hand, the same way as + the example below. In the future, there will be device discovery + support for this vendor. +--> + +<configuration> + +<datasources> + + <subtree name="SNMP"> + + <subtree name="HP"> + + <param name="snmp-community" value="public" /> + <param name="domain-name" value="example.com" /> + <param name="data-dir" value="/var/snmpcollector" /> + + <subtree name="hp01"> + <param name="legend"> + Location: Rack 01; + Contact: John Doe + </param> + <param name="snmp-host" value="hp01" /> + + <subtree name="stand"> + <param name="filesystem-name" value="/stand" /> + <param name="filesystem" value="stand" /> + <apply-template name="hpux-filesystem" /> + </subtree> + + <subtree name="root"> + <param name="filesystem-name" value="/" /> + <param name="filesystem" value="root" /> + <apply-template name="hpux-filesystem" /> + </subtree> + + <subtree name="var"> + <param name="filesystem-name" value="/var" /> + <param name="filesystem" value="var" /> + <apply-template name="hpux-filesystem" /> + </subtree> + + <subtree name="usr"> + <param name="filesystem-name" value="/usr" /> + <param name="filesystem" value="usr" /> + <apply-template name="hpux-filesystem" /> + </subtree> + + <subtree name="tmp"> + <param name="filesystem-name" value="/tmp" /> + <param name="filesystem" value="tmp" /> + <apply-template name="hpux-filesystem" /> + </subtree> + + <subtree name="home"> + <param name="filesystem-name" value="/home" /> + <param name="filesystem" value="home" /> + <apply-template name="hpux-filesystem" /> + </subtree> + + <subtree name="opt"> + <param name="filesystem-name" value="/opt" /> + <param name="filesystem" value="opt" /> + <apply-template name="hpux-filesystem" /> + </subtree> + + <apply-template name="hpux-cpu" /> + + </subtree> + <!-- hp01 --> + + </subtree> + </subtree> + +</datasources> + +</configuration> diff --git a/torrus/xmlconfig/examples/monitors.xml b/torrus/xmlconfig/examples/monitors.xml new file mode 100644 index 000000000..a7a42d017 --- /dev/null +++ b/torrus/xmlconfig/examples/monitors.xml @@ -0,0 +1,156 @@ +<?xml version="1.0"?> +<!-- + Copyright (C) 2002 Stanislav Sinyagin + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + + $Id: monitors.xml,v 1.1 2010-12-27 00:04:29 ivan Exp $ + Stanislav Sinyagin <ssinyagin@yahoo.com> + +--> + +<!-- + These examples show how monitors can be built in Torrus and used together + with your data. + --> + +<configuration> + +<token-sets> + + <token-set name="jumps"> + <param name="comment" value="Traffic rate jumps" /> + </token-set> + + <token-set name="hw-failures"> + <param name="comment" value="Holt-Winters prediction failures" /> + </token-set> + + <token-set name="devel"> + <param name="comment" + value="Torrus development and testing" /> + </token-set> + +</token-sets> + +<monitors> + + <!-- First define the actions --> + + <!-- This action will put the graphs of alarmed datasources in + a single alarm report page --> + <action name="graph-hw-failures"> + <param name="action-type" value="tset" /> + <param name="tset-name" value="hw-failures" /> + </action> + + <action name="graph-jumps"> + <param name="action-type" value="tset" /> + <param name="tset-name" value="jumps" /> + </action> + + <action name="graph-devel"> + <param name="action-type" value="tset" /> + <param name="tset-name" value="devel" /> + </action> + + <action name="report-file"> + <param name="action-type" value="exec" /> + <param name="command"> + echo `date '+%d-%b-%Y %H:%M:%S'` \ + $TORRUS_MONITOR $TORRUS_EVENT $TORRUS_NODEPATH \ + >> /tmp/torrus-events + </param> + <param name="launch-when" value="set, repeat, clear, forget" /> + </action> + + <action name="snmptrap"> + <param name="action-type" value="exec" /> + <param name="command" value="$TORRUS_HOME/bin/action_snmptrap" /> + <param name="launch-when" value="set, clear" /> + </action> + + <action name="report-email"> + <param name="action-type" value="exec" /> + <param name="command"> + $TORRUS_HOME/bin/action_printemail | mail ssinyagin@yahoo.com + </param> + <param name="launch-when" value="set, clear" /> + </action> + + <monitor name="hw-failures"> + <param name="monitor-type" value="failures" /> + <param name="action" + value="graph-hw-failures, report-file" /> + <param name="expires" value="21600" /> + <param name="comment" + value="Holt-Winters prediction failures" /> + </monitor> + + <monitor name="strict-maximum"> + <param name="monitor-type" value="expression" /> + <param name="rpn-expr"> + #max,GT + </param> + <param name="action" value="report-email" /> + <param name="expires" value="3600" /> + <param name="comment" + value="Value is more than specified maximum" /> + </monitor> + + <monitor name="strict-minimum"> + <param name="monitor-type" value="expression" /> + <param name="rpn-expr"> + #min,LT + </param> + <param name="action" value="report-email" /> + <param name="expires" value="3600" /> + <param name="comment" + value="Value is less than specified minimum" /> + </monitor> + + <monitor name="high-jumps"> + <param name="monitor-type" value="expression" /> + <param name="rpn-expr"> + {(LAST-300)},10,*,GT, + {(LAST)},{(LAST-300)},10,/,LT, + OR, + {T@(LAST)},3600,+,NOW,GE, + AND + </param> + <param name="action" value="graph-jumps, report-file" /> + <param name="expires" value="3600" /> + <param name="comment" + value="Value jumped more than 10-fold in 5 minutes" /> + </monitor> + + <monitor name="mon-devel"> + <param name="monitor-type" value="expression" /> + <param name="rpn-expr"> + {(LAST-600)},-,ABS,10485760,GT, + {T@(LAST)},3600,+,NOW,GE, + AND + </param> + <param name="action"> + graph-devel, report-file, snmptrap + </param> + <param name="expires" value="900" /> + <param name="comment" + value="Traffic jumps more than 10mbps in 10 minutes" /> + </monitor> + +</monitors> + +</configuration> diff --git a/torrus/xmlconfig/examples/multigraph.xml b/torrus/xmlconfig/examples/multigraph.xml new file mode 100644 index 000000000..d9356b4a4 --- /dev/null +++ b/torrus/xmlconfig/examples/multigraph.xml @@ -0,0 +1,60 @@ +<?xml version="1.0"?> +<!-- + Copyright (C) 2002 Stanislav Sinyagin + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + + $Id: multigraph.xml,v 1.1 2010-12-27 00:04:29 ivan Exp $ + Stanislav Sinyagin <ssinyagin@yahoo.com> + +--> + +<!-- + This example shows how multiple datasources may be displayed in + one graph. See also the template definitions for "BpsInOut" + in "snmp-defs.xml", "vendor/cisco.ios.xml". + --> + +<configuration> + +<datasources> + + <subtree name="SampleMulti"> + <leaf name="sample1"> + <param name="ds-type" value="rrd-multigraph" /> + <param name="ds-names" value="in,out" /> + <param name="foobarpath" + value="/SNMP/Routers/213.230.38.4/FastEthernet0_0" /> + + <!-- parameter name tail is formed by the DS name --> + + <param name="ds-expr-in" value="{%foobarpath%/locIfInBitsSec}" /> + <param name="graph-legend-in" value="Bits per second in" /> + <param name="line-style-in" value="AREA" /> + <param name="line-color-in" value="#00FF00" /> + <param name="line-order-in" value="1" /> + + <param name="ds-expr-out" value="{%foobarpath%/locIfOutBitsSec}" /> + <param name="graph-legend-out" value="Bits per second out" /> + <param name="line-style-out" value="LINE2" /> + <param name="line-color-out" value="#0000FF" /> + <param name="line-order-out" value="2" /> + + </leaf> + </subtree> + +</datasources> + +</configuration> diff --git a/torrus/xmlconfig/examples/rainbow-schema.xml b/torrus/xmlconfig/examples/rainbow-schema.xml new file mode 100644 index 000000000..0685b3228 --- /dev/null +++ b/torrus/xmlconfig/examples/rainbow-schema.xml @@ -0,0 +1,164 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Copyright (C) 2003 Shawn Ferry + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +Shawn Ferry <sferry at sevenspace dot com > <lalartu at obscure dot org> + +$Id: rainbow-schema.xml,v 1.1 2010-12-27 00:04:28 ivan Exp $ +@(#) 10/18/03 schema.xml 1.3 (10/18/03 18:44:31) sferry + +--> +<!-- + (Not very much practical) example of using styling/rainbow-schema.pl +--> + +<include filename="generic/rfc1213.xml"/> + +<configuration> + <datasources> + <!-- rfc1313-interface must be applied at the per-interface level --> + <!-- + rfc1213-interface-rainbow Template + --> + <template name="rfc1213-interface-rainbow"> + <param name="data-file" + value="%system-id%_rfc1213-%interface-name%.rrd"/> + <leaf name="InOutBytes"> + <param name="ignore-upper-limit" value="no"/> + <param name="graph-upper-limit" value="1000"/> + <param name="comment" value="Input and Output bits per second graphs"/> + <param name="ds-type" value="rrd-multigraph"/> + <param name="ds-names" + value="in,out,one,two,three,four,five,six,seven,eight,nine,ten"/> + <!-- IN --> + <param name="ds-expr-in" value="{ifInOctets}"/> + <param name="graph-legend-in" value="Bytes per second in"/> + <param name="line-style-in" value="AREA"/> + <param name="line-color-in" value="##BpsOut"/> + <param name="line-order-in" value="1"/> + <!-- OUT --> + <param name="ds-expr-out" value="{ifOutOctets}"/> + <param name="graph-legend-out" value="Bytes per second out"/> + <param name="line-style-out" value="LINE2"/> + <param name="line-color-out" value="##in"/> + <param name="line-order-out" value="2"/> + + + <!-- IN --> + <param name="ds-expr-one" value="{ifInOctets},1.5,*"/> + <param name="graph-legend-one" value="one"/> + <param name="line-style-one" value="AREA"/> + <param name="line-color-one" value="##one"/> + <param name="line-order-one" value="3"/> + <!-- OUT --> + <param name="ds-expr-two" value="{ifOutOctets},2,*"/> + <param name="graph-legend-two" value="two"/> + <param name="line-style-two" value="LINE2"/> + <param name="line-color-two" value="##two"/> + <param name="line-order-two" value="4"/> + + <!-- IN --> + <param name="ds-expr-three" value="{ifInOctets},2.5,*"/> + <param name="graph-legend-three" value="three"/> + <param name="line-style-three" value="STACK"/> + <param name="line-color-three" value="##three"/> + <param name="line-order-three" value="5"/> + <!-- OUT --> + <param name="ds-expr-four" value="{ifOutOctets},2.5,*"/> + <param name="graph-legend-four" value="four"/> + <param name="line-style-four" value="LINE2"/> + <param name="line-color-four" value="##four"/> + <param name="line-order-four" value="6"/> + + <!-- IN --> + <param name="ds-expr-five" value="{ifInOctets},3,*"/> + <param name="graph-legend-five" value="five"/> + <param name="line-style-five" value="STACK"/> + <param name="line-color-five" value="##five"/> + <param name="line-order-five" value="7"/> + <!-- OUT --> + <param name="ds-expr-six" value="{ifOutOctets},3,*"/> + <param name="graph-legend-six" value="six"/> + <param name="line-style-six" value="LINE2"/> + <param name="line-color-six" value="##six"/> + <param name="line-order-six" value="8"/> + + <!-- IN --> + <param name="ds-expr-seven" value="{ifInOctets},3.5,*"/> + <param name="graph-legend-seven" value="seven"/> + <param name="line-style-seven" value="STACK"/> + <param name="line-color-seven" value="##seven"/> + <param name="line-order-seven" value="9"/> + <!-- OUT --> + <param name="ds-expr-eight" value="{ifOutOctets},3.5,*"/> + <param name="graph-legend-eight" value="eight"/> + <param name="line-style-eight" value="LINE2"/> + <param name="line-color-eight" value="##eight"/> + <param name="line-order-eight" value="10"/> + + + <!-- IN --> + <param name="ds-expr-nine" value="{ifInOctets},4,*"/> + <param name="graph-legend-nine" value="nine"/> + <param name="line-style-nine" value="STACK"/> + <param name="line-color-nine" value="##nine"/> + <param name="line-order-nine" value="11"/> + <!-- OUT --> + <param name="ds-expr-ten" value="{ifOutOctets},4,*"/> + <param name="graph-legend-ten" value="ten"/> + <param name="line-style-ten" value="LINE2"/> + <param name="line-color-ten" value="##ten"/> + <param name="line-order-ten" value="12"/> + + </leaf> + <leaf name="ifOutErrors"> + <param name="snmp-object" value="$rfc1213_ifOutErrors.$rfc1213_IFIDX"/> + <param name="rrd-ds" value="rfc1213_ifOutErrors"/> + <param name="rrd-create-dstype" value="COUNTER"/> + <param name="comment" value="Output error counter for the interface"/> + <param name="graph-legend" value="Errors out"/> + </leaf> + <leaf name="ifInErrors"> + <param name="snmp-object" value="$rfc1213_ifInErrors.$rfc1213_IFIDX"/> + <param name="rrd-ds" value="rfc1213_ifInErrors"/> + <param name="rrd-create-dstype" value="COUNTER"/> + <param name="comment" value="Input error counter for the interface"/> + <param name="graph-legend" value="Errors in"/> + </leaf> + <leaf name="ifInOctets"> + <param name="hidden" value="yes"/> + <param name="snmp-object" value="$rfc1213_ifInOctets.$rfc1213_IFIDX"/> + <param name="rrd-ds" value="rfc1213_ifInOctets"/> + <param name="rrd-create-dstype" value="COUNTER"/> + <param name="comment"> + 1-minute average of input Bytes per second + </param> + <param name="graph-legend" value="Bytes in"/> + </leaf> + <leaf name="ifOutOctets"> + <param name="hidden" value="yes"/> + <param name="snmp-object" value="$rfc1213_ifOutOctets.$rfc1213_IFIDX"/> + <param name="rrd-ds" value="rfc1213_ifOutOctets"/> + <param name="rrd-create-dstype" value="COUNTER"/> + <param name="comment"> + 1-minute average of output Bytes per second + </param> + <param name="graph-legend" value="Bytes out"/> + </leaf> + </template> + </datasources> +</configuration> diff --git a/torrus/xmlconfig/examples/servers.data b/torrus/xmlconfig/examples/servers.data new file mode 100644 index 000000000..28775dc28 --- /dev/null +++ b/torrus/xmlconfig/examples/servers.data @@ -0,0 +1,69 @@ +[%# + Example of using tpage for Torrus config generation. + This is an example only. See User Guide for more details. + Author: Christian Schnidrig + Generate the XML configuration with + tpage --define data=servers.data servers.tmpl >servers.xml +%] +[% + servers = [ + { + name => 'torrus' + type => 'Linux', + location => 'Binz' + description => 'Torrus (Front-end)' + community => 'blabla', + ram => 3000000000 + numCpu => 2, + disks => [ + {name => '/', nickName => 'Root'} + {name => '/var/snmpcollector/0', nickName => 'Collector_0'} + {name => '/var/snmpcollector/1', nickName => 'Collector_1'} + {name => '/var/snmpcollector/2', nickName => 'Collector_2'} + {name => '/var/snmpcollector/3', nickName => 'Collector_3'} + {name => '/var/snmpcollector/4', nickName => 'Collector_4'} + ], + nics => [ + {name => 'eth0', nickName => 'nic', speed => 100000000} + {name => 'eth1', nickName => 'local', speed => 1000000000} + ] + } + { + name => 'torrus2' + type => 'Linux', + location => 'Binz' + description => 'Torrus (Collector)' + community => 'blabla', + ram => 3000000000 + numCpu => 2, + disks => [ + {name => '/', nickName => 'Root'} + {name => '/var/snmpcollector/5', nickName => 'Collector_5'} + {name => '/var/snmpcollector/6', nickName => 'Collector_6'} + {name => '/var/snmpcollector/7', nickName => 'Collector_7'} + {name => '/var/snmpcollector/8', nickName => 'Collector_8'} + {name => '/var/snmpcollector/9', nickName => 'Collector_9'} + ], + nics => [ + {name => 'eth0', nickName => 'nic', speed => 100000000} + {name => 'eth1', nickName => 'local', speed => 1000000000} + ] + } + { + name => 'someSolarisMachine', + type => 'Solaris', + location => 'Binz', + description => 'Tacacs Server', + community => 'blabla', + ram => 224000000, + numCpu => 1, + disks => [ + {name => '/', nickName => 'Root'} + {name => '/log', nickName => 'Log'} + ], + nics => [ + {name => 'le0', nickName => 'nic', speed => 100000000} + ] + } + ] +%] diff --git a/torrus/xmlconfig/examples/servers.tmpl b/torrus/xmlconfig/examples/servers.tmpl new file mode 100644 index 000000000..47b26e555 --- /dev/null +++ b/torrus/xmlconfig/examples/servers.tmpl @@ -0,0 +1,82 @@ +<?xml version="1.0"?> +<!-- + Example of using tpage for Torrus config generation. + This is an example only. See User Guide for more details. + Author: Christian Schnidrig +--> + +[% PROCESS $data %] + +<configuration> +<datasources> + + <subtree name="SNMP"> + <subtree name="Servers"> + [% FOREACH server = servers %] + <!-- ************************************************************* --> + <!-- [% server.name %] --> + <subtree name="[% server.type %]"> + <subtree name="[% server.name %]"> + + <alias>/ByName/[% server.name %]/</alias> + + <param name="snmp-community" value="[% server.community %]" /> + <param name="comment" value="[% server.description %]" /> + <param name="snmp-host" value="[% server.name %]" /> + <param name="legend"> + Description: [% server.description %] + Location: [% server.location %] + </param> + + <apply-template name="physicalRam" /> + <leaf name="PhysicalRAM"> + <param name="lower-limit" value="0" /> + <param name="upper-limit" value="[% server.ram %]" /> + </leaf> + + <param name="numCpu" value="[% server.numCpu %]" /> + [% IF server.type == 'Linux'%] + <apply-template name="cpu-Linux" /> + [% ELSE %] + <apply-template name="cpu-Solaris" /> + [% END %] + <apply-template name="load" /> + <apply-template name="virtualMemory" /> + + <apply-template name="swap" /> + + <apply-template name="sysIO" /> + [% SET precedence = 200 %] + [% FOREACH disk = server.disks %] + <leaf name="Disk_[% disk.nickName %]"> + <param name="comment" value="Disk [% disk.name %]" /> + <param name="data-file"> + %system-id%_[%disk.nickName%].rrd + </param> + <param name="storage-name" value="[% disk.name %]" /> + [% SET precedence = precedence + 10 %] + <param name="precedence" value="[% precedence %]" /> + <apply-template name="disk" /> + </leaf> + [% END %] + [% FOREACH nic = server.nics %] + <subtree name="[% nic.nickName %]"> + <param name="interface-name" value="[% nic.name %]" /> + <param name="interface-nick" value="[% nic.nickName %]" /> + <param name="speed" value="[% nic.speed %]" /> + <param name="comment" value="Network Traffic [% nic.name %]"/> + <apply-template name="interface-counters" /> + [% SET precedence = precedence + 10 %] + <param name="precedence" value="[% precedence %]" /> + </subtree> + [% END %] + <apply-template name="hrSystemUptime" /> + </subtree> + </subtree> + [% END %] + </subtree> + </subtree> + +</datasources> +</configuration> + |