File: mrtg-nw-guide.txt

package info (click to toggle)
mrtg 2.16.2-3
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 5,508 kB
  • ctags: 1,238
  • sloc: perl: 25,056; ansic: 4,560; sh: 1,391; makefile: 244; php: 227; awk: 225; csh: 49; exp: 16
file content (410 lines) | stat: -rw-r--r-- 15,528 bytes parent folder | download
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
MRTG-NW-GUIDE(1)                     mrtg                     MRTG-NW-GUIDE(1)



NNAAMMEE
       mrtg-nw-guide - MRTG for NetWare

SSYYNNOOPPSSIISS
       This guide is intended to aid in the installation and configuration of
       MRTG on a NetWare server.

OOVVEERRVVIIEEWW
       MRTG is a relative newcomer to the NetWare platform. Earlier versions
       of NetWare could not run MRTG natively for several reasons:

       +o   Absence of NetWare OS support in the MRTG package.

       +o   A NetWare server commandline length limitation.

       +o   Absence of the Rateup executable (Rateup.nlm).

       +o   A standard installation method.

       +o   Problems with NetWare's implementation of Perl.

       Support for the NetWare OS has now been fully added into MRTG, begin-
       ning with MRTG release 2.12.2.

       Liberallly minded operating systems support a commandline length
       approaching 1000 characters. In such environments it was an easy matter
       to pass the sometimes high number of parameters used by MRTG's Rateup
       executable directly on the commandline. Until NetWare 6.5, NetWare had
       a commandline limit of 512 characters. This limitation was also removed
       for NetWare 6.0 by Service Pack 5. For other NetWare versions and ear-
       lier Service Packs, this limitation remains. To permit a 'standard'
       interface for NetWare, the Rateup executable has been modified to also
       read its parameters from a file, and the MRTG script has been modified
       to support this method on a NetWare platform.  (See New Rateup Switch)

       A Rateup NLM is now available, along with the necessary scripts to
       build it if required. See the  NetWare Support section of this document
       for further details. Additionally, mrtg.pl has been revised because of
       the unique (to NetWare) name of executables (NLM).

       The absence of a specific installation procedure has caused MRTG to
       fail in the past because the Perl script could not find or load the
       Rateup executable. The installation method supplied here will solve
       this problem for now.

       The MRTG.pl script in the 2.12.2 (or later) version of MRTG has been
       configured to suit all likely versions of NetWare able to use Perl5,
       and bypasses all of the known problems with NetWare Perl running MRTG.

PPRREERREEQQUUIISSIITTEESS
       You will need the following:

       +o   Perl 5.8.0 for NetWare with latest Perl Updates (February, 2005 or
           later; previous versions MAY work)

       +o   NetWare 5.1 w/ SP8, NetWare 6.0 w/ SP5 or NetWare 6.5 w/ SP2.

       +o   A copy of the MRTG Package (v2.12.2 at time of writting)

       +o   Three .ncf files to execute the Perl scripts at the NetWare server
           console.

       +o   A copy of the Rateup NLM (Pre-built or compiled)

       +o   Optionally, any NetWare supported Web Server (Netscape, Apache 1.3
           or 2.0)

       For copies of the .ncf files and Rateup NLM, see NetWare Support in
       this document.

IINNSSTTAALLLLIINNGG MMRRTTGG
       1.  Install the latest Perl 5.8.x release on your server. See the Perl
           documentation for details.

       2.  Create the following directories:

                    SYS:/Mrtg
                    SYS:/Mrtg/bin
                    SYS:/Mrtg/contrib    (Optional for this document)
                    SYS:/Mrtg/doc        (Optional for this document)
                    SYS:/Mrtg/html
                    SYS:/Mrtg/html/images
                    SYS:/Mrtg/html/work
                    SYS:/Mrtg/lib
                    SYS:/Mrtg/logs
                    SYS:/Mrtg/translate

       3.  Copy from the MRTG package the following files:

            \bin\*        to  SYS:/Mrtg/bin              All files. See Note 1.

           Note 1: Add a .pl extension to the mrtg, cfgmaker and indexmaker
           files.  The rateup.exe will NOT be needed on the NetWare server.

            \contrib\*    to  SYS:/Mrtg/contrib/         Include sub-directories
            \doc\*        to  SYS:/Mrtg/doc/             All files
            \images\*     to  SYS:/Mrtg/html/images/     All files
            \translate\*  to  SYS:/Mrtg/translate/       All files. See Note 2.

           Note 2: For English-only language support, all \translate files
           EXCEPT Locales_mrtg may be deleted.

            \lib\*        to  SYS:/Mrtg/lib              Include sub-directories. See Note 3.

           Note 3: This will create the SYS:/Mrtg/lib/mrtg2 and ./pod directo-
           ries.

       4.  Create copies of the three .ncf files and install them:

            *.ncf         to  SYS:/Mrtg/bin

           See NetWare Support in this document for details on how to create
           copies of these files.

       5.  See Compiling Rateup.nlm"> in this document for details on compil-
           ing the Rateup NLM yourself if desired.  A prebuit verion is avail-
           able in the .\mrtg\bin directory where it must remain.

CCOONNFFIIGGUURRIINNGG MMRRTTGG
       +o   Refer to Novell documentation on configuring and loading SNMP sup-
           port on your server if this is the device to be monitored.

       +o   Edit sys:/mrtg/bin/MakeMrtgCfg.ncf:

           replace ccccc with the GET community name for the SNMP device (typ-
           ically 'public'),

           replace ddddd with the DNS name or IP address of the device to be
           monitored.  e.g    public@www.myserver.com, public@10.202.65.180

           Note 1: These are NOT mail addresses, they just look like one!

           Note 2: If multiple devices are to be monitored, add their entries
           to the same line:

           e.g  perl cfgmaker.pl public@www.myserver.com public@10.202.65.180
           > sys:/mrtg/bin/mrtg.cfg

           In this "Getting Started", it is 'suggested' to only monitor a sin-
           gle device.

       +o   At the server console, run:

            sys:/mrtg/bin/MakeMrtgCfg.ncf

           This will create Mrtg.cfg in sys:/mrtg/bin.

       +o   Edit the Mrtg.cfg configuration file created in the previous step.
           Note the following:

           It was found, when testing MRTG on a NetWare 6.5 server using a NIC
           Interface, that mrtg.cfg contained the following message:

            ### Interface 1 >> Descr: 'Intel(R)-8255x-based-Network-Connection'...
            ### The following interface is commented out because:
            ### * has a speed of 0 which makes no sense
            #
            ...

           If this occurs, edit MakeMrtgCfg.ncf and add the following parame-
           ter as shown:

            perl sys:\mrtg\bin\cfgmaker.pl --zero-speed=nnn public@10.202.65.180 > sys:\mrtg\bin\Mrtg.cfg

           where nnnnnn is the interface speed in bits per second. For a 100
           Megabit LAN NIC, nnn = 10000000. It will be necessary to re-execute
           the MakeMrtgCfg.ncf script before continuing with this section.

           Below line 16 (*** Global Defaults), add:

            HtmlDir:  <a path>  e.g  HtmlDir:  sys:/mrtg/html
            ImageDir: <a path>  e.g  ImageDir: sys:/mrtg/html/work
            LogDir:   <a path>  e.g  LogDir:   sys:/mrtg/logs
            IconDir:  <a path>  e.g  IconDir:  ./images

           Note 1. The HtmlDir entry specifies where MRTG will create its HTML
           pages.

           Note 2. The ImageDir entry specifies where the created graphic
           icons are placed.

           Note 3. The IconDir entry specifies where the supplied MRTG icons
           are located.  It MUST be a relative path from HtmlDir or absolute
           URL. The value shown is recommended.

       +o   At the server console run:

            sys:/mrtg/bin/RunMrtg.ncf

           several times. By the third time it should run without showing
           error messages on the console screen.

           This should create.

           - A HTML page in the (HtmlDir) directory for each monitored device,

           - A .dat file in the (ImageDir) directory for each monitored
           device,

           - Several .png icons in the (ImageDir) directory,

           - Some log file entries in the (LogDir) directory.

           Note: If you experience a "Use of uninitialised value in split"
           error, it will be necessary to create a 'Path' environment variable
           at the server console; use the following example

            env path="SYS:\"  (The actual value is immaterial, as long as the var itself exists.)

       +o   Edit sys:/mrtg/bin/MakeMrtgIndex.ncf. Change the indicated <path>
           shown in the following example to match the value entered for
           (HtmlDir).

            perl --noscreen sys:/mrtg/bin/indexmaker.pl sys:/mrtg/bin/Mrtg.cfg > <path>/index.html

       +o   Create an index.html page linking the seperate device HTML page(s).
           At the server console, run:

            sys:/mrtg/bin/MakeMrtgIndex.ncf

           This will create index.html in the (HtmlDir) directory.

       +o   Optionally, configure a Web Server to permit access to the direc-
           tory specified in (HtmlDir) to view the MRTG graphs remotely, at,
           for example:

            http://ip_or_dns/mrtg/index.html

           A sample configuration for an Apache Webserver is shown:

            Alias /mrtg/ "SYS:/mrtg/html/"
            <Directory "SYS:/mrtg/html">
                        AllowOverride None
                        Order allow,deny
                        Allow from all
            </Directory>

       +o   Set the property of the directory pointed to by (ImageDir), to
           'Purge Immediate'.

       +o   Finally, read the MRTG documentation for much more detailed config-
           uration/usage information.

       Welcome to MRTG!!

MMAAKKEE MMRRTTGG RRUUNN AALLLL TTHHEE TTIIMMEE
       MRTG can be made to run periodically by at least two means:

       +o   Using CRON Scheduling

       +o   Running MRTG in Daemon Mode

       CCRROONN SScchheedduulliinngg

       To use CRON scheduling, create a CRON Scheduler entry to execute the
       RunMrtg.ncf file on a frequency appropriate for the server environment
       and information desired. The following entry in the sys:\etc\crontab
       file will execute MRTG every five minutes:

        0,5,10,15,20,25,30,35,40,45,50,55 * * * * sys:\mrtg\bin\runmrtg.ncf

       The CRON Scheduler (cron.nlm) can be started automatically by adding it
       in AUTOEXEC.ncf or, manually loading it at the server console.

       MMRRTTGG iinn DDaaeemmoonn MMooddee

       Refer to the MRTG-Reference document for information about the 'RunAs-
       Daemon' option. Its use is outside the scope of this document.

TTRROOUUBBLLEESSHHOOOOTTIINNGG
       Read the MRTG documents, Perl documents or, finally, submit questions
       to the MRTG User forums.

       For NetWare specific issues, submit questions to the Perl forum at
       news://developer-forums.novell.com/novell.devsup.perl (Novell Developer
       Forums).

CCOOMMPPIILLIINNGG RRAATTEEUUPP..NNLLMM
       In addition to the rateup.c and Makefile.Netware supplied with the MRTG
       release, you will also need:

       +o   Metrowerks CodeWarrior with NetWare Support OR GCC Compiler (v3.0.3
           or later) with NlmConv Utility

       +o   Novell LibC NDK (February 2004 or later)

       +o   GD Graphics Library (v2.0.33 or later)

       +o   LibPNG Graphics Library (v1.2.8 or later)

       +o   ZLib Library (v1.2.3 or later)

       +o   The get_ver.awk script

       +o   A copy of the GNU build tools.    (See http://source-
           forge.net/projects/gnuwin32/)

       The auxiliary libraries can be obtained from:

       GD Graphics Library.   (See http://www.boutell.com/gd/ )

       PNG Graphics Library.   (See http://libpng.sourceforge.net/ )

       zLib Compression Library.   (See http://www.gzip.org/zlib/ )

       Edit the Makefile.Netware file as required to match your installation
       paths; search the file for the key word 'Edit'.

NNEETTWWAARREE SSUUPPPPOORRTT
       For copies of the NCF and get_ver.awk scripts, see Appendix.

       For NetWare specific issues, submit questions to the Perl forum at
       news://developer-forums.novell.com/novell.devsup.perl (Novell Developer
       Forums).

       To move the MRTG application to a volume other than SYS: you will need
       to edit the NCF scripts provided plus the MRTG[.pl] script itself in
       two places.

NNEEWW RRAATTEEUUPP SSWWIITTCCHH
       The MRTG[.pl] script, when used on a NetWare platform, uses
       Rateup[.nlm] with the new commandline switch:

            RATEUP -f filename

       where the filename parameter can include a leading path element.

       The file format is exactly the same as that used on the commandline by
       other operating systems, including the leading path and name of the
       Rateup NLM.

AAPPPPEENNDDIIXX
       The Appendix includes 'copies' of the following files:

       +o   The NCF files used during MRTG configuration,

       To create copies of these files, simply 'cut and paste' into your
       favourite 'tteexxtt eeddiittoorr' and save under their respective names. You
       should remove the leading space from each line.

       _M_a_k_e_M_r_t_g_C_f_g_._N_C_F

        # MakeMrtgCfg.NCF
        # Purpose : Create the MRTG Configuration File
        # Changed :  5/05/2005  New
        # Located : SYS:MRTG\BIN
        # Set For :
        # Params  :

        # Edit this file and:

        # Replace ccccc with your device GET SNMP Community Name - If unsure try 'public'.
        # Replace ddddd with your device IP (n.n.n.n) or domain name.

        perl --noscreen sys:\mrtg\bin\cfgmaker.pl ccccc@ddddd > sys:\mrtg\bin\Mrtg.cfg

        #
        # End of MakeMrtgCfg.NCF

       _R_u_n_M_r_t_g_._N_C_F

        # RunMrtg.NCF
        # Purpose : Run the MRTG Application
        # Changed :  5/05/2005  New
        # Located : SYS:MRTG\BIN
        # Set For :
        # Params  :

        # The paths are as per the examples recommended in "Getting Started".

        perl --noscreen sys:\mrtg\bin\mrtg.pl sys:\mrtg\bin\mrtg.cfg

        #
        # End of RunMrtg.NCF

       _M_a_k_e_M_r_t_g_I_n_d_e_x_._N_C_F

        # MakeMrtgIndex.NCF
        # Purpose : Create the HTML Index File for MRTG HTML data pages
        # Changed :  5/05/2005  New
        # Located : SYS:MRTG\BIN
        # Set For :
        # Params  :

        # Note: Edit this file and change the redirected output to the location
        #       specified for HtmlDir or WorkDir. The sys:\apache2\htdocs\mrtg\index.html
        #       is based on the examples in "Getting Started".

        perl --noscreen sys:\mrtg\bin\indexmaker.pl sys:\mrtg\bin\Mrtg.cfg > sys:\mrtg\html\index.html

        #
        # End of MakeMrtgIndex.NCF

LLIICCEENNSSEE
       GNU General Public License

CCRREEDDIITTSS
       The MRTG for NetWare exists largely through the efforts of Guenter
       Knauf and feedback from beta testers.

AAUUTTHHOORR
       Norm W..



2.16.2                            2008-05-16                  MRTG-NW-GUIDE(1)