Error when using second data source for GPRINT only
Moderators: Developers, Moderators
-
- Cacti User
- Posts: 97
- Joined: Thu Mar 24, 2005 4:59 am
- Location: Brussels, Belgium
Error when using second data source for GPRINT only
I'm creating a graph for which I use 2 data sources. The data sources are OK, and I can graph both of them.
However, now I want to omit the graphing of the second, and only have the value printed under the graph. So, I remove the LINE graph item type, but leave the GPRINT of that Data Source.
As soon as I do that, the graph doesn't work anymore and the debugging sais:
ERROR: Could not parse line 'GPRINT::LAST:%8.0lf'
Anyone knows where the trick is ?
However, now I want to omit the graphing of the second, and only have the value printed under the graph. So, I remove the LINE graph item type, but leave the GPRINT of that Data Source.
As soon as I do that, the graph doesn't work anymore and the debugging sais:
ERROR: Could not parse line 'GPRINT::LAST:%8.0lf'
Anyone knows where the trick is ?
[size=75][color=#EE5019]| Cacti 0.8.6g | MySQL 4.1.14 w Query Cache | Net-SNMP 5.2.1 | IIS 6 | fast-cgi | PHP 5.0.3 | RRDtool 1.2.9 | Windows 2003 Server SP1 | Cactid 0.8.6f |
| Dell 2450 - 2x P3 733 MHz, 1GB RAM |[/size][/color]
| Dell 2450 - 2x P3 733 MHz, 1GB RAM |[/size][/color]
Since the graph was designed to have two data sources, you must give it two. If you only want one, then you'll have to edit the graph template and remove the second.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
-
- Cacti User
- Posts: 97
- Joined: Thu Mar 24, 2005 4:59 am
- Location: Brussels, Belgium
But I do want the value of the second printed under the graph (with Gprint), so I can't remove that data source, can I ? However, I don't want to graph it. Maybe it's impossible, and I could enter it as a feature request ?
[size=75][color=#EE5019]| Cacti 0.8.6g | MySQL 4.1.14 w Query Cache | Net-SNMP 5.2.1 | IIS 6 | fast-cgi | PHP 5.0.3 | RRDtool 1.2.9 | Windows 2003 Server SP1 | Cactid 0.8.6f |
| Dell 2450 - 2x P3 733 MHz, 1GB RAM |[/size][/color]
| Dell 2450 - 2x P3 733 MHz, 1GB RAM |[/size][/color]
So you want the text on the graph, just not the line? In that case, you just need to modify the graph template and change the type for that data source.
No, it wouldn't be a feature request since thats a rrdtool thing.
No, it wouldn't be a feature request since thats a rrdtool thing.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
-
- Cacti User
- Posts: 97
- Joined: Thu Mar 24, 2005 4:59 am
- Location: Brussels, Belgium
What do you suggest to change it to ? I tried making it 'legend' or 'comment' or 'gprint', but the error (as in my first post) is always the same.
[size=75][color=#EE5019]| Cacti 0.8.6g | MySQL 4.1.14 w Query Cache | Net-SNMP 5.2.1 | IIS 6 | fast-cgi | PHP 5.0.3 | RRDtool 1.2.9 | Windows 2003 Server SP1 | Cactid 0.8.6f |
| Dell 2450 - 2x P3 733 MHz, 1GB RAM |[/size][/color]
| Dell 2450 - 2x P3 733 MHz, 1GB RAM |[/size][/color]
Are you specifiying the two data sources in the graph or did you leave it out again?
Did you edit the graph template and change the type of the second data source?
Did you edit the graph template and change the type of the second data source?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
-
- Cacti User
- Posts: 97
- Joined: Thu Mar 24, 2005 4:59 am
- Location: Brussels, Belgium
I tried different things (each time with the same result):
-editing the graph template : changed the 'Line' item type to comment, gprint or legend.
-making a new graph. Without using the second data source, I couldn't find a way to add the legend item for it. So I added it, as a gprint right away. But no luck.
-editing the graph template : changed the 'Line' item type to comment, gprint or legend.
-making a new graph. Without using the second data source, I couldn't find a way to add the legend item for it. So I added it, as a gprint right away. But no luck.
[size=75][color=#EE5019]| Cacti 0.8.6g | MySQL 4.1.14 w Query Cache | Net-SNMP 5.2.1 | IIS 6 | fast-cgi | PHP 5.0.3 | RRDtool 1.2.9 | Windows 2003 Server SP1 | Cactid 0.8.6f |
| Dell 2450 - 2x P3 733 MHz, 1GB RAM |[/size][/color]
| Dell 2450 - 2x P3 733 MHz, 1GB RAM |[/size][/color]
-
- Cacti User
- Posts: 97
- Joined: Thu Mar 24, 2005 4:59 am
- Location: Brussels, Belgium
I copied the code that generated the graph, as it is now, including the line item for the second data source:
c:/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Alteon App. Switch Dgm - Safari Current and High Sessions" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--units-exponent=1 \
--vertical-label="Number of Sessions" \
--slope-mode \
DEF:a="C\:/wwwroot/cacti/rra/alteon_app_switch_dgm_currsess_133.rrd":CurrSess:AVERAGE \
DEF:b="C\:/wwwroot/cacti/rra/alteon_app_switch_dgm_currsess_133.rrd":HighSess:LAST \
AREA:a#942D0C:"Sessions" \
GPRINTLAST:"Current\:%8.0lf" \
GPRINTAVERAGE:"Average\:%8.0lf" \
GPRINTMAX:"Max\:%8.0lf" \
LINE1:b#FFAB00:"" \
GPRINTLAST:" Maximum\:%8.0lf\n"
I made some ugly copy of that to generate a similar graph from DOS, and than left out the Line graph item.
This does the graph exactly as I want it !
c:/rrdtool/rrdtool.exe graph test.png --imgformat=PNG --start=-86400 --end=-300 --title="Alteon App. Switch Dgm - Safari Current and High Sessions" --base=1000 --height=120 --width=500 --alt-autoscale-max --lower-limit=0 --units-exponent=1 --vertical-label="Number of Sessions" --slope-mode DEF:a="C\:/wwwroot/cacti/rra/alteon_app_switch_dgm_currsess_133.rrd":CurrSess:AVERAGE
DEF:b="C\:/wwwroot/cacti/rra/alteon_app_switch_dgm_currsess_133.rrd":HighSess:LAST AREA:a#942D0C:"Sessions" GPRINTLAST:"Current\%%8.0lf" GPRINTAVERAGE:"Average\%%8.0lf" GPRINTMAX:"Max\%%8.0lf" GPRINTMAX:" Maximum\%%8.0lf"
So I'm wondering why I can't seem to be generating the right code through Cacti. I will have to experiment some more I think, since it is certainly not an RRDTOOL problem.
c:/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Alteon App. Switch Dgm - Safari Current and High Sessions" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--units-exponent=1 \
--vertical-label="Number of Sessions" \
--slope-mode \
DEF:a="C\:/wwwroot/cacti/rra/alteon_app_switch_dgm_currsess_133.rrd":CurrSess:AVERAGE \
DEF:b="C\:/wwwroot/cacti/rra/alteon_app_switch_dgm_currsess_133.rrd":HighSess:LAST \
AREA:a#942D0C:"Sessions" \
GPRINTLAST:"Current\:%8.0lf" \
GPRINTAVERAGE:"Average\:%8.0lf" \
GPRINTMAX:"Max\:%8.0lf" \
LINE1:b#FFAB00:"" \
GPRINTLAST:" Maximum\:%8.0lf\n"
I made some ugly copy of that to generate a similar graph from DOS, and than left out the Line graph item.
This does the graph exactly as I want it !
c:/rrdtool/rrdtool.exe graph test.png --imgformat=PNG --start=-86400 --end=-300 --title="Alteon App. Switch Dgm - Safari Current and High Sessions" --base=1000 --height=120 --width=500 --alt-autoscale-max --lower-limit=0 --units-exponent=1 --vertical-label="Number of Sessions" --slope-mode DEF:a="C\:/wwwroot/cacti/rra/alteon_app_switch_dgm_currsess_133.rrd":CurrSess:AVERAGE
DEF:b="C\:/wwwroot/cacti/rra/alteon_app_switch_dgm_currsess_133.rrd":HighSess:LAST AREA:a#942D0C:"Sessions" GPRINTLAST:"Current\%%8.0lf" GPRINTAVERAGE:"Average\%%8.0lf" GPRINTMAX:"Max\%%8.0lf" GPRINTMAX:" Maximum\%%8.0lf"
So I'm wondering why I can't seem to be generating the right code through Cacti. I will have to experiment some more I think, since it is certainly not an RRDTOOL problem.
[size=75][color=#EE5019]| Cacti 0.8.6g | MySQL 4.1.14 w Query Cache | Net-SNMP 5.2.1 | IIS 6 | fast-cgi | PHP 5.0.3 | RRDtool 1.2.9 | Windows 2003 Server SP1 | Cactid 0.8.6f |
| Dell 2450 - 2x P3 733 MHz, 1GB RAM |[/size][/color]
| Dell 2450 - 2x P3 733 MHz, 1GB RAM |[/size][/color]
-
- Cacti User
- Posts: 97
- Joined: Thu Mar 24, 2005 4:59 am
- Location: Brussels, Belgium
Aha !
When making the exact same graph template, omiting the line graph item, the generated code is this :
c:/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start=1131367599 \
--end=1131453999 \
--title="Alteon App. Switch Dgm - Alteon Virtual Server Current and High Sessions" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--units-exponent=1 \
COMMENT:"From 2005/11/07 13\:46\:39 To 2005/11/08 13\:46\:39\c" \
COMMENT:" \n" \
--vertical-label="Number of Sessions" \
--slope-mode \
DEF:a="C\:/wwwroot/cacti/rra/alteon_app_switch_dgm_currsess_133.rrd":CurrSess:AVERAGE \
AREA:a#942D0C:"Sessions" \
GPRINTLAST:"Current\:%8.0lf" \
GPRINTAVERAGE:"Average\:%8.0lf" \
GPRINTMAX:"Max\:%8.0lf" \
GPRINT::LAST:"Maximum\:%8.0lf\n"
Notice that this code does not contain the second data source (DEF:b=), and the last GPRINT does not contain a data source item !! That is where the generated error comes from, but the initial problem is the second data source being left out.
I think we need a patch for the cacti code that generates the rrdtool code. Or am I on the wrong track here ?
When making the exact same graph template, omiting the line graph item, the generated code is this :
c:/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start=1131367599 \
--end=1131453999 \
--title="Alteon App. Switch Dgm - Alteon Virtual Server Current and High Sessions" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--units-exponent=1 \
COMMENT:"From 2005/11/07 13\:46\:39 To 2005/11/08 13\:46\:39\c" \
COMMENT:" \n" \
--vertical-label="Number of Sessions" \
--slope-mode \
DEF:a="C\:/wwwroot/cacti/rra/alteon_app_switch_dgm_currsess_133.rrd":CurrSess:AVERAGE \
AREA:a#942D0C:"Sessions" \
GPRINTLAST:"Current\:%8.0lf" \
GPRINTAVERAGE:"Average\:%8.0lf" \
GPRINTMAX:"Max\:%8.0lf" \
GPRINT::LAST:"Maximum\:%8.0lf\n"
Notice that this code does not contain the second data source (DEF:b=), and the last GPRINT does not contain a data source item !! That is where the generated error comes from, but the initial problem is the second data source being left out.
I think we need a patch for the cacti code that generates the rrdtool code. Or am I on the wrong track here ?
[size=75][color=#EE5019]| Cacti 0.8.6g | MySQL 4.1.14 w Query Cache | Net-SNMP 5.2.1 | IIS 6 | fast-cgi | PHP 5.0.3 | RRDtool 1.2.9 | Windows 2003 Server SP1 | Cactid 0.8.6f |
| Dell 2450 - 2x P3 733 MHz, 1GB RAM |[/size][/color]
| Dell 2450 - 2x P3 733 MHz, 1GB RAM |[/size][/color]
No, there is not a problem with cacti. It's how you've created your graph template. Post a screenshot of your graph template. Also, when you make changes to a graph template, cacti *should* update each one fine (it may require you to go and touch each one though). But if it does not, then you will simply need to delete and recreate it.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
-
- Cacti User
- Posts: 97
- Joined: Thu Mar 24, 2005 4:59 am
- Location: Brussels, Belgium
OK. I've created a new one. It looks exactly the same as the original one, edited for the second data source.
It generates exactly the same error too when I make a graph and select the 2 data sources.
It generates exactly the same error too when I make a graph and select the 2 data sources.
- Attachments
-
- AASgrtempl.jpg (149.65 KiB) Viewed 4244 times
[size=75][color=#EE5019]| Cacti 0.8.6g | MySQL 4.1.14 w Query Cache | Net-SNMP 5.2.1 | IIS 6 | fast-cgi | PHP 5.0.3 | RRDtool 1.2.9 | Windows 2003 Server SP1 | Cactid 0.8.6f |
| Dell 2450 - 2x P3 733 MHz, 1GB RAM |[/size][/color]
| Dell 2450 - 2x P3 733 MHz, 1GB RAM |[/size][/color]
-
- Cacti User
- Posts: 97
- Joined: Thu Mar 24, 2005 4:59 am
- Location: Brussels, Belgium
I've kept on trying, and never got the result I want.In fact it is easy to do the same test:
Create a new graph template and add a first graph item. Choose Interface-Traffic In a the data source (I'm sure everyone has data sources of that kind). Choose a color and area or line as the type.
Add a second graph item, choose Interface-Traffic Out as the data source, and make it a GPRINT type.
Than choose a device for which you poll an interface, make a new graph based upon this template and choose a Traffic In and Traffic Out data source. You will not see a graph, and when you switch on the debug mode, you will see exactly the same error ....
Until someone shows me a screenshot of such working graph, I have to beleive Cacti can't handle this situation (while rrdtool can generate such graph).
I hope someone prooves me wrong ....
Create a new graph template and add a first graph item. Choose Interface-Traffic In a the data source (I'm sure everyone has data sources of that kind). Choose a color and area or line as the type.
Add a second graph item, choose Interface-Traffic Out as the data source, and make it a GPRINT type.
Than choose a device for which you poll an interface, make a new graph based upon this template and choose a Traffic In and Traffic Out data source. You will not see a graph, and when you switch on the debug mode, you will see exactly the same error ....
Until someone shows me a screenshot of such working graph, I have to beleive Cacti can't handle this situation (while rrdtool can generate such graph).
I hope someone prooves me wrong ....
[size=75][color=#EE5019]| Cacti 0.8.6g | MySQL 4.1.14 w Query Cache | Net-SNMP 5.2.1 | IIS 6 | fast-cgi | PHP 5.0.3 | RRDtool 1.2.9 | Windows 2003 Server SP1 | Cactid 0.8.6f |
| Dell 2450 - 2x P3 733 MHz, 1GB RAM |[/size][/color]
| Dell 2450 - 2x P3 733 MHz, 1GB RAM |[/size][/color]
You're right, it won't work. I still think it's an rrdool limitation though. If you feed rrdtool graph the command that won't work in cacti, do you get a valid image?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
-
- Cacti User
- Posts: 97
- Joined: Thu Mar 24, 2005 4:59 am
- Location: Brussels, Belgium
Yes, with rrdtool I can create the graph I want !
Of course, I needed to change a bit of the code that cacti generated; I added the second data source, and added this to the the gprint statement (as I indicated before in this thread). Well, i might as wel attach this code.
So conclusion is that in this case Cacti does not generate a correct code. I think it doesn't include a data source in the rrdtool code if it is not used in a area or line type graph item.
Of course, I needed to change a bit of the code that cacti generated; I added the second data source, and added this to the the gprint statement (as I indicated before in this thread). Well, i might as wel attach this code.
So conclusion is that in this case Cacti does not generate a correct code. I think it doesn't include a data source in the rrdtool code if it is not used in a area or line type graph item.
- Attachments
-
- gengraph.txt
- rrdtool code that generates the graph Cacti cannot do
- (704 Bytes) Downloaded 157 times
-
- generated with rrdtool using the same data sources
- rrdtoolgraph.png (27.01 KiB) Viewed 4213 times
[size=75][color=#EE5019]| Cacti 0.8.6g | MySQL 4.1.14 w Query Cache | Net-SNMP 5.2.1 | IIS 6 | fast-cgi | PHP 5.0.3 | RRDtool 1.2.9 | Windows 2003 Server SP1 | Cactid 0.8.6f |
| Dell 2450 - 2x P3 733 MHz, 1GB RAM |[/size][/color]
| Dell 2450 - 2x P3 733 MHz, 1GB RAM |[/size][/color]
Well if you think its a problem with cacti, then file a bug. http://bugs.cacti.ne
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Who is online
Users browsing this forum: No registered users and 0 guests