I'm duplicating an existing working MRTG setup. I set up the source machine a few years ago. Source and target are both CentOS 6.10, running MRTG 2.16.2.
Copying the commands run on the source machine which are stored in their files:
/usr/bin/cfgmaker --no-down --subdirs=HOSTNAME -o dell-x1018p.cfg -ifref=name -ifdesc=alias --global "WorkDir: /var/www/mrtg/" --global "RunAsDaemon: no" --global "Options[_]: pngdate" --global "EnableIPv6: no" public@dell-x1018p
/usr/bin/indexmaker --output /var/www/mrtg/dell-x1018p.html --title Dell-X1018p --columns 1 --width 800 --height 160 --show day /etc/mrtg/dell-x1018p.cfg
This generates very pretty 800 pixel wide graphs. Properly scaled graph
When I use the same syntax on the target machine:
/usr/bin/cfgmaker --no-down --subdirs=HOSTNAME -o dell-x1018.cfg -ifref=name -ifdesc=alias --global "WorkDir: /var/www/mrtg/" --global "RunAsDaemon: no" --global "Options[_]: pngdate" --global "EnableIPv6: no" public@dell-x1018
/usr/bin/indexmaker --output /var/www/mrtg/dell-x1018.html --title "Dell X1018 (downstairs switch)" --columns 1 --width 800 --height 160 --show day /etc/mrtg/dell-x1018.cfg
This generates really ugly 500 pixel wide graphs that are scaled up to 800x160
I must have done something else when I set up the source machine years ago, but looking at the files I see no difference. What am I missing?
It looks like you're running MRTG in Native mode (IE no RRDTool).
You should add global settings like:
XSize[_]: 800
Ysize[_]: 100
to the start of your master CFG file (before the 'Include' lines). This will set the default graph size to 800x100 rather than the smaller default (note that this is the size of the graph, not the image, which includes a legend space as well).
You should consider installing RRDTool with LogFormat: RRD
and using a graph-on-demand frontend instead like Routers2 as this gives more features and a smaller load on your system.