Mupltiple outputs for custom script

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
hybrid
Posts: 4
Joined: Thu Nov 22, 2007 4:37 pm

Mupltiple outputs for custom script

Post by hybrid »

Hi all,
I'm sure this has been asked before, but I have done some searching to no avail.
I have written a custom php script to query an SQL server and return the count of records in the last 5 mins.

The script returns the following, which I assume is correct:
Inbound:0 Outbound:0

I have created a data input method for it:
Image

The script seems to be running ok:
11/23/2007 08:56:49 AM - CMDPHP: Poller[0] Host[22] DS[221] CMD: /var/www/localhost/htdocs/cacti/scripts/gis_partner_5mins.php GIS_PROD VC_T_Track_Table 'Partner1' , output: Inbound:0 Outbound:0

The documentation seems to end here at creating a data template.
http://docs.cacti.net/node/356

Here is how I have created it:
Image

Note that even though I have the check box beside partner name checked, it still requires me to enter something. Is this a bug?

Are the boxes I have checked correct?

In the data source window, there is an error:
Image

I'm kinda stuck here, so any help is appreciated.

I'm running cacti-0.8.6j
hybrid
Posts: 4
Joined: Thu Nov 22, 2007 4:37 pm

Post by hybrid »

Ok, I have kind of bluffed my way through a bit further.

I have worked out how to do the data template with two DS
Image

Now I have created my datasource:
Image

Here I added the partner name (there will be multiples) and a custom name for the Data Source.

I've created a graph template:
Image


But when I try to create a graph, I see the following:
Image
hybrid
Posts: 4
Joined: Thu Nov 22, 2007 4:37 pm

Post by hybrid »

Deleted the graphs and data sources and started again.
Seems to be ok now I think :oops:


Anyway, hopefully this might help other people.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Glad you figured it out. It's a little painful the first time for script to graph, but once one understands how everything works out, it becomes easier ;-).
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests