1 # Copyright (C) 2010 Stanislav Sinyagin
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
17 # $Id: nodeid_usage.pod.in,v 1.1 2010-12-27 00:04:35 ivan Exp $
18 # Stanislav Sinyagin <ssinyagin@yahoo.com>
22 =head1 Torrus/OSS integration: NodeID usage guidelines
26 Most parts of Torrus software mentioned in this document were developed under
27 sponsoring by the following companies:
31 =item * nexellent ag, Switzerland (www.nexellent.ch)
33 NodeID concept and base implementation, host-based authentication.
35 =item * M-net Telekommunikations GmbH, Germany (www.m-net.de)
39 =item * Fibre Noire Internet Inc, Canada (www.fibrenoire.ca)
41 Extensions in M-Net plugin for NodeID manipulation.
47 This document explains the new concept of NodeID and ways of utilizing
48 it for better integration of Torrus into an OSS environment.
53 Torrus 1.0.9 introduces a new parameter for datasource tree elements:
54 C<nodeid>. This parameter is not inherited from parent subtrees to child
55 subtrees or leaves. Also the XML configuration compiler verifies uniqueness
56 of its values across the whole tree.
58 The purpose of C<nodeid> is to provide persistent identifiers to the tree
59 elements. Unlike the token numbers, these identifiers are not changing between
60 re-compilations of the tree. Also unlike the path string, C<nodeid> would
61 stay the same if a network device changes its place in the tree topology.
63 By default, C<nodeid> value is composed of SNMP host name and device
64 component name, such as IF-MIB interface. It can also be easily adapted to
65 contain external identifiers, such as Asset ID or Service ID from some
66 external inventory database.
68 Once C<nodeid> values are put into the XML configuration (usually
69 SNMP discovery engine does it) and compiled into the configuration database,
70 they can be used for accessing the Torrus graphs from external systems.
72 The command-line utility C<torrus nodeid> helps searching through existing
73 NodeID values, and also renders the graphs on request.
75 Another quick way to find the NodeID value is to navigate to the desired
76 graph page and check the I<Bookmark> shortcut at the bottom of the page.
77 For the nodes where C<nodeid> is defined, the bookmark will use it instead of
78 the path in the datasource tree.
82 =head2 Host-based authentication
84 Many Torrus deployments have user authentication enabled. This makes it
85 complicated for other OSS systems to retrieve graphs from the Torrus rendering
88 Torrus 1.0.9 introduces host-based authentication: a special user
89 is created for requestor's IP address. The requestor specifies its unique
90 password in the URL as C<hostauth> parameter. Also the Torrus WebUI does not
91 send the session cookie back to the requestor.
93 This new feature makes it easy to display Torrus graphs inside user
94 self-service portals without giving direct access to the Torrus server.
96 For example, the following command adds the host 10.0.0.5 with password
97 "654321" to the I<admin> group:
99 torrus acl --addhost=10.0.0.5 --hostpassword=654321 --addtogroup=admin
101 Then the following command executed from 10.0.0.5 would retrieve an
102 InOut_bps graph for the last 24 hours for a given interface on I<rtr01> router:
105 'http://torrus/main?nodeid=if//rtr01//GigabitEthernet0/1//inoutbit&view=last24h&hostauth=654321'
110 Details of M-net plugin are explained in the plugin documentation.
111 The plugin interprets description strings on device network interfaces:
112 it catches all key-value pairs of format I<key1=val1;key2=val2;...> and
113 performs various actions on them.
115 Now assume there's an external inventory system, and each network interface is
116 assigned a unique Asset ID. Our natural wish would be to use these asset IDs
117 in NodeID strings, instead of hostnames and interfaces. This way we are
118 secured against hardware changes and upgrades (assuming that Asset ID stays
121 In order to take advantage of M-Net plugin, the Asset ID values should be
122 configured in all interface descriptions, like follows:
124 interface GigabitEthernet0/1
125 description bw=200M; assetid=VPNLINK00055; ct=BC
127 In the example above, the interface description tells that this is a 200Mbps
128 link, connection type is Business Customer, and the unique link identifier is
129 I<VPNLINK00055>. The format allows inserting extra spaces for better
132 In the corresponding Device Discovery XML (DDX) file, the following
133 parameters would be set:
136 <param name="snmp-host" value="rtr01.example.com"/>
137 <param name="M_net::manage" value="yes"/>
138 <param name="M_net::nodeid-prefix-key" value="assetid"/>
141 As a result, after the SNMP discovery and XML compiler finish their work,
142 we get a number of NodeID values associated with this customer connection:
144 assetid//VPNLINK00055
145 assetid//VPNLINK00055//inbytes
146 assetid//VPNLINK00055//indrops
147 assetid//VPNLINK00055//inerr
148 assetid//VPNLINK00055//inoutbit
149 assetid//VPNLINK00055//inpackets
150 assetid//VPNLINK00055//outbytes
151 assetid//VPNLINK00055//outdrops
152 assetid//VPNLINK00055//outerr
153 assetid//VPNLINK00055//outpackets
155 The first NodeID refers to the interface-level subtree in Torrus
156 configuration, and all other values refer to the corresponding graphs
159 So, now the customer self-service portal would retrieve the input/output
160 summary graph with the following URL (wget woulld be certainly replaced by a
161 corresponding command in PHP or other Web programming language):
164 'http://torrus/main?nodeid=assetid//VPNLINK00055//inoutbit&view=last24h&hostauth=654321'
166 Of course, a number of additional view definitions could be created, in order
167 to create graphs of needed size and time span. Also, for example, a calendar
168 month's graph could be generated by specifying the followiong
169 parameters in the URL: C<NOW> or C<Gend> pointing to the beginning of
170 next month, and optionally C<Gstart> indicating the start of the time period.
173 =head2 Setting the host identifier
175 Alternatively to the technique explained above, the local OSS environment
176 could require some custom identifiers assigned to the network devices.
177 For example, CA Spectrum software uses its internal Model Handles to refer to
180 The discovery parameter C<nodeid-device> sets the string that would be used
181 in the host part of NodeID values:
184 <param name="snmp-host" value="rtr02.example.com"/>
185 <param name="nodeid-device" value="0xC0FFEE"/>
188 The resulting NodeID values would be based on "0xC0FFEE" string instead of
191 if//0xC0FFEE//GigabitEthernet0/1//inoutbit
194 =head2 Future development
196 The NodeID is a relatively new concept in Torrus, and there will be other
197 ways of specifying and using it in the course of Torrus development.
199 One of the directions for future enhancement is a look-up of NodeID values
200 in some external database before or during SNMP discovery.
202 The usage of NodeID is not limited to IF-MIB interfaces. Some Torrus
203 templates already assign NodeID values to, for example, environment sensors
204 and DOCSIS statistics.
210 Copyright (c) 2010 Stanislav Sinyagin E<lt>ssinyagin@yahoo.comE<gt>