Viewing Graphs
Once you've generated some graphs, you will want to look at them to see the results. To make it easier to view the graphs, MRTG comes with an indexmaker script that generates HTML index pages. Here's how to run indexmaker for a typical set of graphs:
[root][linuxserver] ~/mrtg-2.10.15> indexmaker --title "Cisco to Internet" \
--filter name=~'10.0.0.1' --output /mrtg/images/cisco.html /mrtg/run/mrtg.cfgThis command creates one index page with the five-minute average graph for each target you've specified in your mrtg.cfg file. Keep in mind that the target is the interface from which you're gathering data. If you have four targets for your router, there will be four graphs in the index file, all pointing to the daily, weekly, monthly, and yearly summary graphs for that target. The —title option tells indexmaker what title to use for the index file. —filter name=~10.0.0.1 allows you to select some of the targets in the mrtg.cfg file by using a regular expression: we told indexmaker to find all targets that include the string 10.0.0.1. The —output option is the name of the index file. The final argument on the command line is the full path to the configuration file. Table 12-1 gives a synopsis of these options as well as some other useful options to indexmaker.
Table 12-1. Command-line options to indexmaker
|
Option |
Description |
|---|---|
|
—title |
Specify a title for the HTML page. |
|
—filter |
Specify the regular expression that will be used to find a specific target from the mrtg.cfg ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access