summaryrefslogtreecommitdiff
path: root/torrus/examples
diff options
context:
space:
mode:
Diffstat (limited to 'torrus/examples')
-rw-r--r--torrus/examples/Makefile.am29
-rw-r--r--torrus/examples/Makefile.in377
-rw-r--r--torrus/examples/README12
-rw-r--r--torrus/examples/onms.tmpl54
-rw-r--r--torrus/examples/onmsInterfaces.sh61
-rw-r--r--torrus/examples/setmonitor.xupdate.xml47
-rw-r--r--torrus/examples/torrus-siteconfig.powerbook.pl48
7 files changed, 628 insertions, 0 deletions
diff --git a/torrus/examples/Makefile.am b/torrus/examples/Makefile.am
new file mode 100644
index 000000000..907565a8e
--- /dev/null
+++ b/torrus/examples/Makefile.am
@@ -0,0 +1,29 @@
+
+# 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: Makefile.am,v 1.1 2010-12-27 00:04:40 ivan Exp $
+# Stanislav Sinyagin <ssinyagin@yahoo.com>
+#
+
+examplesdir = $(exmpdir)
+dist_examples_DATA = \
+ README \
+ onms.tmpl \
+ onmsInterfaces.sh \
+ torrus-siteconfig.powerbook.pl \
+ setmonitor.xupdate.xml
+
diff --git a/torrus/examples/Makefile.in b/torrus/examples/Makefile.in
new file mode 100644
index 000000000..e058505e9
--- /dev/null
+++ b/torrus/examples/Makefile.in
@@ -0,0 +1,377 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# 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: Makefile.in,v 1.1 2010-12-27 00:04:40 ivan Exp $
+# Stanislav Sinyagin <ssinyagin@yahoo.com>
+#
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = examples
+DIST_COMMON = README $(dist_examples_DATA) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(examplesdir)"
+dist_examplesDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(dist_examples_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+FIND = @FIND@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+KILL = @KILL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PERLINC = @PERLINC@
+POD2MAN = @POD2MAN@
+POD2MAN_PRESENT_FALSE = @POD2MAN_PRESENT_FALSE@
+POD2MAN_PRESENT_TRUE = @POD2MAN_PRESENT_TRUE@
+POD2TEXT = @POD2TEXT@
+POD2TEXT_PRESENT_FALSE = @POD2TEXT_PRESENT_FALSE@
+POD2TEXT_PRESENT_TRUE = @POD2TEXT_PRESENT_TRUE@
+RM = @RM@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SLEEP = @SLEEP@
+STRIP = @STRIP@
+SU = @SU@
+VERSION = @VERSION@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__leading_dot = @am__leading_dot@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+cachedir = @cachedir@
+cfgdefdir = @cfgdefdir@
+datadir = @datadir@
+dbhome = @dbhome@
+defrrddir = @defrrddir@
+distxmldir = @distxmldir@
+enable_pkgonly = @enable_pkgonly@
+enable_varperm = @enable_varperm@
+exec_prefix = @exec_prefix@
+exmpdir = @exmpdir@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+logdir = @logdir@
+mandir = @mandir@
+mansec_misc = @mansec_misc@
+mansec_usercmd = @mansec_usercmd@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+perlithreads = @perlithreads@
+perllibdir = @perllibdir@
+perllibdirs = @perllibdirs@
+piddir = @piddir@
+pkgbindir = @pkgbindir@
+pkgdocdir = @pkgdocdir@
+pkghome = @pkghome@
+plugdevdisccfgdir = @plugdevdisccfgdir@
+pluginsdir = @pluginsdir@
+plugtorruscfgdir = @plugtorruscfgdir@
+plugwrapperdir = @plugwrapperdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+reportsdir = @reportsdir@
+sbindir = @sbindir@
+scriptsdir = @scriptsdir@
+seslockdir = @seslockdir@
+sesstordir = @sesstordir@
+sharedstatedir = @sharedstatedir@
+siteconfdir = @siteconfdir@
+sitedir = @sitedir@
+sitexmldir = @sitexmldir@
+supdir = @supdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+tmpldir = @tmpldir@
+tmpluserdir = @tmpluserdir@
+torrus_user = @torrus_user@
+var_group = @var_group@
+var_mode = @var_mode@
+var_user = @var_user@
+varprefix = @varprefix@
+webplaindir = @webplaindir@
+webscriptsdir = @webscriptsdir@
+wrapperdir = @wrapperdir@
+examplesdir = $(exmpdir)
+dist_examples_DATA = \
+ README \
+ onms.tmpl \
+ onmsInterfaces.sh \
+ torrus-siteconfig.powerbook.pl \
+ setmonitor.xupdate.xml
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu examples/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+uninstall-info-am:
+install-dist_examplesDATA: $(dist_examples_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(examplesdir)" || $(mkdir_p) "$(DESTDIR)$(examplesdir)"
+ @list='$(dist_examples_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(dist_examplesDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(examplesdir)/$$f'"; \
+ $(dist_examplesDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(examplesdir)/$$f"; \
+ done
+
+uninstall-dist_examplesDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_examples_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(examplesdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(examplesdir)/$$f"; \
+ done
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(examplesdir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-dist_examplesDATA
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-dist_examplesDATA uninstall-info-am
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am \
+ install-dist_examplesDATA install-exec install-exec-am \
+ install-info install-info-am install-man install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am uninstall uninstall-am \
+ uninstall-dist_examplesDATA uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/torrus/examples/README b/torrus/examples/README
new file mode 100644
index 000000000..fa4f848ea
--- /dev/null
+++ b/torrus/examples/README
@@ -0,0 +1,12 @@
+Some useful exmples of Torrus configuration and usage.
+
+XML configuration examples reside in xmlconfig/examples.
+
+*.xupdate.xml files are examples of XUpdate usage to modify the XML files
+generated by devdiscover. See also:
+ Torrus User Guide
+ XUpdate specification: http://www.xmldb.org/xupdate/
+ XUpdate implementation in Perl by Petr Pajas: XML::XUpdate::LibXML
+ XML Editing shell by Petr Pajas: http://xsh.sourceforge.net/
+
+
diff --git a/torrus/examples/onms.tmpl b/torrus/examples/onms.tmpl
new file mode 100644
index 000000000..5a32fb733
--- /dev/null
+++ b/torrus/examples/onms.tmpl
@@ -0,0 +1,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>
diff --git a/torrus/examples/onmsInterfaces.sh b/torrus/examples/onmsInterfaces.sh
new file mode 100644
index 000000000..7f8d77157
--- /dev/null
+++ b/torrus/examples/onmsInterfaces.sh
@@ -0,0 +1,61 @@
+#!/bin/sh
+# Copyright (C) 2004 Gustavo Torres
+# Copyright (C) 2004 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: onmsInterfaces.sh,v 1.1 2010-12-27 00:04:40 ivan Exp $
+# Gustavo Torres <r3db34rd@yahoo.com>
+# Stanislav Sinyagin <ssinyagin@yahoo.com>
+#
+
+# This shell script extracts OpenNMS information about interfaces
+# and builds the data file which you can use with onms.tmpl to generate
+# Torrus XML configuration.
+
+# Usage (RESPONCEDIR setting may be skipped if it's in the default path)
+#
+# RESPONCEDIR=/var/opennms/rrd/response
+# export RESPONCEDIR
+# cd /usr/local/torrus-0.1/share/torrus/
+# ./examples/onmsInterfaces.sh > onms.data
+# tpage --define data=onms.data examples/onms.tmpl > xmlconfig/onms.xml
+
+
+if test x"$RESPONCEDIR" = x""; then
+ RESPONCEDIR=/var/opennms/rrd/response
+fi
+
+echo '[% responcedir = "'$RESPONCEDIR'" %]'
+echo '[% ifs = ['
+
+for ipaddr in `ls ${RESPONCEDIR}`; do
+ echo " { addr => '$i',";
+ echo " services => [";
+ for service in `ls ${RESPONCEDIR}/$i | awk -F. '{print $1}'`; do
+ echo -n " {name => '${service}', "
+ legend=`echo $j | awk '{print toupper($1)}'`
+ echo "legend => '${legend}'}"
+ done
+ echo ' ]';
+ echo ' }';
+done
+echo '] %]'
+
+# Local Variables:
+# mode: shell-script
+# indent-tabs-mode: nil
+# perl-indent-level: 4
+# End:
diff --git a/torrus/examples/setmonitor.xupdate.xml b/torrus/examples/setmonitor.xupdate.xml
new file mode 100644
index 000000000..c233ee523
--- /dev/null
+++ b/torrus/examples/setmonitor.xupdate.xml
@@ -0,0 +1,47 @@
+<?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: setmonitor.xupdate.xml,v 1.1 2010-12-27 00:04:40 ivan Exp $
+ Stanislav Sinyagin <ssinyagin@yahoo.com>
+
+-->
+
+<!--
+ Example of XUpdate postprocessor for a devdiscover generated file
+-->
+
+<xupdate:modifications version="1.0"
+ xmlns:xupdate="http://www.xmldb.org/xupdate">
+
+<!-- Insert additional creator-info after the last one -->
+<xupdate:insert-after
+ select="/configuration/creator-info[not(following-sibling::creator-info)]">
+ <creator-info>
+ This file was modified with XUpdate script setmonitor.xupdate.xml
+ </creator-info>
+</xupdate:insert-after>
+
+<!-- For every ifError leaf, set the monitor -->
+<xupdate:append select="//subtree[apply-template[@name='iftable-errors']]">
+ <xupdate:element name="subtree">
+ <xupdate:attribute name="name">ifErrors</xupdate:attribute>
+ <param name="monitor" value="check-iferrors"/>
+ </xupdate:element>
+</xupdate:append>
+
+</xupdate:modifications>
diff --git a/torrus/examples/torrus-siteconfig.powerbook.pl b/torrus/examples/torrus-siteconfig.powerbook.pl
new file mode 100644
index 000000000..0c1704223
--- /dev/null
+++ b/torrus/examples/torrus-siteconfig.powerbook.pl
@@ -0,0 +1,48 @@
+# Torrus Site config. Put all your site specifics here.
+# You need to stop and start Apache server every time you change this file.
+#
+# An example using the rainbow-schema overlay.
+# Shawn Ferry <sferry at sevenspace dot com> <lalartu at obscure dot org>
+#
+# (ssinyagin) You can use statements like these from inside your
+# XML configurations:
+# <include filename="generic/rfc2790.host-resources.xml"/>
+# Besides, "devdiscover" discovery tool will soon support most
+# of these vendor definitions.
+
+# $Id: torrus-siteconfig.powerbook.pl,v 1.1 2010-12-27 00:04:40 ivan Exp $
+# @(#) 10/18/03 torrus-siteconfig.pl 1.3 (10/18/03 18:44:31) sferry
+
+@Torrus::Global::xmlAlwaysIncludeFirst =
+ qw(
+ defaults.xml
+ snmp-defs.xml
+ collector-periods.xml
+ vendor/cisco.ios.xml
+ generic/rfc2790.host-resources.xml
+ generic/rfc1213.xml
+ vendor/ucd-snmp.xml
+ );
+
+%Torrus::Global::treeConfig =
+ (
+ 'powerbook' => {
+ 'description' => 'Powerbook Laptop Tree',
+ 'xmlfiles' => [qw(
+ powerbook/powerbook-defaults.xml
+ powerbook/powerbook-ti.xml
+ )],
+ 'run' => {
+ 'collector' => 1,
+ }
+ },
+
+ ); # CLOSE %Torrus::Global::treeConfig
+
+
+ # Override values in the current schema with those in
+ # rainbow schema, schema changes require an apache restart
+ $Torrus::Renderer::stylingProfileOverlay = "rainbow-schema";
+
+
+1;