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

📄 config.html

📁 主要用于监控网络流量并动态产生可视化结果
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<DT><STRONG><A NAME="item_absolute">absolute</A></STRONG><DD><P>This is for data sources which reset their value when they are read. Thismeans that rateup does not havt to build the difference between this andthe last value read from the data source. The value obtained is stilldivided by the elapsed time between the last two readings, which makes itdifferent from the 'gauge' option. Useful for external data gatherers.<DT><STRONG><A NAME="item_unknaszero">unknaszero</A></STRONG><DD><P>Log unknown data as zero instead of the default behaviour of repeating thelast value seen. Be careful with this, often a flat line in the graph ismuch more obvious than a line at 0.</DL><P>Example:<P><PRE> Options[ezwf]: growright, bits</PRE><P><HR><H2><A NAME="kilo">kilo</A></H2><P>Use this option to change the multiplier value for building prefixes.Defaultvalue is 1000. This tag is for the special case that 1kB = 1024B,1MB = 1024kB and so far.<P>Example:<P><PRE> kilo[ezwf]: 1024</PRE><P><HR><H2><A NAME="kMG">kMG</A></H2><P>Change the default multiplier prefixes (,k,M,G,T,P). In the tag<EM>ShortLegend</EM> define only the basic units. Format: Comma seperated list of prefixed. Twoconsecutive commas or a comma at start or end of the line gives no prefixon this item. Note: If you do not want prefixes, then leave this lineblank.<P>Example: velocity in nm/s (nanometers per second) displayed in nm/h.<P><PRE> ShortLegend[ezwf]: m/min kMG[ezwf]: n,u,m,,k,M,G,T,P options[ezwf]: perhour</PRE><P><HR><H2><A NAME="Colours">Colours</A></H2><P>The <EM>Colours</EM> tag allows you to override the default colour scheme. Note: All 4 of therequired colours must be specified here. The colour name ('Colourx' below)is the legend name displayed, while the RGB value is the real colour usedfor the display, both on the graph and in the html doc.<P>Format is: Colour1#RRGGBB,Colour2#RRGGBB,Colour3#RRGGBB,Colour4#RRGGBB<P>Important: If you use the <EM>dorelpercent</EM> options tag a fifth colour name colour value pair is required:Colour1#RRGGBB,Colour2#RRGGBB,Colour3#RRGGBB,Colour4#RRGGBB,Colour5#RRGGBB<DL><DT><STRONG><A NAME="item_Colour1">Colour1</A></STRONG><DD><P>First variable (normally Input) on default graph<DT><STRONG><A NAME="item_Colour2">Colour2</A></STRONG><DD><P>Second variable (normally Output) on default graph<DT><STRONG><A NAME="item_Colour3">Colour3</A></STRONG><DD><P>Max first variable (input)<DT><STRONG><A NAME="item_Colour4">Colour4</A></STRONG><DD><P>Max second variable (output)<DT><STRONG><A NAME="item_RRGGBB">RRGGBB</A></STRONG><DD><P>2 digit hex values for Red, Green and Blue</DL><P>Example:<P><PRE> Colours[ezwf]: GREEN#00eb0c,BLUE#1000ff,DARK GREEN#006600,VIOLET#ff00ff</PRE><P><HR><H2><A NAME="Background">Background</A></H2><P>With the <EM>Background</EM> tag you can configure the background colour of the generated HTML page<P>Example:<P><PRE> Background[ezwf]: #a0a0a0a</PRE><P><HR><H2><A NAME="YLegend_ShortLegend_Legend_123">YLegend, ShortLegend, Legend[1234]</A></H2><P>The following keywords allow you to override the text displayed for thevarious legends of the graph and in the HTML document<DL><DT><STRONG><A NAME="item_YLegend">YLegend</A></STRONG><DD><P>The Y-axis label of the graph. Note that a text which is too long to fit inthe graph will be silently ignored.<DT><STRONG><A NAME="item_ShortLegend">ShortLegend</A></STRONG><DD><P>The units string (default 'b/s') used for Max, Average and Current<DT><STRONG><A NAME="item_Legend">Legend[1234IO]</A></STRONG><DD><P>The strings for the colour legend</DL><P>Example:<P><PRE>  YLegend[ezwf]: Bits per Second  ShortLegend[ezwf]: b/s  Legend1[ezwf]: Incoming Traffic in Bits per Second  Legend2[ezwf]: Outgoing Traffic in Bits per Second  Legend3[ezwf]: Maximal 5 Minute Incoming Traffic  Legend4[ezwf]: Maximal 5 Minute Outgoing Traffic  LegendI[ezwf]: &amp;nbsp;In:  LegendO[ezwf]: &amp;nbsp;Out:</PRE><P>Note, if <EM>LegendI</EM> or <EM>LegendO</EM> are set to an empty string with<P><PRE> LegendO[ezwf]:</PRE><P>The corresponding line below the graph will not be printed at all.<P><HR><H2><A NAME="Timezone">Timezone</A></H2><P>If you live in an international world, you might want to generate thegraphs in different timezones. This is set in the TZ variable. Undercertain operating systems like Solaris, this will provoke the localtimecall to give the time in the selected timezone ...<P>Example:<P><PRE> Timezone[ezwf]: Japan</PRE><P>The Timezone is the standard Solaris timezone, ie Japan, Hongkong, GMT,GMT+1 etc etc.<P><HR><H2><A NAME="Weekformat">Weekformat</A></H2><P>By default, mrtg (actually rateup) uses the <CODE>strftime(3)</CODE> '%W'option to format week numbers in the monthly graphs. The exact semantics ofthis format option vary between systems. If you find that the week numbersare wrong, and your system's <CODE>strftime(3)</CODE> routine supports it,you can try another format option. The POSIX '%V' option seems tocorrespond to a widely used week numbering convention. The week formatcharacter should be specified as a single letter; either W, V, or U.<P>Example:<P><PRE> Weekformat[ezwf]: V</PRE><P><HR><H1><A NAME="Threshold_Checking">Threshold Checking</A></H1><P>Through its threshold checking functionality mrtg is able to detectthreshold problems for the various targets and can call external scripts tohandle those problems (send email or a page to an administrator). <P>Threshold checking is configured through the following parameters:<P><HR><H2><A NAME="ThreshDir_GLOBAL_">ThreshDir (GLOBAL)</A></H2><P>If you want to be able to detect when a parameter is OK again (back withinthreshold), you must define this directory. Temporary files will be storedhere between runnings to indicate which parameters had threshold problemson the previous running.<P><HR><H2><A NAME="ThreshMinI_PER_TARGET_">ThreshMinI  (PER TARGET)</A></H2><P>This is the minimum acceptable value for the Input (first) parameter. Ifthe parameter falls below this value, the program specified in ThreshProgIwill be run.<P><HR><H2><A NAME="ThreshMaxI_PER_TARGET_">ThreshMaxI (PER TARGET)</A></H2><P>This is the maximum acceptable value for the Input (first) parameter. Ifthe parameter falls above this value, the program specified in ThreshProgIwill be run.<P><HR><H2><A NAME="ThreshDesc_PER_TARGET_">ThreshDesc (PER TARGET)</A></H2><P>Its value will be assigned to the environment variable THRESH_DESC beforeany of the programs mentioned below are called. The programms can use thevalue of this variable to produce more userfriendly output.<P><HR><H2><A NAME="ThreshProgI_PER_TARGET_">ThreshProgI  (PER TARGET)</A></H2><P>This defines a program to be run if ThreshMinI or ThreshMaxI is broken. (Itcurrently passes 3 arguments: the <CODE>$router</CODE> variable, thethreshold value broken, and the current parameter value. This can bechanged as required.)<P><HR><H2><A NAME="ThreshProgOKI_PER_TARGET_">ThreshProgOKI  (PER TARGET)</A></H2><P>This defines a program to be run if the parameter is currently OK (based onThreshMinI and ThreshMaxI), but wasn't OK on the previous running -- basedon the files found in ThreshDir.<P><HR><H2><A NAME="ThreshMinO_ThreshMaxO_ThreshPr">ThreshMinO, ThreshMaxO, ThreshProgO, and ThreshProgOKO</A></H2><P>They work the same as their <CODE>*I</CODE> counterparts, except on theOutput (second) parameter.<P><HR><H1><A NAME="Two_very_special_Target_names">Two very special Target names</A></H1><P>To save yourself some typing you can define a target called '^'. The textof every Keyword you define for this target will be PREPENDED to thecorresponding Keyword of all the targets defined below this line. The samegoes for a Target called '$' but its text will be APPENDED.<P>Note that a space is inserted between the prepended text and the Keywordvalue, as well as between the Keyword value and the appended text. Thisworks well for text-valued Keywords, but is not very useful for otherKeywords. See the ``default'' target description below.<P>The example will make mrtg use a common header and a common contact personin all the pages generated from targets defined later in this file.<P>Example:<P><PRE> PageTop[^]: &lt;H1&gt;NoWhere Unis Traffic Stats&lt;/H1&gt;&lt;HR&gt; PageTop[$]: Contact Peter Norton if you have any questions&lt;HR&gt;</PRE><P>To remove the prepend/append value, specify an empty value, e.g.:<P><PRE> PageTop[^]: PageTop[$]:</PRE><P><HR><H1><A NAME="And_one_more_very_special_Target">And one more very special Target name</A></H1><P>The target name '_' specifies a default value for that Keyword. In theabsence of explicit Keyword value, the prepended and the appended keywordvalue, the default value will be used.<P>Example:<P><PRE> YSize[_]: 150 Options[_]: growright,bits,nopercent WithPeak[_]: ymw Suppress[_]: y MaxBytes[_]: 1250000</PRE><P>To remove the default value and return to the 'factory default', specify anempty value, e.g.:<P><PRE> YLegend[_]:</PRE><P>There can be several instances of setting the default/prepend/append valuesin the configuration file. The later setting replaces the previous one forthe rest of the configuration file. The default/prepend/append values usedfor a given keyword/target pair are the ones that were in effect at thepoint in the configuration file where the target was mentioned for thefirst time.<P>Example:<P><PRE> MaxBytes[_]: 1250000 Target[myrouter.somplace.edu.2]: 2:public@myrouter.somplace.edu MaxBytes[_]: 8000 Title[myrouter.somplace.edu.2]: Traffic Analysis for myrouter.somplace.edu IF 2</PRE><P>The default <EM>MaxBytes</EM> for the target myrouter.somplace.edu.2 in the above example will be1250000, which was in effect where the target name myrouter.somplace.edu.2first appeared in the config file.<P><HR><H1><A NAME="NoSpaceChar">NoSpaceChar</A></H1><P>With PREPEND and APPEND there is normally a space inserted between thelocal value and the PRE- or APPEND value. Sometimes this is not desirable.You can use the <EM>NoSpaceChar</EM> config option to define a character which can be mentioned at the end of a$ or ^ definition in order to supress the space.<P>Example:<P><PRE>  NoSpaceChar: ~  Target[^]: 1.3.6.1.4.1.482.50.2.4.20.0&amp;1.3.6.1.4.1.482.50.2.4.21.0:get@~  Target[a]: a.tolna.net  Target[b]: b.tolna.net  Target[c]: c.tolna.net  Target[d]: d.tolna.net</PRE><P><HR><H1><A NAME="Some_example_mrtg_cfg_files">Some example mrtg.cfg files</A></H1><P><HR><H2><A NAME="Minimal_mrtg_cfg">Minimal mrtg.cfg</A></H2><P><PRE> WorkDir: /usr/tardis/pub/www/stats/mrtg Target[r1]: 2:public@myrouter.somplace.edu MaxBytes[r1]: 8000 Title[r1]: Traffic Analysis ISDN PageTop[r1]: &lt;H1&gt;Stats for our ISDN Line&lt;/H1&gt;</PRE><P><HR><H2><A NAME="Cfg_for_several_Routers_">Cfg for several Routers.</A></H2><P><PRE> WorkDir: /usr/tardis/pub/www/stats/mrtg Title[^]: Traffic Analysis for PageTop[^]: &lt;H1&gt;Stats for PageTop[$]: Contact The Chief if you notice anybody&lt;HR&gt; MaxBytes[_]: 8000 Options[_]: growright</PRE><P><PRE> Title[isdn]: our ISDN Line PageTop[isdn]: our ISDN Line&lt;/H1&gt; Target[isdn]: 2:public@router.somplace.edu</PRE><P><PRE> Title[backb]: our Campus Backbone PageTop[backb]: our Campus Backbone&lt;/H1&gt; Target[backb]: 1:public@router.somplace.edu MaxBytes[backb]: 1250000</PRE><P><PRE> # the following line removes the default prepend value # defined above</PRE><P><PRE> Title[^]:</PRE><P><PRE> Title[isdn2]: Traffic for the Backup ISDN Line PageTop[isdn2]: our ISDN Line&lt;/H1&gt; Target[isdn2]: 3:public@router.somplace.edu</PRE><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>  <TR>    <TD WIDTH=63><A ALT="MRTG"    HREF="http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html"><IMG    BORDER=0 SRC="mrtg-l.gif"></A></TD>    <TD WIDTH=25><A ALT=""    HREF="http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html"><IMG    BORDER=0 SRC="mrtg-m.gif"></A></TD>    <TD WIDTH=388><A ALT=""    HREF="http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html"><IMG    BORDER=0 SRC="mrtg-r.gif"></A></TD>  </TR></TABLE><SPACER TYPE=VERTICAL SIZE=4><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>  <TR VALIGN=top>  <TD WIDTH=388 ALIGN=LEFT><FONT FACE="Arial,Helvetica" SIZE=2>  <A HREF="http://ee-staff.ethz.ch/~oetiker/">Tobias Oetiker</A>  <A HREF="mailto:oetiker@ee.ethz.ch">&lt;oetiker@ee.ethz.ch&gt;</A>   and&nbsp;<A HREF="http://www.bungi.com">Dave&nbsp;Rand</A>&nbsp;<A HREF="mailto:dlr@bungi.com">&lt;dlr@bungi.com&gt;</A></FONT>  </TD></TR></TABLE></BODY></HTML>

⌨️ 快捷键说明

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