Multiple output fields, one graph

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

Moderators: Developers, Moderators

Post Reply
Norm
Posts: 5
Joined: Thu Aug 18, 2005 4:26 pm

Multiple output fields, one graph

Post by Norm »

I'm beginning to configure Cacti, and I'm sure I'm not the only one who's very impressed, but a bit confused once I leave the comfort of the built-in templates...

Here's my question: I've got a script that spits out the number of users in each of our VLANs. I believe I've correctly turned this into a data input method with seven output variables, one per VLAN. I'm passing the hostname to the script as a parameter, which is handy.

I think I've got a data source configured. I tied my script to a given device.

Now when I create a graph, I'm was hoping to see my seven output variables as data sources to create lines; however, it's not breaking them out individually.

Am I going about this the wrong way? What's the best way to take multiple outputs from a script and graph them together on the same graph?

Thanks for any advice,

Norman
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Can you post some screen shots of script output, Data Input method and your Data Source Template?
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Norm
Posts: 5
Joined: Thu Aug 18, 2005 4:26 pm

Post by Norm »

Thanks for the reply. Here's my script output...

Code: Select all

100:2005
128:34
144:86
160:26
176:24
200:938
520:135
I've attached pictures of my data input method, my data source, and my graph items screens.

Ideally, I'd like to automatically graph whatever rows the script outputs. I'd settle for having to manually configure the rows for now.

Thanks again for any advice,

Norman
Attachments
data_input_method.GIF
data_input_method.GIF (24.34 KiB) Viewed 979 times
data_source.GIF
data_source.GIF (36.59 KiB) Viewed 979 times
graph_items.GIF
graph_items.GIF (20.28 KiB) Viewed 979 times
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

I would make this a data query because you never know what the vlan numbering will be. The beauty of a data query is that the values can change from switch to switch and your query works just as well on each.

Of course it would have to be a custom script based data query such as ss_host_disk.php.

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?
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

For every output field you have, you need a Data Source Item in your Data source. Then you can select the appropriate "Output Field" at the bottom of the Data Source Item section.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Norm
Posts: 5
Joined: Thu Aug 18, 2005 4:26 pm

Post by Norm »

Now I see where you configure the output field per data source, so it looks like I've got things straightened out. Thanks.

It appears; however, that my script is being run once per data source. Is there a way to configure it to run once, and the output be parsed for each data source?

Thanks,

Norman
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests