v2.15 MRTG Directives Understood by routers2.cgi ------------------------------------------ The following is a full list of all the MRTG configuration file directives that routers2.cgi will understand. Anything not here you should assume will be ignored by the script. In the majority of cases, the prepend, append and default targets are understood and acted upon. The exception is for some of the routers.cgi specific directives listed later. IMPORTANT NOTE: When placing directives in the MRTG .cfg file, ALL of the directives for a particular Target MUST come AFTER the Target[]: definition. Any directives that come before the Target[]: line will usually be IGNORED. Key: [+] : Can also be used with the 'routers.cgi*' prefix as well. [-] : Can be left blank when used with 'routers.cgi*' prefix [*] : Required [=] : Can also be set in routers.conf [!] : Deprecated - use other options instead [?] : Experimental [G] : Can be used with userdefined Graph targets (see 'routers.cgi*Graph') if given routers.cgi* prefix Global Directives ----------------- Include: filename WorkDir: /path [=] Interval: number LibAdd: /path Application-specific global directives -------------------------------------- routers.cgi*Ignore: yes Do not process this file. routers.cgi*Desc: router description Set the long description for this device routers.cgi*ShortDesc: router name for menu Set the short menu name for this device routers.cgi*Icon: iconfilefordevice.gif Set the icon file (within the iconurl path) for this device routers.cgi*Extension: "Menu desc" /url/of/extension.cgi optionalicon.gif optionalwindowname optional-security-level insecure noopts Define a CGI extension script for this device. See the HOWTO. The windowname can be '_top' if you want to completely exit routers.cgi However you should usually not specify one Security level defaults to 0. Use 'insecure' keyword to enable passing of SNMP community string to plugin. Use 'noopts' to not pass any extra parameters to the plugin. routers.cgi*ClearExtensions: yes Undefine all previously defined device-level extensions routers.cgi*RoutingTable: no [=] Disable routingtable extensions on a per-device basis routers.cgi*Redirect: url [?] For this Device, obtain the pages from a different routers2.cgi. This can be on a different server, allowing you to place 'stub' files on your main server, and place some of the MRTG instances on a separate MRTG server. eg: routers.cgi*Redirect: http://otherserver.foo.com/cgi-bin/routers2.cgi Per-Target Directives --------------------- Target[targetname]: [*] Title[targetname]: [*][=] Pagetop[targetname]: (if enabled in the routers.conf) [*][=] PageFoot[targetname]: (if enabled in the routers.conf) [=] Pagetop and Pagefoot can now contain symbols %DEVICE% and %TARGET% Background[targetname]: [+][=] Options[targetname]: integer noo noi bits bytes perminute perhour nopercent [+] dorelpercent Note that nopercent also implies routers.cgi*InCompact[]: no Also, dorelpercent implies noo and nopercent TimeZone[targetname]: SetEnv[targetname]: MRTG_INT_DESCR="" [=] MRTG_INT_IP="" YLegend[atrgetname]: [+][-][G] LegendI[targetname]: [+][-] LegendO[targetname]: [+][-] Legend1[targetname]: [+][-][G] Legend2[targetname]: [+][-][G] Legend3[targetname]: [+][-] Legend4[targetname]: [+][-] ShortLegend[targetname]: [+][-][G] MaxBytes[targetname]: [*][+] AbsMax[targetname]: [+] UnScaled[targetname]: [+][-][=] routers.cgi defaults to 'dwmy' for Interface targets, and to '' otherwise Directory[targetname]: Colours[targetname]: #ffffff, #ffffff, #ffffff, #ffffff [+][=] The Colours directive MUST have at least 4 parameters of the form #ffffff where ffffff is a 6-hex digit colour number. Factor[targetname]: [+] WithPeak[targetname]: wdmy [+][=] When used with the routers.cgi* prefix, you can also use d (daily) and the magic word 'none' to mean none (you cannot leave it blank for MRTG) Application-specific Per-target directives ------------------------------------------ These will override any previous conflicting definitions without the 'routers.cgi*' prefix. Note that some of these will imply others, particularly Options and Mode. routers.cgi*Options[target]: interface [!] ignore noo noi scaled [=][!] nomax [=] nototal noabsmax nopercentile nopercent average [G only] total [G only] fixunit available [not G] noavailable reverse aspercent rigid c2fi c2fo Set various graph options for this target Instead of 'interface', use the Mode option, and use routers.cgi*UnScaled with the 'none' option instead of 'scaled'. fixunit removes the kMG option - useful if m{unit} makes no sense. available shows the %age data availability at the bottom of the graph nototal/nopercentile remove the Total and 95thPercentile calculations nopercent suppresses the calculation of the percentages average and total add an average/total line to a userdefined graph reverse shows (maxbytes-value) on graph instead of value aspercent shows ((value/maxbytes)x100%) on graph instead of value nomax/noabsmax suppress the max/absmax lines on the graph rigid makes the set y-axis rigid (either to MaxBytes or UpperLimit) c2fi/c2fo perform a centigrade to farenheit conversion on the in/out data values. IE, value * 1.8 + 32. routers.cgi*InMenu[target]: yes no Should this target appear in the Targets menu? It is still accessible via a bookmarked URL, though. routers.cgi*InSummary[target]: yes no Include this graph in the Summary page? routers.cgi*InCompact[target]: yes no Include this graph in the Compact Summary page? routers.cgi*InOut[target]: yes no Include this target in the Incoming/Outgoing graphs? routers.cgi*Ignore[target]: yes Completely ignore this target (unlike InMenu=no, this is totally ignored) routers.cgi*Desc[target]: long description for target (replaces Title) [=][G] routers.cgi*ShortDesc[target]: short description of target (replaces MRTG_INT_DESCR) [=][G] Set short menu description of target routers.cgi*Mode[target]: interface cpu mem generic ping Choose set of defaults for display options routers.cgi*Icon[target]: iconfilefortarget.gif [=][G] Set icon for use in Targets menu routers.cgi*TotalLegend[target]: like ShortLegend, but the units for the 'Total' count at the bottom of the graph. routers.cgi*MBLegend[target]: legend for Max Bandwidth line [G] routers.cgi*AMLegend[target]: legend for Absolute Max line [G] routers.cgi*LegendTI[graphtarget]: legend for Total In line on userdefined [G] routers.cgi*LegendTO[graphtarget]: legend for Total Out line on userdefined [G] routers.cgi*LegendAI[graphtarget]: legend for Average In line on userdefined [G] routers.cgi*LegendAO[graphtarget]: legend for Average Out line on userdefined [G] routers.cgi*Archive[target]: daily 99 monthly 99 Set archiving expiry times for daily and monthly RRD archives. Use decimal numbers for 99. If no 'daily' or 'monthly', then daily assumed Can also use 'no' to mean 'daily 0 monthly 0' routers.cgi*GraphStyle[target]: stack range normal mirror [G] stack: graph areas are stacked range: a floating bar is created from In -> Out mirror: the Out line(s) are placed below the x-axis, the In lines above Choose different ways to show the In/Out lines on the graph. With range, make sure Out