Graph MS SQL Query

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
lcsmdq
Posts: 4
Joined: Wed Feb 15, 2012 2:09 pm

Graph MS SQL Query

Post by lcsmdq »

Hello, i recently install Cacti with Xampp in W7, and i want to graph a sql query.
The query give me time and value, wich is the most usefull template and how to use to resolve my graph.

Thanks...
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Graph MS SQL Query

Post by BSOD2600 »

Start by reading the examples in http://docs.cacti.net/
lcsmdq
Posts: 4
Joined: Wed Feb 15, 2012 2:09 pm

Re: Graph MS SQL Query

Post by lcsmdq »

well i reading some how to`s and information, i create a php scrip to conect MS SQL and follow that steps

Create a Data Input Method to tell Cacti how to call the script and what to expect from it.
Create a Data Source to tell cacti how and where the data will be stored.
Create a Graph to tell cacti how the data will be presented in graph form.
Add Graph to Graph View so you can view the graph.
View the Graph

but, i have an error in graph manager create a new graph, tur on debug mode and cati say:
RRDTool Command:

c:/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="VALUES GRAPH" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--units-exponent="0" \
--vertical-label="value" \
--slope-mode \
--font TITLE:10: \
--font AXIS:7: \
--font LEGEND:8: \
--font UNIT:7: \
DEF:a="C\:/xampp/htdocs/cacti/rra/values_9.rrd":values:AVERAGE \
LINE2:a#FF0000FF:"" \
GPRINT:a:LAST:"%8.2lf %s"

RRDTool Says:

ERROR: opening 'C:/xampp/htdocs/cacti/rra/values_9.rrd': No such file or directory

who i did wrong????

thank a lot!!!
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Graph MS SQL Query

Post by BSOD2600 »

You need to start with the basics and find where the process has broken down.
1) does your script return data when ran under the Scheduled task user's account?
2) Is cacti able to execute the script and returns data? Debug logging of cacti.log is very useful...

Once those questions are answered, then you can proceed to why this specific graph isnt working.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest