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,
27 beginning 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
35 earlier 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
110 directories.
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
120 compiling the Rateup NLM yourself if desired. A prebuit verion is
121 available in the .\mrtg\bin directory where it must remain.
122
124 · Refer to Novell documentation on configuring and loading SNMP
125 support 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
130 (typically '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
144 single 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
165 parameter 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
228 directory specified in (HtmlDir) to view the MRTG graphs remotely,
229 at, 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
246 configuration/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 To use CRON scheduling, create a CRON Scheduler entry to execute the
259 RunMrtg.ncf file on a frequency appropriate for the server environment
260 and information desired. The following entry in the sys:\etc\crontab
261 file will execute MRTG every five minutes:
262
263 0,5,10,15,20,25,30,35,40,45,50,55 * * * * sys:\mrtg\bin\runmrtg.ncf
264
265 The CRON Scheduler (cron.nlm) can be started automatically by adding it
266 in AUTOEXEC.ncf or, manually loading it at the server console.
267
268 MRTG in Daemon Mode
269 Refer to the MRTG-Reference document for information about the
270 'RunAsDaemon' option. Its use is outside the scope of this document.
271
273 Read the MRTG documents, Perl documents or, finally, submit questions
274 to the MRTG User forums.
275
276 For NetWare specific issues, submit questions to the Perl forum at
277 news://developer-forums.novell.com/novell.devsup.perl (Novell Developer
278 Forums).
279
281 In addition to the rateup.c and Makefile.Netware supplied with the MRTG
282 release, you will also need:
283
284 · Metrowerks CodeWarrior with NetWare Support OR GCC Compiler (v3.0.3
285 or later) with NlmConv Utility
286
287 · Novell LibC NDK (February 2004 or later)
288
289 · GD Graphics Library (v2.0.33 or later)
290
291 · LibPNG Graphics Library (v1.2.8 or later)
292
293 · ZLib Library (v1.2.3 or later)
294
295 · The get_ver.awk script
296
297 · A copy of the GNU build tools. (See
298 http://sourceforge.net/projects/gnuwin32/)
299
300 The auxiliary libraries can be obtained from:
301
302 GD Graphics Library. (See http://www.boutell.com/gd/ )
303
304 PNG Graphics Library. (See http://libpng.sourceforge.net/ )
305
306 zLib Compression Library. (See http://www.gzip.org/zlib/ )
307
308 Edit the Makefile.Netware file as required to match your installation
309 paths; search the file for the key word 'Edit'.
310
312 For copies of the NCF and get_ver.awk scripts, see Appendix.
313
314 For NetWare specific issues, submit questions to the Perl forum at
315 news://developer-forums.novell.com/novell.devsup.perl (Novell Developer
316 Forums).
317
318 To move the MRTG application to a volume other than SYS: you will need
319 to edit the NCF scripts provided plus the MRTG[.pl] script itself in
320 two places.
321
323 The MRTG[.pl] script, when used on a NetWare platform, uses
324 Rateup[.nlm] with the new commandline switch:
325
326 RATEUP -f filename
327
328 where the filename parameter can include a leading path element.
329
330 The file format is exactly the same as that used on the commandline by
331 other operating systems, including the leading path and name of the
332 Rateup NLM.
333
335 The Appendix includes 'copies' of the following files:
336
337 · The NCF files used during MRTG configuration,
338
339 To create copies of these files, simply 'cut and paste' into your
340 favourite 'text editor' and save under their respective names. You
341 should remove the leading space from each line.
342
343 MakeMrtgCfg.NCF
344
345 # MakeMrtgCfg.NCF
346 # Purpose : Create the MRTG Configuration File
347 # Changed : 5/05/2005 New
348 # Located : SYS:MRTG\BIN
349 # Set For :
350 # Params :
351
352 # Edit this file and:
353
354 # Replace ccccc with your device GET SNMP Community Name - If unsure try 'public'.
355 # Replace ddddd with your device IP (n.n.n.n) or domain name.
356
357 perl --noscreen sys:\mrtg\bin\cfgmaker.pl ccccc@ddddd > sys:\mrtg\bin\Mrtg.cfg
358
359 #
360 # End of MakeMrtgCfg.NCF
361
362 RunMrtg.NCF
363
364 # RunMrtg.NCF
365 # Purpose : Run the MRTG Application
366 # Changed : 5/05/2005 New
367 # Located : SYS:MRTG\BIN
368 # Set For :
369 # Params :
370
371 # The paths are as per the examples recommended in "Getting Started".
372
373 perl --noscreen sys:\mrtg\bin\mrtg.pl sys:\mrtg\bin\mrtg.cfg
374
375 #
376 # End of RunMrtg.NCF
377
378 MakeMrtgIndex.NCF
379
380 # MakeMrtgIndex.NCF
381 # Purpose : Create the HTML Index File for MRTG HTML data pages
382 # Changed : 5/05/2005 New
383 # Located : SYS:MRTG\BIN
384 # Set For :
385 # Params :
386
387 # Note: Edit this file and change the redirected output to the location
388 # specified for HtmlDir or WorkDir. The sys:\apache2\htdocs\mrtg\index.html
389 # is based on the examples in "Getting Started".
390
391 perl --noscreen sys:\mrtg\bin\indexmaker.pl sys:\mrtg\bin\Mrtg.cfg > sys:\mrtg\html\index.html
392
393 #
394 # End of MakeMrtgIndex.NCF
395
397 GNU General Public License
398
400 The MRTG for NetWare exists largely through the efforts of Guenter
401 Knauf and feedback from beta testers.
402
404 Norm W..
405
406
407
4082.17.7 2018-07-13 MRTG-NW-GUIDE(1)