Blame contrib/mrtgmk/doc/readme.1st

Packit 667938
"mrtgmk" by Iulian Radu (iulian_r@starnets.ro) [v2.0]
Packit 667938
Packit 667938
"mrtgmk" is giftware. It is my contribution to mrtg package.
Packit 667938
Packit 667938
"mrtgmk" is a program that scan a .cfg file and generate a mrtg.cfg
Packit 667938
style file + a .html file with links to the .html files generated
Packit 667938
by mrtg. 
Packit 667938
Packit 667938
You can use the sources for your inspiration, can change them, BUT
Packit 667938
you are not allowed to sell them.
Packit 667938
Packit 667938
Cfg file structure:
Packit 667938
-------------------
Packit 667938
The .cfg file can contain any of the next row types. n meens any
Packit 667938
integer positive (>0):
Packit 667938
Packit 667938
0 COMMENT		- mark a block of rows as a comment, /**/ c like :)
Packit 667938
0 ENDCOMMENT
Packit 667938
Packit 667938
0 XDEBUG on|off		- print/don't print the line readed and executed from 
Packit 667938
			  cfgfile
Packit 667938
Packit 667938
0 INCLUDE cfgfile	- execute de commands from the cfgfile
Packit 667938
Packit 667938
0 DEFHOST hostname fcfgname port	- define a name 'hostname' for the pair
Packit 667938
			  'fcfgname port'. 'fcfgname' is the name of a file
Packit 667938
			  precedently generated by cfgmaker. The resolved
Packit 667938
			  name for a defined host can be get from HOST_hostname
Packit 667938
			  alias when CHECK4ALIAS is on.
Packit 667938
Packit 667938
0 MRTG.CFG cfgpathdst cfgpathsrc	- define the name of a generated mrtg.cfg
Packit 667938
			  (cfgpathdst) and the name of a source mrtg.cfg. If
Packit 667938
			  the two names are the same, then all the new entries
Packit 667938
			  in 'cfgpathdst' will be appended, else will be created
Packit 667938
			  a new mrtg.cfg file with the initial contains took
Packit 667938
			  from 'cfgpathsrc'
Packit 667938
0 HTMLFILE filepath	- where will be write the html code
Packit 667938
Packit 667938
0 HTMLCODE code inserted in html	- insert code in the generated html file;
Packit 667938
					  not 
nor

added

Packit 667938
0 HTMLLINK link text	- insert a link in the html page, making no identation;
Packit 667938
			  not 
nor

added

Packit 667938
0 LINK2DH host text	- insert a link in the html page, making no identation;
Packit 667938
			  not 
nor

added

Packit 667938
			  
Packit 667938
0 MRTGTEXT text inserted in mrtg.cfg	- insert text in the generated mrtg.cfg
Packit 667938
Packit 667938
0 CFGDIR cfg_path	- append cfg_path in the front of .cfg files generated
Packit 667938
			  by cfgmaker
Packit 667938
0 NOCFGDIR 		- not any more cfg_path used
Packit 667938
Packit 667938
0 TITLE txt		- text used between TITLE tags
Packit 667938
Packit 667938
0 BODY body arguments	- define the arguments inserted with BODY tag in the
Packit 667938
			  html code
Packit 667938
0 NOBODY		- erase all arguments for BODY tag
Packit 667938
Packit 667938
0 BASE url		- append this url in front of all references at html
Packit 667938
			  pages and gifs
Packit 667938
0 NOBASE		- use what the user has been wrote in .cfg file
Packit 667938
Packit 667938
0 EXEC cmd		- exec a command in shell
Packit 667938
Packit 667938
0 GIFD link host	- day gif
Packit 667938
0 GIFW link host	- week gif
Packit 667938
0 GIFM link host	- month gif
Packit 667938
0 GIFY link host	- year gif
Packit 667938
    - 0 GIFx link host  -> 
Packit 667938
    - 0 GIFx # host     -> 
Packit 667938
    - 0 GIFx link #     -> 
Packit 667938
    - 0 GIFx # #        -> illegal
Packit 667938
			- host-x.gif means that it is searched in defined 
Packit 667938
			  hosts list for the name cfgmaker assign to that host 
Packit 667938
			  and append the right extension (e.g. -day.gif) to it
Packit 667938
Packit 667938
0 ALIAS alias_name alias_body		- define an alias named alias_name and
Packit 667938
					  that will be used as %alias_name% and
Packit 667938
					  CHECK4ALIAS yes
Packit 667938
0 DELALIAS alias_name	- erase the alias :]
Packit 667938
0 CHECK4ALIAS yes|no	- if yes, then all input string will be checked for
Packit 667938
			 aliases. An alias is a name between %s (%alias_name% :)
Packit 667938
Packit 667938
0 MSG msg		- display the message msg on screen
Packit 667938
Packit 667938
0 MKLINK dir host path	- create a directory 'dir' that contain links through
Packit 667938
			  a host page, located in path. If exist old links,
Packit 667938
			  theses will be erased
Packit 667938
Packit 667938
			- create a htmlfile with day, week, month or year
Packit 667938
			  gifs and links through appropiate html file.
Packit 667938
			  Theses commandes MUST be done before any 0 DEFHOST
Packit 667938
			  commands relative to host from fcfg.
Packit 667938
0 MKD fcfg htmlfilename	
Packit 667938
0 MKW fcfg htmlfilename
Packit 667938
0 MKM fcfg htmlfilename
Packit 667938
0 MKY fcfg htmlfilename
Packit 667938
Packit 667938
0 CHNGTRGNAME yes|no	- change (or not) the name of the target html files
Packit 667938
			if change, then the name will be the defhost declared
Packit 667938
			name, otherwise will be the name declared in .cfg file
Packit 667938
			by cfgmaker
Packit 667938
Packit 667938
0 CONVIP2NAME mrtg_out_path/	- change the name of the already existent files 
Packit 667938
			from an ip style (somename.x where x is the snmp index)
Packit 667938
			into a defhost style
Packit 667938
			- 0 CHNGTRGNAME yes is required
Packit 667938
Packit 667938
0 CONVNAME2IP mrtg_out_path/	- change the name of the already existent files 
Packit 667938
			from a defhost style into ip style (somename.x where x 
Packit 667938
			is the snmp index)
Packit 667938
			- 0 CHNGTRGNAME no is required
Packit 667938
Packit 667938
			- mrtg_out_path must be the path where mrtg create
Packit 667938
			the htmls, gifs and logs files and must end with a
Packit 667938
			slash ('/')
Packit 667938
			- must to be present before the definitions of the
Packit 667938
			hosts for with I intend to change the file name;
Packit 667938
			once switched to this action, exist not any way
Packit 667938
			to fall back
Packit 667938
Packit 667938
n HTMLCODE html code	- insert code in the html page, making identation;
Packit 667938
			  not 
nor

added but surrounded by

  • Packit 667938
    n HTMLLINK link text	- insert a link in the html page, making identation;
    Packit 667938
    			  not 
    nor

    added but surrounded by

  • Packit 667938
    n LINK2DH host text	- insert a link in the html page, making identation;
    Packit 667938
    			  not 
    nor

    added but surrounded by

  • Packit 667938
    n DATA host text	- insert a link through a page genetrated by mrtg, 
    Packit 667938
    			  making identation; surrounded by 
  • Packit 667938
    Packit 667938
    # or \n			- treated as a comment
    Packit 667938
    Packit 667938
    If you expand the code, please notify me.
    Packit 667938
    Packit 667938
    "mkm" call the gcc to produce the exec "mrtgmk" from mrtgmk.c .
    Packit 667938
    "smrtgmk" is an example of calling "mrtgmk".
    Packit 667938
    Packit 667938
    Iulian Radu (iulian_r@starnets.ro).
    Packit 667938
    28th September 1999 12:00pm Romanian time