I am running ifgraph on XP against m0n0wall because my m0n0wall has no hard drive, and runs only from a CD with a floppy for config info. The problem I am having is that ifgraph is producing no graphs, only html files that show a missing image icon where the icon should be. I have followed their config instructions for ifgraph.conf for the m0n0wall interface stuff, but not the path stuff, as that is on XP not m0n0. http://doc.m0n0.ch/handbook/thirdparty-ifgraph.html
Versions of stuff:
FreeBSD m0n0wall.local 4.11-RELEASE-p13 FreeBSD 4.11-RELEASE-p13 #0: Sa i386
#ifGraph 0.4.10 - Network Interface Data to RRD
This is perl, v5.8.7
RRDtool 1.2.28
Windows XP SP2
I wish I could attach files here, but I don't see that option, so I'll try to paste everything that may be needed. Thanks!
Here is the only error when ifgraph is executed:
ERROR: Cannot parse DS in 'DEF:totalin=c:\progra~1\rrdtool\data/m0n0wall-wan.rrd:octetsin:AVERAGE'
ERROR: Cannot parse DS in 'DEF:totalin=c:\progra~1\rrdtool\data/m0n0wall-wan.rrd:octetsin:AVERAGE'
ERROR: Cannot parse DS in 'DEF:totalin=c:\progra~1\rrdtool\data/m0n0wall-wan.rrd:octetsin:AVERAGE'
ERROR: Cannot parse DS in 'DEF:totalin=c:\progra~1\rrdtool\data/m0n0wall-wan.rrd:octetsin:AVERAGE'
Full output from invoking ifgraph.pl & makegraph.pl:
Starting ifgraph 0.4.10 with perl 5.008007, Net::SNMP 4.3
main(): Config file c:\progra~1\ifgraph\ifgraph.conf ok
readconf(): Entering target: global
readconf(): Entering target: m0n0wall-wan
main(): no targets specified, fetching data from all
main(): Found rrdtool at c:\progra~1\rrdtool\rrdtool.exe
main(): Directory c:\progra~1\rrdtool\data is ok
main(): Opened the command "c:\progra~1\rrdtool\rrdtool.exe -" as FH RRDTOOL
main(): Starting the main loop (single-thread)
main(): Starting scan for target m0n0wall-wan (192.168.1.253/161/1)
main(): valid heartbeat values
snmpQuery(): Starting fileCheck(m0n0wall-wan)
snmpQuery(): Creating Net::SNMP session with 192.168.1.253 for interface/OID 1 (type 1) on port 161
findInterfaceIndex(): we already have the index, we dont need to find it
snmpQuery(): Net::SNMP Session created... contacting agent on host
insertData(): Log file m0n0wall-wan.log opened OK
insertData(): heartbeats are OK
insertData(): Data received ok... comparing
insertData() OK: Seems that counter is increasing. Using (actual)
insertData(): Actual data: 3734206989 > Old Data: 3697697247
rrdIntLog(): 3734206989,312722606,0,0,600 -> m0n0wall-wan.log
insertData(): update c:\progra~1\rrdtool\data/m0n0wall-wan.rrd N:3734206989:312722606:0:0
OK
main(): Exiting ifgraph
Starting ifgraph 0.4.10 with perl 0, Net::SNMP 4.3
main(): Creating a RGB converter object from Color::Rgb
main(): Ok RGB converter object created
main(): Config file c:\progra~1\ifgraph\ifgraph.conf ok
main(): no targets specified, fetching data from all
main(): using config file template: c:\progra~1\ifgraph\templates\en
main(): Found rrdtool at c:\progra~1\rrdtool\rrdtool.exe
main(): Directory c:\progra~1\rrdtool\data is ok
Directory c:\progra~1\ifgraph\html is ok
main(): Directory c:\progra~1\ifgraph\templates\en is ok
main(): Opened the command "c:\progra~1\rrdtool\rrdtool.exe -" as FH RRDTOOL
Creating c:\progra~1\ifgraph\html/index-65274.0478515625.temp
Permited variables in main-header.html: <$time_[hour,min,sec,day,mon,year]$>
main(): Parsing the image format (PNG)
main(): GD or PNG or GIF
main(): Starting the loop process
main(): Starting scan for target m0n0wall-wan (192.168.1.253/161/1)
parseMaxes(): Searching for valid bandwidth descriptions: 100 (M)
parseMaxes(): value: 100 multiple: M kilo: 1000
parseMaxes(): Total[0]: 100000000
parseDimensions(): Entering parseDimensions
parseColors(): Entering parseColors (back#000000,font#FFFFFF,shadea#212121,canvas#232323,mgrid#FF0000,out#FFFFFF,back#000000,font#FFFFFF,shadea#212121,canvas#232323,mgrid#FF0000,out#FFFFFF)
parseColors(): Found an hexadecimal color definition: back#000000 (back)(000000)
parseColors(): Found an hexadecimal color definition: font#FFFFFF (font)(FFFFFF)
parseColors(): Found an hexadecimal color definition: shadea#212121 (shadea)(212121)
parseColors(): Found an hexadecimal color definition: canvas#232323 (canvas)(232323)
parseColors(): Found an hexadecimal color definition: mgrid#FF0000 (mgrid)(FF0000)
parseColors(): Found an hexadecimal color definition: out#FFFFFF (out)(FFFFFF)
parseColors(): Found an hexadecimal color definition: back#000000 (back)(000000)
parseColors(): Found an hexadecimal color definition: font#FFFFFF (font)(FFFFFF)
parseColors(): Found an hexadecimal color definition: shadea#212121 (shadea)(212121)
parseColors(): Found an hexadecimal color definition: canvas#232323 (canvas)(232323)
parseColors(): Found an hexadecimal color definition: mgrid#FF0000 (mgrid)(FF0000)
parseColors(): Found an hexadecimal color definition: out#FFFFFF (out)(FFFFFF)
snmpQuery(): Creating Net::SNMP session with 192.168.1.253 for interface/OID 1 (1) on port 161
findInterfaceIndex(): we already have the index, we dont need to find it
snmpQuery(): Yes, we want agent information, calling snmpGetInfo()
snmpGetInfo(): Information from agent fetched (HASH(0x1b84034))
snmpQuery(): Calling addTemplate*(HASH(0x1b84034))
addTemplateInterface(): we got response, using it
addTemplateInterface(): moving c:\progra~1\ifgraph\html/m0n0wall-wan-65274.0478515625.temp to c:\progra~1\ifgraph\html/m0n0wall-wan.html
Permited variables in main-if.html: <$target_[name,max,hostname,port,community,interface]$> <$snmp[ifdesc,sysdesc,sysuptime,syscontact,syslocation,sysname]$> <$first_period$> <$last_period$>
organizaGraficos(): Entering organizaGraficos
criaGraficoBits(): Colors are #000000, #232323, #212121, #969696, #FF0000, #FF0000, #FFFFFF, #000000, #FF0000, #FF0000, #FFFFFF
criaGraficoBits(): Options are -1 -1 -1 1 1 0
criaGraficoBits(): Dimensions are 550 x 200
ERROR: Cannot parse DS in 'DEF:totalin=c:\progra~1\rrdtool\data/m0n0wall-wan.rrd:octetsin:AVERAGE'
ERROR: Cannot parse DS in 'DEF:totalin=c:\progra~1\rrdtool\data/m0n0wall-wan.rrd:octetsin:AVERAGE'
ERROR: Cannot parse DS in 'DEF:totalin=c:\progra~1\rrdtool\data/m0n0wall-wan.rrd:octetsin:AVERAGE'
ERROR: Cannot parse DS in 'DEF:totalin=c:\progra~1\rrdtool\data/m0n0wall-wan.rrd:octetsin:AVERAGE'
Closing c:\progra~1\ifgraph\html/index.html
Permited variables in main-trailer.html: <$time_[hour,min,sec,day,mon,year]$>
closeTemplateIndex(): moving c:\progra~1\ifgraph\html/index-65274.0478515625.temp to c:\progra~1\ifgraph\html/index.html
main(): Exiting makegraph
Full contents of ifgraph.conf:
# [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.
# 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
[m0n0wall-wan]
host=192.168.1.253
community=youdliketoknow
port=161
interface=1
max=100M
dimension=550x200
title=In/Out data for m0n0wall WAN interface
colors=back#000000,font#FFFFFF,shadea#212121,canvas#232323,mgrid#FF0000,out#FFFFFF
#options=noerror
ylegend=kbits per second
legends=kbits Inbound,kbits Outbound
shortlegend=kbits/sec
hbeat=600
retry=2
timeout=5
step = 300
periods = -1day, -1week, -1month, -1year
graph=yes
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Read on an RRD forum that the "cannot parse DS" error is caused on windows because paths contain ":" colon, and RRD uses colons for delimiters. Changed the rrddir to "\progra~\rrdtool\data" and am now getting a new error. This "bit/sec \l" is part of a huge line of code in makegraph.pl so I think this is definitely an ifgraph problem, no longer RRD.
ERROR: Garbage ': 1000000000 - 1000000000 bits/sec \l' after command:
COMMENT:Max bits for target m0n0wall-wan: 1000000000 - 1000000000 bits/sec \l
ERROR: Garbage ': 1000000000 - 1000000000 bits/sec \l' after command:
COMMENT:Max bits for target m0n0wall-wan: 1000000000 - 1000000000 bits/sec \l
ERROR: Garbage ': 1000000000 - 1000000000 bits/sec \l' after command:
COMMENT:Max bits for target m0n0wall-wan: 1000000000 - 1000000000 bits/sec \l
Closing \progra~1\ifgraph\html/index.html
Permited variables in main-trailer.html: <$time_[hour,min,sec,day,mon,year]$>
ERROR: Garbage ': 1000000000 - 1000000000 bits/sec \l' after command:
COMMENT:Max bits for target m0n0wall-wan: 1000000000 - 1000000000 bits/sec \l
closeTemplateIndex(): moving \progra~1\ifgraph\html/index-23519.8974609375.temp to \progra~1\ifgraph\html/index.html
main(): Exiting makegraph
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am running ifgraph on XP against m0n0wall because my m0n0wall has no hard drive, and runs only from a CD with a floppy for config info. The problem I am having is that ifgraph is producing no graphs, only html files that show a missing image icon where the icon should be. I have followed their config instructions for ifgraph.conf for the m0n0wall interface stuff, but not the path stuff, as that is on XP not m0n0.
http://doc.m0n0.ch/handbook/thirdparty-ifgraph.html
Versions of stuff:
FreeBSD m0n0wall.local 4.11-RELEASE-p13 FreeBSD 4.11-RELEASE-p13 #0: Sa i386
#ifGraph 0.4.10 - Network Interface Data to RRD
This is perl, v5.8.7
RRDtool 1.2.28
Windows XP SP2
I wish I could attach files here, but I don't see that option, so I'll try to paste everything that may be needed. Thanks!
Here is the only error when ifgraph is executed:
ERROR: Cannot parse DS in 'DEF:totalin=c:\progra~1\rrdtool\data/m0n0wall-wan.rrd:octetsin:AVERAGE'
ERROR: Cannot parse DS in 'DEF:totalin=c:\progra~1\rrdtool\data/m0n0wall-wan.rrd:octetsin:AVERAGE'
ERROR: Cannot parse DS in 'DEF:totalin=c:\progra~1\rrdtool\data/m0n0wall-wan.rrd:octetsin:AVERAGE'
ERROR: Cannot parse DS in 'DEF:totalin=c:\progra~1\rrdtool\data/m0n0wall-wan.rrd:octetsin:AVERAGE'
Full output from invoking ifgraph.pl & makegraph.pl:
Starting ifgraph 0.4.10 with perl 5.008007, Net::SNMP 4.3
main(): Config file c:\progra~1\ifgraph\ifgraph.conf ok
readconf(): Entering target: global
readconf(): Entering target: m0n0wall-wan
main(): no targets specified, fetching data from all
main(): Found rrdtool at c:\progra~1\rrdtool\rrdtool.exe
main(): Directory c:\progra~1\rrdtool\data is ok
main(): Opened the command "c:\progra~1\rrdtool\rrdtool.exe -" as FH RRDTOOL
main(): Starting the main loop (single-thread)
main(): Starting scan for target m0n0wall-wan (192.168.1.253/161/1)
main(): valid heartbeat values
snmpQuery(): Starting fileCheck(m0n0wall-wan)
snmpQuery(): Creating Net::SNMP session with 192.168.1.253 for interface/OID 1 (type 1) on port 161
findInterfaceIndex(): we already have the index, we dont need to find it
snmpQuery(): Net::SNMP Session created... contacting agent on host
insertData(): Log file m0n0wall-wan.log opened OK
insertData(): heartbeats are OK
insertData(): Data received ok... comparing
insertData() OK: Seems that counter is increasing. Using (actual)
insertData(): Actual data: 3734206989 > Old Data: 3697697247
rrdIntLog(): 3734206989,312722606,0,0,600 -> m0n0wall-wan.log
insertData(): update c:\progra~1\rrdtool\data/m0n0wall-wan.rrd N:3734206989:312722606:0:0
OK
main(): Exiting ifgraph
Starting ifgraph 0.4.10 with perl 0, Net::SNMP 4.3
main(): Creating a RGB converter object from Color::Rgb
main(): Ok RGB converter object created
main(): Config file c:\progra~1\ifgraph\ifgraph.conf ok
main(): no targets specified, fetching data from all
main(): using config file template: c:\progra~1\ifgraph\templates\en
main(): Found rrdtool at c:\progra~1\rrdtool\rrdtool.exe
main(): Directory c:\progra~1\rrdtool\data is ok
Directory c:\progra~1\ifgraph\html is ok
main(): Directory c:\progra~1\ifgraph\templates\en is ok
main(): Opened the command "c:\progra~1\rrdtool\rrdtool.exe -" as FH RRDTOOL
Creating c:\progra~1\ifgraph\html/index-65274.0478515625.temp
Permited variables in main-header.html: <$time_[hour,min,sec,day,mon,year]$>
main(): Parsing the image format (PNG)
main(): GD or PNG or GIF
main(): Starting the loop process
main(): Starting scan for target m0n0wall-wan (192.168.1.253/161/1)
parseMaxes(): Searching for valid bandwidth descriptions: 100 (M)
parseMaxes(): value: 100 multiple: M kilo: 1000
parseMaxes(): Total[0]: 100000000
parseDimensions(): Entering parseDimensions
parseColors(): Entering parseColors (back#000000,font#FFFFFF,shadea#212121,canvas#232323,mgrid#FF0000,out#FFFFFF,back#000000,font#FFFFFF,shadea#212121,canvas#232323,mgrid#FF0000,out#FFFFFF)
parseColors(): Found an hexadecimal color definition: back#000000 (back)(000000)
parseColors(): Found an hexadecimal color definition: font#FFFFFF (font)(FFFFFF)
parseColors(): Found an hexadecimal color definition: shadea#212121 (shadea)(212121)
parseColors(): Found an hexadecimal color definition: canvas#232323 (canvas)(232323)
parseColors(): Found an hexadecimal color definition: mgrid#FF0000 (mgrid)(FF0000)
parseColors(): Found an hexadecimal color definition: out#FFFFFF (out)(FFFFFF)
parseColors(): Found an hexadecimal color definition: back#000000 (back)(000000)
parseColors(): Found an hexadecimal color definition: font#FFFFFF (font)(FFFFFF)
parseColors(): Found an hexadecimal color definition: shadea#212121 (shadea)(212121)
parseColors(): Found an hexadecimal color definition: canvas#232323 (canvas)(232323)
parseColors(): Found an hexadecimal color definition: mgrid#FF0000 (mgrid)(FF0000)
parseColors(): Found an hexadecimal color definition: out#FFFFFF (out)(FFFFFF)
snmpQuery(): Creating Net::SNMP session with 192.168.1.253 for interface/OID 1 (1) on port 161
findInterfaceIndex(): we already have the index, we dont need to find it
snmpQuery(): Yes, we want agent information, calling snmpGetInfo()
snmpGetInfo(): Information from agent fetched (HASH(0x1b84034))
snmpQuery(): Calling addTemplate*(HASH(0x1b84034))
addTemplateInterface(): we got response, using it
addTemplateInterface(): moving c:\progra~1\ifgraph\html/m0n0wall-wan-65274.0478515625.temp to c:\progra~1\ifgraph\html/m0n0wall-wan.html
Permited variables in main-if.html: <$target_[name,max,hostname,port,community,interface]$> <$snmp[ifdesc,sysdesc,sysuptime,syscontact,syslocation,sysname]$> <$first_period$> <$last_period$>
organizaGraficos(): Entering organizaGraficos
criaGraficoBits(): Colors are #000000, #232323, #212121, #969696, #FF0000, #FF0000, #FFFFFF, #000000, #FF0000, #FF0000, #FFFFFF
criaGraficoBits(): Options are -1 -1 -1 1 1 0
criaGraficoBits(): Dimensions are 550 x 200
ERROR: Cannot parse DS in 'DEF:totalin=c:\progra~1\rrdtool\data/m0n0wall-wan.rrd:octetsin:AVERAGE'
ERROR: Cannot parse DS in 'DEF:totalin=c:\progra~1\rrdtool\data/m0n0wall-wan.rrd:octetsin:AVERAGE'
ERROR: Cannot parse DS in 'DEF:totalin=c:\progra~1\rrdtool\data/m0n0wall-wan.rrd:octetsin:AVERAGE'
ERROR: Cannot parse DS in 'DEF:totalin=c:\progra~1\rrdtool\data/m0n0wall-wan.rrd:octetsin:AVERAGE'
Closing c:\progra~1\ifgraph\html/index.html
Permited variables in main-trailer.html: <$time_[hour,min,sec,day,mon,year]$>
closeTemplateIndex(): moving c:\progra~1\ifgraph\html/index-65274.0478515625.temp to c:\progra~1\ifgraph\html/index.html
main(): Exiting makegraph
Full contents of ifgraph.conf:
# [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 = c:\progra~1\rrdtool\rrdtool.exe
rrddir = c:\progra~1\rrdtool\data
graphdir= c:\progra~1\ifgraph\html
template= c:\progra~1\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
[m0n0wall-wan]
host=192.168.1.253
community=youdliketoknow
port=161
interface=1
max=100M
dimension=550x200
title=In/Out data for m0n0wall WAN interface
colors=back#000000,font#FFFFFF,shadea#212121,canvas#232323,mgrid#FF0000,out#FFFFFF
#options=noerror
ylegend=kbits per second
legends=kbits Inbound,kbits Outbound
shortlegend=kbits/sec
hbeat=600
retry=2
timeout=5
step = 300
periods = -1day, -1week, -1month, -1year
graph=yes
Read on an RRD forum that the "cannot parse DS" error is caused on windows because paths contain ":" colon, and RRD uses colons for delimiters. Changed the rrddir to "\progra~\rrdtool\data" and am now getting a new error. This "bit/sec \l" is part of a huge line of code in makegraph.pl so I think this is definitely an ifgraph problem, no longer RRD.
ERROR: Garbage ': 1000000000 - 1000000000 bits/sec \l' after command:
COMMENT:Max bits for target m0n0wall-wan: 1000000000 - 1000000000 bits/sec \l
ERROR: Garbage ': 1000000000 - 1000000000 bits/sec \l' after command:
COMMENT:Max bits for target m0n0wall-wan: 1000000000 - 1000000000 bits/sec \l
ERROR: Garbage ': 1000000000 - 1000000000 bits/sec \l' after command:
COMMENT:Max bits for target m0n0wall-wan: 1000000000 - 1000000000 bits/sec \l
Closing \progra~1\ifgraph\html/index.html
Permited variables in main-trailer.html: <$time_[hour,min,sec,day,mon,year]$>
ERROR: Garbage ': 1000000000 - 1000000000 bits/sec \l' after command:
COMMENT:Max bits for target m0n0wall-wan: 1000000000 - 1000000000 bits/sec \l
closeTemplateIndex(): moving \progra~1\ifgraph\html/index-23519.8974609375.temp to \progra~1\ifgraph\html/index.html
main(): Exiting makegraph