⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 config.html

📁 主要用于监控网络流量并动态产生可视化结果
💻 HTML
📖 第 1 页 / 共 3 页
字号:
where the meaning of each parameter is as follows:<DL><DT><STRONG><A NAME="item_port">port</A></STRONG><DD><P>the UDP port under which to contact the SNMP agent (default: 161)<DT><STRONG><A NAME="item_timeout">timeout</A></STRONG><DD><P>initial timeout for SNMP queries, in seconds (default: 2.0)<DT><STRONG><A NAME="item_retries">retries</A></STRONG><DD><P>number of times a timed-out request will be retried (default: 5)<DT><STRONG><A NAME="item_backoff">backoff</A></STRONG><DD><P>factor by which the timeout is multiplied on every retry (default: 1.0).</DL><P>A value that equals the default value can be omitted. Trailing colons canbe omitted, too.<P>Example:<P><PRE>  Target[ezci]: 1:public@ezci-ether.ethz.ch:9161::4</PRE><P>This would refer to the input/output octet counters for the interface with <EM>ifIndex 1</EM> on <EM>ezci-ether.ethz.ch</EM>, as known by the SNMP agent listening on UDP port 9161. The standardinitial timeout (2.0 seconds) is used, but the number of retries is set tofour. The backoff value is the default.<LI><P>if you want to monitor something which does not provide data via snmp youcan use some external program to do the data gathering.<P>The external command must return 4 lines of output:<DL><DT><STRONG><A NAME="item_Line">Line 1</A></STRONG><DD><P>current state of the first variable, normally 'incoming bytes count'<DT><STRONG>Line 2</STRONG><DD><P>current state of the second variable, normally 'outgoing bytes count'   <DT><STRONG>Line 3</STRONG><DD><P>string (in any human readable format), telling the uptime of the target.<DT><STRONG>Line 4</STRONG><DD><P>string, telling the name of the target. </DL><P>Depending on the type of data your script returns you might want to use the'gauge' or 'absolute' arguments for the <EM>Options</EM> keyword.<P>Example:<P><PRE> Target[ezwf]: `/usr/local/bin/df2mrtg /dev/dsk/c0t2d0s0`</PRE><P>Note the use of the backticks (`), not apostrophes (') around the command.<LI><P>You can also use several statements in a mathematical expression. Thiscould be used to aggregate both B channels in an ISDN connection ormultiple T1s that are aggregated into a single channel for greaterbandwidth. Note the whitespace arround the target definitions.<P>Example:<P><PRE> Target[ezwf]: 2:public@wellfleetA + 1:public@wellfleetA              * 4:public@ciscoF</PRE></UL><P><HR><H2><A NAME="RouterUptime">RouterUptime</A></H2><P>In cases where you calculate the used bandwidth from several interfaces younormaly don't get the router uptime and router name displayed on the webpage.<P>If these interfaces are on the same router and the uptime and name shouldbe displayed nevertheless you have to specify its community and addressagain with the <EM>RouterUptime</EM> keyword.<P>Example:<P><PRE> Target[kacisco.comp.edu]: 1:public@194.64.66.250 + 2:public@194.64.66.250 RouterUptime[kacisco.comp.edu]: public@194.64.66.250</PRE><P><HR><H2><A NAME="MaxBytes">MaxBytes</A></H2><P>The maximum value either of the two variables monitored are allowed toreach. For monitoring router traffic this is normally specified in bytesper second this interface port can carry.<P>If a number higher than <EM>MaxBytes</EM> is returned, it is ignored. Also read the section on <EM>AbsMax</EM> for further info. The <EM>MaxBytes</EM> value is also used in calculating the Y range for unscaled graphs (see thesection on <EM>Unscaled</EM>).<P>Since most links are rated in bits per second, you need to divide theirmaximum bandwidth (in bits) by eight (8) in order to get bytes per second.This is very important to make your unscaled graphs display realisticinformation. T1 = 193000, 56K = 7000, Ethernet = 1250000. The <EM>MaxBytes</EM>value will be used by mrtg to decide whether it got a valid response fromthe router.<P>If you need two different MaxBytes values for the two monitored variables,you can use MaxBytes1 and MaxBytes2 instead of MaxBytes.<P>Example:<P><PRE> MaxBytes[ezwf]: 1250000</PRE><P><HR><H2><A NAME="MaxBytes1">MaxBytes1</A></H2><P>Same as MaxBytes, for variable 1.<P><HR><H2><A NAME="MaxBytes2">MaxBytes2</A></H2><P>Same as MaxBytes, for variable 2.<P><HR><H2><A NAME="Title">Title</A></H2><P>Title for the HTML page which gets generated for the graph.<P>Example:<P><PRE> Title[ezwf]: Traffic Analysis for Our Nice Company</PRE><P><HR><H2><A NAME="PageTop">PageTop</A></H2><P>Things to add to the top of the generated HTML page. Note that you can haveseveral lines of text as long as the first column is empty.<P>Note that the continuation lines will all end up on the same line in thehtml page. If you want linebreaks in the generated html use the '\n'sequence.<P>Example:<P><PRE> PageTop[ezwf]: &lt;H1&gt;Traffic Analysis for ETZ C95.1&lt;/H1&gt;   Our Campus Backbone runs over an FDDI line\n   with a maximum transfer rate of 12.5 megabytes per   Second.</PRE><P><HR><H1><A NAME="Optional_Target_Configuration_Ta">Optional Target Configuration Tags</A></H1><P><HR><H2><A NAME="AddHead">AddHead</A></H2><P>Use this tag like the <EM>PageTop</EM> header, but its contents will be added between &lt;/TITLE&gt; and&lt;/HEAD&gt;.<P>Example:<P><PRE> AddHead[ezwf]: &lt;link rev=&quot;made&quot; href=&quot;<A HREF="mailto:mrtg@blabla.edu&quot">mailto:mrtg@blabla.edu&quot</A>;&gt;</PRE><P><HR><H2><A NAME="AbsMax">AbsMax</A></H2><P>If you are monitoring a link which can handle more traffic than the <EM>MaxBytes</EM> value. Eg, a line which uses compression or some frame relay link, you canuse the <EM>AbsMax</EM> keyword to give the absolute maximum value ever to be reached. We need toknow this in order to sort out unrealistic values returned by the routers.If you do not set <EM>AbsMax</EM>, rateup will ignore values higher than <EM>MaxBytes</EM>.<P>Example:<P><PRE> AbsMax[ezwf]: 2500000</PRE><P><HR><H2><A NAME="Unscaled">Unscaled</A></H2><P>By default each graph is scaled vertically to make the actual data visibleeven when it is much lower than<EM>MaxBytes</EM>. With the <EM>Unscaled</EM> variable you can suppress this. It's argument is a string, containing oneletter for each graph you don't want to be scaled: d=day w=week m=monthy=year. In the example scaling for the yearly and the monthly graph aresuppressed.<P>Example:<P><PRE> Unscaled[ezwf]: ym</PRE><P><HR><H2><A NAME="WithPeak">WithPeak</A></H2><P>By default the graphs only contain the average values of the monitoredvariables - normally the transfer rates for incoming and outgoing traffic.The following option instructs mrtg to display the peak 5 minute values inthe [w]eekly, [m]onthly and [y]early graph. In the example we define themonthly and the yearly graph to contain peak as well as average values.<P>Examples:<P><PRE> WithPeak[ezwf]: ym</PRE><P><HR><H2><A NAME="Suppress">Suppress</A></H2><P>By default mrtg produces 4 graphs. With this option you can suppress thegeneration of selected graphs. The option value syntax is analogous to theabove two options. In this example we suppress the yearly graph as it isquite empty in the beginning.<P>Example:<P><PRE> Suppress[ezwf]: y</PRE><P><HR><H2><A NAME="Directory">Directory</A></H2><P>By default, mrtg puts all the files that it generates for each target (theGIFs, the HTML page, the log file, etc.) in <EM>WorkDir</EM>.<P>If the <EM>Directory</EM> option is specified, the files are instead put into a directory under <EM>WorkDir</EM>. (For example the <EM>Directory</EM>option below would cause all the files for a target ezwf to be put intodirectory /usr/tardis/pub/www/stats/mrtg/ezwf/ .)<P>The directory must already exist; mrtg will not create it.<P>Example:<P><PRE> WorkDir: /usr/tardis/pub/www/stats/mrtg Directory[ezwf]: ezwf</PRE><P><HR><H2><A NAME="XSize_and_YSize">XSize and YSize</A></H2><P>By default mrtgs graphs are 100 by 400 pixels wide (plus some more for thelabels. In the example we get almost square graphs ...<P>Note: XSize must be between 20 and 600; YSize must be larger than 20<P>Example:<P><PRE> XSize[ezwf]: 300 YSize[ezwf]: 300</PRE><P><HR><H2><A NAME="XZoom_and_YZoom">XZoom and YZoom</A></H2><P>If you want your graphs to have larger pixels, you can ``Zoom'' them.<P>Example:<P><PRE> XZoom[ezwf]: 2.0 YZoom[ezwf]: 2.0</PRE><P><HR><H2><A NAME="XScale_and_YScale">XScale and YScale</A></H2><P>If you want your graphs to be actually scaled use <EM>XScale</EM>and <EM>YScale</EM>. (Beware while this works, the results look ugly (to be frank) so ifsomeone wants to fix this: patches are welcome.<P>Example:<P><PRE> XScale[ezwf]: 1.5 YScale[ezwf]: 1.5</PRE><P><HR><H2><A NAME="YTics_and_YTicsFactor">YTics and YTicsFactor</A></H2><P>If you want to show more than 4 lines per graph, use YTics. If you want toscale the value used for the YLegend of these tics, use YTicsFactor. Thedefault value for YTics is 4 and the default value for YTicsFactor is 1.0 .<P>Example:<P><PRE>  Suppose you get values ranging from 0 to 700.  You want to plot 7 lines and want to show   0, 1, 2, 3, 4, 5, 6, 7 instead of 0, 100, 200,  300, 400, 500, 600, 700.  You should write then:</PRE><P><PRE>  YTics[ezwf]: 7  YTicsFactor[ezwf]: 0.01</PRE><P><HR><H2><A NAME="Step">Step</A></H2><P>Change the default step from 5 * 60 seconds to something else (I have nottested this well ...)<P>Example:<P><PRE> Step[ezwf]: 60</PRE><P><HR><H2><A NAME="Options">Options</A></H2><P>The <EM>Options</EM> Keyword allows you to set some boolean switches:<DL><DT><STRONG><A NAME="item_growright">growright</A></STRONG><DD><P>The graph grows to the left by default. This option flips the direction ofgrowth causing the current time to be at the right edge of the graph andthe history values to the left of it.<DT><STRONG><A NAME="item_bits">bits</A></STRONG><DD><P>All the monitored variable values are multiplied by 8 (i.e. shown in bitsinstead of bytes) ... looks much more impressive :-) It also affects the'factory default' labeling and units for the given target.<DT><STRONG><A NAME="item_perminute">perminute</A></STRONG><DD><P>All the monitored variable values are multiplied by 60 (i.e. shown in unitsper minute instead of units per second) in case of small values moreaccurate graphs are displayed. It also affects the 'factory default'labeling and units for the given target.<DT><STRONG><A NAME="item_perhour">perhour</A></STRONG><DD><P>All the monitored variable values are multiplied by 3600 (i.e. shown inunits per hour instead of units per second) in case of small values moreaccurate graphs are displayed. It also affects the 'factory default'labeling and units for the given target.<DT><STRONG><A NAME="item_noinfo">noinfo</A></STRONG><DD><P>Suppress the information about uptime and device name in the generatedwebpage.<DT><STRONG><A NAME="item_nopercent">nopercent</A></STRONG><DD><P>Don't print usage percentages<DT><STRONG><A NAME="item_transparent">transparent</A></STRONG><DD><P>make the background of the generated gifs transparent ...<DT><STRONG><A NAME="item_integer">integer</A></STRONG><DD><P>Print summary lines below graph as integers without comma<DT><STRONG><A NAME="item_dorelpercent">dorelpercent</A></STRONG><DD><P>The relative percentage of IN-traffic to OUT-traffic is calculated anddisplayed in the graph as an additional line. Note: Only a fixed scale isavailable (from 0 to 100%). Therefore for IN-traffic greater thanOUT-traffic also 100% is displayed. If you suspect that your IN-traffic isnot always less than or equal to your OUT-traffic you are urged to not usethis options. Note: If you use this option in combination with the <EM>Colours</EM>options, a fifth colour-name colour-value pair is required there.<DT><STRONG><A NAME="item_gauge">gauge</A></STRONG><DD><P>Treat the values gathered from target as absolute and not as everincrementing counters. This would be useful to monitor things like diskspace, processor load, temperature, and the like ...<P>In the absence of 'gauge' and 'absolute' options, MRTG treats variable as acounter and calculates the difference between the current and the previousvalue and divides that by the elapsed time between the last two readings toget the value to be plotted.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -