1MRTG-NW-GUIDE(1) mrtg MRTG-NW-GUIDE(1)
2
3
4
6 mrtg-nw-guide - MRTG for NetWare
7
9 This guide is intended to aid in the installation and configuration of
10 MRTG on a NetWare server.
11
13 MRTG is a relative newcomer to the NetWare platform. Earlier versions
14 of NetWare could not run MRTG natively for several reasons:
15
16 · Absence of NetWare OS support in the MRTG package.
17
18 · A NetWare server commandline length limitation.
19
20 · Absence of the Rateup executable (Rateup.nlm).
21
22 · A standard installation method.
23
24 · Problems with NetWare's implementation of Perl.
25
26 Support for the NetWare OS has now been fully added into MRTG, begin‐
27 ning with MRTG release 2.12.2.
28
29 Liberallly minded operating systems support a commandline length
30 approaching 1000 characters. In such environments it was an easy matter
31 to pass the sometimes high number of parameters used by MRTG's Rateup
32 executable directly on the commandline. Until NetWare 6.5, NetWare had
33 a commandline limit of 512 characters. This limitation was also removed
34 for NetWare 6.0 by Service Pack 5. For other NetWare versions and ear‐
35 lier Service Packs, this limitation remains. To permit a 'standard'
36 interface for NetWare, the Rateup executable has been modified to also
37 read its parameters from a file, and the MRTG script has been modified
38 to support this method on a NetWare platform. (See New Rateup Switch)
39
40 A Rateup NLM is now available, along with the necessary scripts to
41 build it if required. See the NetWare Support section of this document
42 for further details. Additionally, mrtg.pl has been revised because of
43 the unique (to NetWare) name of executables (NLM).
44
45 The absence of a specific installation procedure has caused MRTG to
46 fail in the past because the Perl script could not find or load the
47 Rateup executable. The installation method supplied here will solve
48 this problem for now.
49
50 The MRTG.pl script in the 2.12.2 (or later) version of MRTG has been
51 configured to suit all likely versions of NetWare able to use Perl5,
52 and bypasses all of the known problems with NetWare Perl running MRTG.
53
55 You will need the following:
56
57 · Perl 5.8.0 for NetWare with latest Perl Updates (February, 2005 or
58 later; previous versions MAY work)
59
60 · NetWare 5.1 w/ SP8, NetWare 6.0 w/ SP5 or NetWare 6.5 w/ SP2.
61
62 · A copy of the MRTG Package (v2.12.2 at time of writting)
63
64 · Three .ncf files to execute the Perl scripts at the NetWare server
65 console.
66
67 · A copy of the Rateup NLM (Pre-built or compiled)
68
69 · Optionally, any NetWare supported Web Server (Netscape, Apache 1.3
70 or 2.0)
71
72 For copies of the .ncf files and Rateup NLM, see NetWare Support in
73 this document.
74
76 1. Install the latest Perl 5.8.x release on your server. See the Perl
77 documentation for details.
78
79 2. Create the following directories:
80
81 SYS:/Mrtg
82 SYS:/Mrtg/bin
83 SYS:/Mrtg/contrib (Optional for this document)
84 SYS:/Mrtg/doc (Optional for this document)
85 SYS:/Mrtg/html
86 SYS:/Mrtg/html/images
87 SYS:/Mrtg/html/work
88 SYS:/Mrtg/lib
89 SYS:/Mrtg/logs
90 SYS:/Mrtg/translate
91
92 3. Copy from the MRTG package the following files:
93
94 \bin\* to SYS:/Mrtg/bin All files. See Note 1.
95
96 Note 1: Add a .pl extension to the mrtg, cfgmaker and indexmaker
97 files. The rateup.exe will NOT be needed on the NetWare server.
98
99 \contrib\* to SYS:/Mrtg/contrib/ Include sub-directories
100 \doc\* to SYS:/Mrtg/doc/ All files
101 \images\* to SYS:/Mrtg/html/images/ All files
102 \translate\* to SYS:/Mrtg/translate/ All files. See Note 2.
103
104 Note 2: For English-only language support, all \translate files
105 EXCEPT Locales_mrtg may be deleted.
106
107 \lib\* to SYS:/Mrtg/lib Include sub-directories. See Note 3.
108
109 Note 3: This will create the SYS:/Mrtg/lib/mrtg2 and ./pod directo‐
110 ries.
111
112 4. Create copies of the three .ncf files and install them:
113
114 *.ncf to SYS:/Mrtg/bin
115
116 See NetWare Support in this document for details on how to create
117 copies of these files.
118
119 5. See Compiling Rateup.nlm"> in this document for details on compil‐
120 ing the Rateup NLM yourself if desired. A prebuit verion is avail‐
121 able in the .\mrtg\bin directory where it must remain.
122
124 · Refer to Novell documentation on configuring and loading SNMP sup‐
125 port on your server if this is the device to be monitored.
126
127 · Edit sys:/mrtg/bin/MakeMrtgCfg.ncf:
128
129 replace ccccc with the GET community name for the SNMP device (typ‐
130 ically 'public'),
131
132 replace ddddd with the DNS name or IP address of the device to be
133 monitored. e.g public@www.myserver.com, public@10.202.65.180
134
135 Note 1: These are NOT mail addresses, they just look like one!
136
137 Note 2: If multiple devices are to be monitored, add their entries
138 to the same line:
139
140 e.g perl cfgmaker.pl public@www.myserver.com public@10.202.65.180
141 > sys:/mrtg/bin/mrtg.cfg
142
143 In this "Getting Started", it is 'suggested' to only monitor a sin‐
144 gle device.
145
146 · At the server console, run:
147
148 sys:/mrtg/bin/MakeMrtgCfg.ncf
149
150 This will create Mrtg.cfg in sys:/mrtg/bin.
151
152 · Edit the Mrtg.cfg configuration file created in the previous step.
153 Note the following:
154
155 It was found, when testing MRTG on a NetWare 6.5 server using a NIC
156 Interface, that mrtg.cfg contained the following message:
157
158 ### Interface 1 >> Descr: 'Intel(R)-8255x-based-Network-Connection'...
159 ### The following interface is commented out because:
160 ### * has a speed of 0 which makes no sense
161 #
162 ...
163
164 If this occurs, edit MakeMrtgCfg.ncf and add the following parame‐
165 ter as shown:
166
167 perl sys:\mrtg\bin\cfgmaker.pl --zero-speed=nnn public@10.202.65.180 > sys:\mrtg\bin\Mrtg.cfg
168
169 where nnn is the interface speed in bits per second. For a 100
170 Megabit LAN NIC, nnn = 10000000. It will be necessary to re-execute
171 the MakeMrtgCfg.ncf script before continuing with this section.
172
173 Below line 16 (*** Global Defaults), add:
174
175 HtmlDir: <a path> e.g HtmlDir: sys:/mrtg/html
176 ImageDir: <a path> e.g ImageDir: sys:/mrtg/html/work
177 LogDir: <a path> e.g LogDir: sys:/mrtg/logs
178 IconDir: <a path> e.g IconDir: ./images
179
180 Note 1. The HtmlDir entry specifies where MRTG will create its HTML
181 pages.
182
183 Note 2. The ImageDir entry specifies where the created graphic
184 icons are placed.
185
186 Note 3. The IconDir entry specifies where the supplied MRTG icons
187 are located. It MUST be a relative path from HtmlDir or absolute
188 URL. The value shown is recommended.
189
190 · At the server console run:
191
192 sys:/mrtg/bin/RunMrtg.ncf
193
194 several times. By the third time it should run without showing
195 error messages on the console screen.
196
197 This should create.
198
199 - A HTML page in the (HtmlDir) directory for each monitored device,
200
201 - A .dat file in the (ImageDir) directory for each monitored
202 device,
203
204 - Several .png icons in the (ImageDir) directory,
205
206 - Some log file entries in the (LogDir) directory.
207
208 Note: If you experience a "Use of uninitialised value in split"
209 error, it will be necessary to create a 'Path' environment variable
210 at the server console; use the following example
211
212 env path="SYS:\" (The actual value is immaterial, as long as the var itself exists.)
213
214 · Edit sys:/mrtg/bin/MakeMrtgIndex.ncf. Change the indicated <path>
215 shown in the following example to match the value entered for
216 (HtmlDir).
217
218 perl --noscreen sys:/mrtg/bin/indexmaker.pl sys:/mrtg/bin/Mrtg.cfg > <path>/index.html
219
220 · Create an index.html page linking the seperate device HTML page(s).
221 At the server console, run:
222
223 sys:/mrtg/bin/MakeMrtgIndex.ncf
224
225 This will create index.html in the (HtmlDir) directory.
226
227 · Optionally, configure a Web Server to permit access to the direc‐
228 tory specified in (HtmlDir) to view the MRTG graphs remotely, at,
229 for example:
230
231 http://ip_or_dns/mrtg/index.html
232
233 A sample configuration for an Apache Webserver is shown:
234
235 Alias /mrtg/ "SYS:/mrtg/html/"
236 <Directory "SYS:/mrtg/html">
237 AllowOverride None
238 Order allow,deny
239 Allow from all
240 </Directory>
241
242 · Set the property of the directory pointed to by (ImageDir), to
243 'Purge Immediate'.
244
245 · Finally, read the MRTG documentation for much more detailed config‐
246 uration/usage information.
247
248 Welcome to MRTG!!
249
251 MRTG can be made to run periodically by at least two means:
252
253 · Using CRON Scheduling
254
255 · Running MRTG in Daemon Mode
256
257 CRON Scheduling
258
259 To use CRON scheduling, create a CRON Scheduler entry to execute the
260 RunMrtg.ncf file on a frequency appropriate for the server environment
261 and information desired. The following entry in the sys:\etc\crontab
262 file will execute MRTG every five minutes:
263
264 0,5,10,15,20,25,30,35,40,45,50,55 * * * * sys:\mrtg\bin\runmrtg.ncf
265
266 The CRON Scheduler (cron.nlm) can be started automatically by adding it
267 in AUTOEXEC.ncf or, manually loading it at the server console.
268
269 MRTG in Daemon Mode
270
271 Refer to the MRTG-Reference document for information about the 'RunAs‐
272 Daemon' option. Its use is outside the scope of this document.
273
275 Read the MRTG documents, Perl documents or, finally, submit questions
276 to the MRTG User forums.
277
278 For NetWare specific issues, submit questions to the Perl forum at
279 news://developer-forums.novell.com/novell.devsup.perl (Novell Developer
280 Forums).
281
283 In addition to the rateup.c and Makefile.Netware supplied with the MRTG
284 release, you will also need:
285
286 · Metrowerks CodeWarrior with NetWare Support OR GCC Compiler (v3.0.3
287 or later) with NlmConv Utility
288
289 · Novell LibC NDK (February 2004 or later)
290
291 · GD Graphics Library (v2.0.33 or later)
292
293 · LibPNG Graphics Library (v1.2.8 or later)
294
295 · ZLib Library (v1.2.3 or later)
296
297 · The get_ver.awk script
298
299 · A copy of the GNU build tools. (See http://source‐
300 forge.net/projects/gnuwin32/)
301
302 The auxiliary libraries can be obtained from:
303
304 GD Graphics Library. (See http://www.boutell.com/gd/ )
305
306 PNG Graphics Library. (See http://libpng.sourceforge.net/ )
307
308 zLib Compression Library. (See http://www.gzip.org/zlib/ )
309
310 Edit the Makefile.Netware file as required to match your installation
311 paths; search the file for the key word 'Edit'.
312
314 For copies of the NCF and get_ver.awk scripts, see Appendix.
315
316 For NetWare specific issues, submit questions to the Perl forum at
317 news://developer-forums.novell.com/novell.devsup.perl (Novell Developer
318 Forums).
319
320 To move the MRTG application to a volume other than SYS: you will need
321 to edit the NCF scripts provided plus the MRTG[.pl] script itself in
322 two places.
323
325 The MRTG[.pl] script, when used on a NetWare platform, uses
326 Rateup[.nlm] with the new commandline switch:
327
328 RATEUP -f filename
329
330 where the filename parameter can include a leading path element.
331
332 The file format is exactly the same as that used on the commandline by
333 other operating systems, including the leading path and name of the
334 Rateup NLM.
335
337 The Appendix includes 'copies' of the following files:
338
339 · The NCF files used during MRTG configuration,
340
341 To create copies of these files, simply 'cut and paste' into your
342 favourite 'text editor' and save under their respective names. You
343 should remove the leading space from each line.
344
345 MakeMrtgCfg.NCF
346
347 # MakeMrtgCfg.NCF
348 # Purpose : Create the MRTG Configuration File
349 # Changed : 5/05/2005 New
350 # Located : SYS:MRTG\BIN
351 # Set For :
352 # Params :
353
354 # Edit this file and:
355
356 # Replace ccccc with your device GET SNMP Community Name - If unsure try 'public'.
357 # Replace ddddd with your device IP (n.n.n.n) or domain name.
358
359 perl --noscreen sys:\mrtg\bin\cfgmaker.pl ccccc@ddddd > sys:\mrtg\bin\Mrtg.cfg
360
361 #
362 # End of MakeMrtgCfg.NCF
363
364 RunMrtg.NCF
365
366 # RunMrtg.NCF
367 # Purpose : Run the MRTG Application
368 # Changed : 5/05/2005 New
369 # Located : SYS:MRTG\BIN
370 # Set For :
371 # Params :
372
373 # The paths are as per the examples recommended in "Getting Started".
374
375 perl --noscreen sys:\mrtg\bin\mrtg.pl sys:\mrtg\bin\mrtg.cfg
376
377 #
378 # End of RunMrtg.NCF
379
380 MakeMrtgIndex.NCF
381
382 # MakeMrtgIndex.NCF
383 # Purpose : Create the HTML Index File for MRTG HTML data pages
384 # Changed : 5/05/2005 New
385 # Located : SYS:MRTG\BIN
386 # Set For :
387 # Params :
388
389 # Note: Edit this file and change the redirected output to the location
390 # specified for HtmlDir or WorkDir. The sys:\apache2\htdocs\mrtg\index.html
391 # is based on the examples in "Getting Started".
392
393 perl --noscreen sys:\mrtg\bin\indexmaker.pl sys:\mrtg\bin\Mrtg.cfg > sys:\mrtg\html\index.html
394
395 #
396 # End of MakeMrtgIndex.NCF
397
399 GNU General Public License
400
402 The MRTG for NetWare exists largely through the efforts of Guenter
403 Knauf and feedback from beta testers.
404
406 Norm W..
407
408
409
4102.16.2 2008-05-16 MRTG-NW-GUIDE(1)