What's the difference in all the "Data Input Methods"?

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

Moderators: Developers, Moderators

Post Reply
Dunkirk
Posts: 7
Joined: Tue Oct 19, 2010 2:55 pm

What's the difference in all the "Data Input Methods"?

Post by Dunkirk »

I've Googled this till I'm blue in the face, but I can't find any definitive documentation as to the differences between all of these:

Data Input Methods
---------------------------
SNMP
SNMP Query
Script/Command
Script Query
Script - Script Server
Script Query - Script Server

Data Queries
---------------------------
Script Data
Script Server Data
SNMP Data

I suppose the biggest hindrance to my being able to understand this situation is that, out of the 3 types of "Data Queries", there are two types of examples out of the box, and out of the SIX types of "Data Input Methods", there is only ONE type of example. What are the differences between them? A good example for each one would be awesome. How does adding "query" to the end of "snmp" and "script" change them? I think I understand the concept of a "script server," but I can't get my head around a good reason why I'd want to use one.

I understand that this has been asked several times before. The best I can come up with is a pointer back to the documentation. I've read all of that. I still don't understand. The only really good example in there is about an SNMP Data Query (which I've used to great effect). There must be a reason that someone took the time to make each of these other options in the program, and respond differently to each one in the code. The best way I can ask the question is this:

WHAT PROBLEM ARE EACH OF THESE DESIGNED TO SOLVE?

OTOH, if someone just wants to cut to the chase, my problem is this: I need to grab a half dozen SNMP OID's (NON-indexed) from a piece of equipment, and I'd like to chart them all on the same graph. (Specifically, I want to grab voltage and current from all 3 phases of a PDU.) What's the best way to go about this? I'm sorry I'm stupid, but I've been searching for hours, and I still can't figure out which method I should use!
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: What's the difference in all the "Data Input Methods"?

Post by gandalf »

Please see 1st link of my sig for some explanations. Briefly:

Data Input Method == Scrip/Command = your script fetches the data
Script Server = script based, like the above. But script server "caches" the code and preloads php. This way, it gives you faster execution.

SNMP = uses SNMP to fetch the data. Pure SNMP fetches a single OID
SNMP Query = uses SNMP, like the above, but this is used for fetching data from an SNMP table (this situation applies e.g. to standard interface traffic which fetches data from the SNMP interface table)

Script Query = uses your script, but like SNMP Queries applies to data structured organized like SNMP tables
Script Server Query = uses your script, runs under script server and applies to table structures

Reinhard
Dunkirk
Posts: 7
Joined: Tue Oct 19, 2010 2:55 pm

Re: What's the difference in all the "Data Input Methods"?

Post by Dunkirk »

Thanks so much for a quick and helpful reply! It sounds like I need a script query for my next task. I'll go ahead and give this a whirl!
Dunkirk
Posts: 7
Joined: Tue Oct 19, 2010 2:55 pm

Re: What's the difference in all the "Data Input Methods"?

Post by Dunkirk »

Again, I just need to grab a half dozen OID's from a piece of equipment. They are NOT indexed. From your post, I was thinking that I needed a "Script Query." However, when I read http://docs.cacti.net/manual:087:3a_adv ... alkthrough, it's clear that "Script Queries" are designed -- again -- for INDEXED data.

So, again, I'm confused as to the difference between a "Script Query" and an "SNMP Query". Can you speak to this?

I guess what I need is just a "Script/Command"? That's what I'll investigate next...
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: What's the difference in all the "Data Input Methods"?

Post by gandalf »

Queries always refer to sth that is indexed like a table.
SNMP will access that data by using SNMP requests. No programming required. Quite easy stuff.
Scripts will access that data by using some script (a program written in your favorite programming language). You may even use a Script in case you need some postprocessing on data you originally fetched via an SNMP call.

If you are NOT accessing a table, all types of QUERIES won't help!
If you e.g. want to fetch multiple values that are NOT part of a table, a SCRIPT is required that spits out e.g.
name1:1234 name 2:2345 name3:3456

R.
Dunkirk
Posts: 7
Joined: Tue Oct 19, 2010 2:55 pm

Re: What's the difference in all the "Data Input Methods"?

Post by Dunkirk »

Excellent! I don't mean to clutter the board with "thanks," but that's exactly the sort of disambiguation I needed.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: What's the difference in all the "Data Input Methods"?

Post by gandalf »

Dunkirk wrote:Excellent! I don't mean to clutter the board with "thanks,"
Oh, I'm satisfied with "excellent" as well :wink:
R.
Deele
Posts: 37
Joined: Thu Nov 25, 2010 9:15 am
Location: Latvia, Riga

Re: What's the difference in all the "Data Input Methods"?

Post by Deele »

Dunkirk, so, what was your tactics to achieve a graph with different non-indexed OID's? I'm on the same problem now, and cursing Cacti developers, for not creating another XML-driven data input, where it doesn't need any index, it just reads given OID's and ready!
So, as I understood, I need to use some script, that generates some sort of output. What that output should be? Like the one from SNMP-walk?

Code: Select all

SNMPv2-SMI::mib-2.33.1.4.4.1.2.1 = INTEGER: 233
SNMPv2-SMI::mib-2.33.1.4.4.1.2.2 = INTEGER: 233
SNMPv2-SMI::mib-2.33.1.4.4.1.2.3 = INTEGER: 233
SNMPv2-SMI::mib-2.33.1.2.5.0 = INTEGER: 2720
SNMPv2-SMI::mib-2.33.1.4.4.1.5.1 = INTEGER: 1
SNMPv2-SMI::mib-2.33.1.4.4.1.5.2 = INTEGER: 1
SNMPv2-SMI::mib-2.33.1.4.4.1.5.3 = INTEGER: 2
SNMPv2-SMI::mib-2.33.1.3.3.1.2.1 = INTEGER: 500
SNMPv2-SMI::mib-2.33.1.3.3.1.2.2 = INTEGER: 500
SNMPv2-SMI::mib-2.33.1.3.3.1.2.3 = INTEGER: 500
Why is it so, that it is not documented, if that is mentioned as "There are different ways for Cacti to retrieve data, the most popular being through an external script or from SNMP. " (link). If I'm looking in wrong section, please, give me a pointer to correct documentation part. Thanks!
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: What's the difference in all the "Data Input Methods"?

Post by gandalf »

You can do this through a script, yes.
But the preferred and faster method is using the "generic SNMP OID" template as a copy, see e.g. http://docs.cacti.net/manual:087:3_temp ... a_template
You will have to use a copy for each OID
R.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests