Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


can't parse error in graph item

 
Post new topic   Reply to topic    Cacti Forum Index -> Help: General
Author Message
Yvan



Joined: 02 Apr 2003
Posts: 7
Location: Balegem, BE

PostPosted: Thu Nov 27, 2003 11:09 am    Post subject: can't parse error in graph item Reply with quote

Hi there,

I keep running into the same problem.

All the templates and graphs that ome with the cacti-distribution (version 0.8.4) work great. But once I start adding my own graphs, things go wrong.

When importing the hp-toner xml (found in http://www.raxnet.net/board/viewtopic.php?t=2771) I get an error in my graph: ERROR: can't parse '#CDCFC4:Maximum Toner Level'

This is what the code looks like

Code:
/usr/local/rrdtool-1.0.45/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--title="lexmark OptraColor 1200 - Toner Level" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
AREA:#CDCFC4:"Maximum Toner Level"  \
LINE1:#000000:"Current Toner Level"  \
GPRINT::LAST:"mg of toner remaining\:%8.0lf"


When I create a graph from the CLI, it creates a nice graph.

Code:
/usr/local/rrdtool-1.0.45/bin/rrdtool graph toner.gif DEF:mytoner=/home/www/htdocs/cacti/rra/lexmark_optracolor_1200_blk_toner_level_133.rrd:blk_toner_level:AVERAGE LINE2:mytoner#FF0000


We all can see the problem: there is no DEF defined in the cacti graph

Now my question is: how do I get it there...

I'm not sure sure if this error is linux-ditro based or not, but I saw the same problem in the Win32 Forum http://www.raxnet.net/board/viewtopic.php?t=2664.


cya,

Yvan
Back to top
raX
Lead Developer


Joined: 13 Oct 2001
Posts: 2237
Location: Carlisle, PA

PostPosted: Mon Dec 01, 2003 11:32 pm    Post subject: Reply with quote

The graph template that you are trying to use in the other thread is missing two "Graph Item Inputs", one for each data source on the graph. I realize that this is not intuitively obvious and it really should be. I am making a note in my 0.8.5 TODO as we speak.

I also attached a revised copy of the template if you are interested.

-Ian



printer-hp-toner_rev1.xml
 Description:
Toner Level Graph Template (rev1)

Download
 Filename:  printer-hp-toner_rev1.xml
 Filesize:  10.39 KB
 Downloaded:  936 Time(s)

Back to top
NetVicious



Joined: 13 Oct 2003
Posts: 43
Location: Spain

PostPosted: Mon May 03, 2004 6:59 am    Post subject: Reply with quote

I get this when I try to run the Data Query I get this:

Code:
Warning: Undefined index: script_path in /usr/share/cacti/lib/data_query.php on line 72

Warning: Undefined index: arg_index in /usr/share/cacti/lib/data_query.php on line 82

Warning: Undefined index: arg_index in /usr/share/cacti/lib/data_query.php on line 84

Warning: Variable passed to each() is not an array or object in /usr/share/cacti/lib/data_query.php on line 88

Warning: Cannot add header information - headers already sent by (output started at /usr/share/cacti/lib/data_query.php:72) in /usr/share/cacti/host.php on line 92
Back to top
raX
Lead Developer


Joined: 13 Oct 2001
Posts: 2237
Location: Carlisle, PA

PostPosted: Tue May 04, 2004 9:46 pm    Post subject: Reply with quote

That is a strange error considering that this XML file does not appear to make use of data queries in any way. If you select "Data Input Methods" on the menu and choose "Get SNMP Data", what is listed for "Input Type"?

-Ian
Back to top
Guest






PostPosted: Wed May 05, 2004 1:48 am    Post subject: Reply with quote

Input Type: SNMP

I'm using 0.8.5a (upgraded from 0.8.3)
Back to top
raX
Lead Developer


Joined: 13 Oct 2001
Posts: 2237
Location: Carlisle, PA

PostPosted: Fri May 21, 2004 1:28 am    Post subject: Reply with quote

Perhaps you are going about creating a graph from the XML incorrectly. Here is the process I followed.

1) Import the XML file located in this thread into Cacti.
2) Go to "New Graphs" and choose the device you created for your printer.
3) Under the "Graph Templates" box, choose "Printer - HP - Toner Level", and click "Create" at the bottom of the page.

Let me know how this works for you.

-Ian
Back to top
wez_db



Joined: 08 Feb 2005
Posts: 1
Location: Hilversum,NL

PostPosted: Tue Feb 08, 2005 3:30 am    Post subject: Reply with quote

i tried the same, however i don't get a graph but no errors either.
Back to top
raX
Lead Developer


Joined: 13 Oct 2001
Posts: 2237
Location: Carlisle, PA

PostPosted: Wed Feb 09, 2005 9:00 pm    Post subject: Reply with quote

I am not exactly sure what the problem could be. The rev1 template posted in this thread seemed to work correctly for me. Let me walk through the steps that I followed. Before doing anything, make sure any instances of the "HP - Toner Level" template are removed from the data and graph template pages.

1) Download the XML file from this thread.
2) Import the XML file into Cacti, make sure that there are no errors.
3) Make sure that you have created a device for your printer that you are going to monitor the toner level on.
4) Go to the new graphs page, select this device, and select "Printer - HP - Toner Level" from the graph templates dropdown. Now, click the Create button at the bottom, fill in the information and click Create again.

Wait 5 minutes and you should have a working graph. At least those exact steps worked on my 0.8.6c installation.

-Ian
Back to top
jwc0897



Joined: 15 Mar 2007
Posts: 1

PostPosted: Thu Mar 15, 2007 9:05 am    Post subject: Reply with quote

Hi, I had the same problem when I tried to import the XML file. Does anyone have an update on this? Thanks!


xml-import-error.jpg
 Description:
 Filesize:  45.9 KB
 Viewed:  3733 Time(s)

xml-import-error.jpg


Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Help: General All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group