SQL Queries Result Graphs (Plugin + Templates + Script)

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

aboyz
Cacti User
Posts: 56
Joined: Fri Jan 18, 2008 7:09 pm

my log

Post by aboyz »

here is what is in my cacti log.
01/20/2008 12:25:02 AM - CMDPHP: Poller[0] Host[6] DS[40] WARNING: Result from CMD not valid. Partial Result: File does not exist

What does that mean anyone know. I click on the DS and it show this.
Selected Data Template: MySQL - 5 Count Queries
Host - 192.168.1.111
Database Port: 3306
MySQL Username: cacti
MySQL Password: cacti
Query Filename - oscom.sql

Anything wrong with that config file? please let me know thanks. or anything else I should look at?

thank you for your help!!
web_rene
Posts: 21
Joined: Fri Apr 20, 2007 5:31 am
Contact:

Post by web_rene »

'File does not exist' usually means that the File does not exist.

As it seems, the Cactipoller doesn't find the script.
Make sure it is placed in the cacti scripts folder.
ceyounger
Posts: 44
Joined: Fri Feb 10, 2006 2:59 pm
Location: Orange County, CA
Contact:

Post by ceyounger »

web_rene wrote:'File does not exist' usually means that the File does not exist.

As it seems, the Cactipoller doesn't find the script.
Make sure it is placed in the cacti scripts folder.
Someone posted earlier and I found this too, you need to edit the mysql_query.php and hardcode the directory for query files instead of allowing the "../plugins/sqlqueries/queries/" to try and path it from your cacti variable.

This fixes the file not found error, but I'm having other issues--like the PHP scripts doesn't seem to want to run; even from the CLI.

Oh well...
web_rene
Posts: 21
Joined: Fri Apr 20, 2007 5:31 am
Contact:

Post by web_rene »

The Problem is, that the script is designed for MySQL connects and not for MSSQL connects.
ceyounger
Posts: 44
Joined: Fri Feb 10, 2006 2:59 pm
Location: Orange County, CA
Contact:

Post by ceyounger »

web_rene wrote:The Problem is, that the script is designed for MySQL connects and not for MSSQL connects.
Hehe, I was trying to get that to work too. Then I uncovered the massive plot of M$ to prevent *NIX from querying SQL 2005.

All I need is to run queries from php and graph them in Cacti! Argh!

Chris
ejensen
Cacti User
Posts: 55
Joined: Mon Jul 12, 2004 11:39 am

Post by ejensen »

so is it possible to use this plugin to query MSSQL databases?
ceyounger
Posts: 44
Joined: Fri Feb 10, 2006 2:59 pm
Location: Orange County, CA
Contact:

Post by ceyounger »

ejensen wrote:so is it possible to use this plugin to query MSSQL databases?
Not to my knowledge--at least not a way I know of.

I ended up having my DBAs create a replication job send the data I want to query from MSSQL to MySQL on my Cacti box. Then I can query to my heart's content and the DBAs only have to set it up once.

Not the greatest solution but it works like a charm for my purposes!
MikeS
Posts: 2
Joined: Thu May 22, 2008 2:07 am

Post by MikeS »

I'd really like to be able to get this script to work with SQL 2005.

I want to monitor several resultsets from an SQL 2005 query.

Are there any plugins like this MySql one that can help?

I have also tried to get this MySql to work and cannot get it to appear on my console.

Any guidance would be appreciated!

Cacti:
Cacti Version 0.8.7b
Cacti OS win32
SNMP Version net-snmp
RRDTool Version RRDTool 1.2.x
PHP Version 5.2.6
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

TheWitness wrote:I have rethought my position. However, I want this to be core. Are you prepared to take development direction and are you prepared to sign off on GPL?

Regards,

TheWitness
Is there are any rezult ?
Right now I have mysql table and want graph data from it. But getting each field data cause script run. Soo after I add only 100 rows with 7 fields and host polling process runtime grow to 130-170 sec.
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

gthe wrote:
TheWitness wrote:I have rethought my position. However, I want this to be core. Are you prepared to take development direction and are you prepared to sign off on GPL?

Regards,

TheWitness
Is there are any rezult ?
Right now I have mysql table and want graph data from it. But getting each field data cause script run. Soo after I add only 100 rows with 7 fields and host polling process runtime grow to 130-170 sec.
Nope, I'm pretty busy with other things. I do database queries for over a dozen different Data Query and Graph Template based SQL calls. The method is use is to utilize Script Server Scripts.

In one case alone, I have over 80k Data Sources being obtained this way in less than 60 seconds. When your database is local, you can scale incredibly using the Script Server and a simple PHP script to hit your SQL targets.

Therefore, the need for this in core is diminished from my point of view. The work around is quite solid.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
querter
Posts: 2
Joined: Wed Oct 14, 2009 3:59 pm

Post by querter »

Nope, I'm pretty busy with other things. I do database queries for over a dozen different Data Query and Graph Template based SQL calls. The method is use is to utilize Script Server Scripts.
care to show us how this works?

----------------------------------------------------

I'm having the same problem as aboyz had:
SQL Queries does not show up in the console-tree.

Could someone please help?

(cacti 0.8.7e - Plugin Architecture 2.5)
querter
Posts: 2
Joined: Wed Oct 14, 2009 3:59 pm

Post by querter »

i konw:
r.t.f.m.!!!

http://cactiusers.org/wiki/PluginTips gave me the hint to set permission in "user management"
dmaz99
Posts: 1
Joined: Thu Sep 22, 2011 5:21 pm

Re: SQL Queries Result Graphs (Plugin + Templates + Script)

Post by dmaz99 »

Does this plugin (or something like it) still exist? I can't find it in the Cacti list of plugins or templates, and all Google finds me are plugins that monitor mysql itself. I need to monitor the results of custom queries.

Thanks,
Drew
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: SQL Queries Result Graphs (Plugin + Templates + Script)

Post by TheWitness »

Search for the WMI plugin. It's a bit slow, but works. Use can also user snmp-informants SNMP agent (paid), and then there are lot's of SQL statistics there as snmp OID's.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
suntinaz
Posts: 1
Joined: Tue Jan 08, 2013 1:26 am

Re: SQL Queries Result Graphs (Plugin + Templates + Script)

Post by suntinaz »

hi im trying to connect my ms sql server and Apache open office base
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests