# [global] target # This target is mandatory # The directives of this target are: # rrdtool = /path/to/rrdtool - full path to rrdtool # rrddir = /path/to/rrddir - full path to a writeable dir, where # rrd files and logs will be created # graphdir = /path/to/public_html - full path to a writeable dir, # where png and html will be created # template = /path/to/template_dir - full path to a directory # containing template files # imgformat = the image format. You may choose: # PNG - Portable Network Graphics # GIF - Graphics Interchange Format # iGIF - Interlaced GIF # GD - Boutell GD # Defaults: You can define default configurations in the global # target, but, for this to work, it must be the first target always. # If [global] is after another target, default configurations # will not work as expected. [global] rrdtool = %%PREFIX%%/bin/rrdtool rrddir = %%PREFIX%%/var/ifgraph graphdir = %%PREFIX%%/ifgraph/htdocs template = %%PREFIX%%/ifgraph/templates/en imgformat=PNG # those are the default configurations, should be # overriden in each target host = your.main.router.com community = public port =161 max=100M dimension=550x200 colors=back#000000,font#FFFFFF,shadea#212121,canvas#232323,mgrid#FF0000,out#FFFFFF options=noerror hbeat=600 retry=2 timeout=5 # [target] targets # Define the name of the target inside the [ ] and # the options bellow it # These configurations will override default configurations. # AN example of an interface* target # MANDATORY - The name of the target [router] # HOST - The host/ip of the SNMP agent host=router.mynetwork.com # COMMUNITY - The SNMPv1 community name of the agent # this program needs only a ro community community=public # PORT - The agents UDP port port=161 # INTERFACE - The number of the interface in the MIB-II tree # OBS: YOU MUST DEFINE THIS FOR EACH TARGET. # There is no default for interface interface=2 # INTERFACE_NAME, INTERFACE_MAC, INTERFACE_IP # let's try to find it by it's name, OR by it's mac # OR by it's ip # interface_name = eth0 # interface_ip = 150.162.82.1 # interface_mac = 0x00e04c3909d1 # MAX - The maximum bandwidth of the interface # Define this correctly, so ifgraph can avoid # spikes in graphics. Use k for kilobits, m # for megabits and G for gigabits # For assimetric lines, define IN/OUT: # 512k/128k - 512k will be IN MAX and 128k # will be considered the OUT MAX max=10M # DIMENSION - Dimension of the graphic (WIDTHxHEIGHT) dimension=550x200 # TITLE - The graphic main title title=In/Out data for Interface 2 of router # COLORS - The colors that will be used in the graphic. You define it # this way: # colors = TYPE#XXXXXX, TYPE2#XXXXXX... # where #XXXXXX is the hexadecimal of the desired color and # TYPE is one of the following: # back, canvas, shadea, shadeb, grid, mgrid, font, frame, arrow, in, out colors=back#000000,font#FFFFFF,shadea#212121,canvas#232323,mgrid#FF0000,out#FFFFFF # OPTIONS - Some other options. Define it separated by commas. # options=noerror,invert,nolegend,rigid # noerror - graphics for this target wont show errors # invert - in will became out and vice-versa # nolegend - graphics will have no legend at all # rigid - will fix the top of the graph in the value # noinfo - makegraph.pl will not collect SNMP data for this target # bytes - makegraph.pl will create graphics in bytes/second # bits - makegraph.pl will create graphics in bits/second # defined by max options=noerror # YLEGEND - ylegend is the legend that is shown in the left side # of the graphic ylegend=kbits per second # LEGENDS - The legends that will be show # for the in/out data legends=kbits entering our network,kbits leaving our network # SHORTLEGEND - a shortlegend for the data you # are graphing shortlegend=kbits/sec # HBEAT - heartbeat is the amount of time whitout getting data # before rrdtool plotting 0 in the graphics. # The higher, the less 0 in graphics when agent is not reached hbeat=600 # RETRY - How much times ifgraph.pl/makegraph.pl will query the snmp agent on target # for data retry=2 # TIMEOUT - How long (in seconds) ifgraph.pl/makegraph.pl will wait for an agent response timeout=5 # STEP - the period that data will be fed into the RRD step = 300 # PERIODS - The periods of time that you want to show in your graphics. # OBS: It must conform to the specifications of RRDTool, see # more about it at http://www.rrdtool.org periods = -1day, -1week, -1month, -1year # An example of an OID target # PLEASE READ THE DOCUMENTATION [Memory] host = some.host.com community = my-private-community port=161 # OID - if you want to fetch an OID data # from yuor snmp agent then you must set an # oids directive. You can define many oids, just separating # them with commas # Ex.: oids = 1.3.6.1.4.1.2021.4.4.0,1.3.6.1.4.1.2021.4.6.0 # OIDDEFS - the oid colors and definitions. For each # oid defined in the oids directive, you must set # one definition here. The format is: # (LINE1|LINE2|LINE3|AREA|STACK)(#RRGGBB|$color name) oiddefs = AREA#AA00CC,LINE3#00CC00 # LEGENDS - the oids legends, separated by commas legends = Real Memory, Swap Memory # SHORTLEGEND - the shortlegend that describes the # variables you are getting. If the data to be # plotted represents a percentage, you should define # here as %% (yes, two %) so rrdtool can work. shortlegend=%% # MAX - For OID targets, define MAX/MAX/MAX/MAX... for # each oid in the OID directive max=512M/256M # KILO - how many is one kilo (1k)? kilo= 1024 # An example of a command target # PLEASE READ THE DOCUMENTATION [OpenFiles] # The command that will be executed # IT MUST return one value per line, command = netstat -m | grep "mbuf.*in use" | cut -d "/" -f 1 # LEGENDS - the command outputs legends, separated by commas legends = Mbufers in Use, Mbuf Clusters in Use # SHORTLEGEND - the shortlegend that describes the # variables you are getting. If the data to be # plotted represents a percentage, you should define # here as %% (yes, two %) so rrdtool can work. shortlegend=mbufs # MAX - For OID targets, define MAX/MAX/MAX/MAX... for # each command output max=16384/4096 # KILO - how many is one kilo (1k)? kilo= 1024