how use one Data template with multiple data source items ?

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
ehaha
Posts: 8
Joined: Sat Jun 02, 2007 10:44 pm

how use one Data template with multiple data source items ?

Post by ehaha »

i have a Huawei S8512 switch ,it has 4 slots . i want to use cacti for collecting cpu status by snmp.
[root@cat ~]# snmpwalk -c cacti -v 2c -m ALL *.*.*.* 1.3.6.1.4.1.2011.6.1.1
SNMPv2-SMI::enterprises.2011.6.1.1.1.2.0 = Gauge32: 6
SNMPv2-SMI::enterprises.2011.6.1.1.1.2.1 = Gauge32: 6
SNMPv2-SMI::enterprises.2011.6.1.1.1.2.2 = Gauge32: 5
SNMPv2-SMI::enterprises.2011.6.1.1.1.2.4 = Gauge32: 4
SNMPv2-SMI::enterprises.2011.6.1.1.1.2.6 = Gauge32: 10
SNMPv2-SMI::enterprises.2011.6.1.1.1.3.0 = Gauge32: 6
SNMPv2-SMI::enterprises.2011.6.1.1.1.3.1 = Gauge32: 6
SNMPv2-SMI::enterprises.2011.6.1.1.1.3.2 = Gauge32: 5
SNMPv2-SMI::enterprises.2011.6.1.1.1.3.4 = Gauge32: 5
SNMPv2-SMI::enterprises.2011.6.1.1.1.3.6 = Gauge32: 11
SNMPv2-SMI::enterprises.2011.6.1.1.1.4.0 = Gauge32: 6
SNMPv2-SMI::enterprises.2011.6.1.1.1.4.1 = Gauge32: 6
SNMPv2-SMI::enterprises.2011.6.1.1.1.4.2 = Gauge32: 5
SNMPv2-SMI::enterprises.2011.6.1.1.1.4.4 = Gauge32: 5
SNMPv2-SMI::enterprises.2011.6.1.1.1.4.6 = Gauge32: 11

The issue is this. Under 'Data Templates' I create, for the sake of
simplicity, 2 data sources. I then set the 'Internal Data Source Name'
of each 'Data Source Item'. These values stay as set.

I then go down into the 'Custom Data' section and for ds1 add the
following OID to the 'OID' textfield and hit save:
.1.3.6.1.4.1.2011.6.1.1.1.2.0

Then for ds2 I add the following OID to the 'OID' textfield and hit save:
.1.3.6.1.4.1.2011.6.1.1.1.2.1

When I go look at ds1 it now has ds2's OID and if I change it back to
the correct OID ds2 then has ds1's OID after hitting save.

My question is this. How do I get cacti to poll multiple (6) different
OIDs and place then in one rrd?

Should I change my 'Data Input Method' from 'Get SNMP Data'? If yes? what?

Thanks.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please refer to the first link of my signature. Should all be in there
Reinhard
ehaha
Posts: 8
Joined: Sat Jun 02, 2007 10:44 pm

Post by ehaha »

i had read Cacti 0.8.6 HowTo , but i don't know how do it now!

http://docs.cacti.net/node/80

there is use one Data template with one data source items .


it is not i want !
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Sorry, I assumed that this is an SNMP Index Query issue. And this one is fully explained some chapters later
Reinhard
p-smith
Posts: 3
Joined: Tue Apr 15, 2008 8:00 am

Post by p-smith »

gandalf wrote:Sorry, I assumed that this is an SNMP Index Query issue. And this one is fully explained some chapters later
Reinhard
Could you please provide the direct link to the docs section where I can find out how to use multiple (2 or more) data source items with different unique non-indexed OIDs per data source? In RRD terms, I'd like to save several different OIDs in a single RRD file and then graph them on a single graph.
I looked through many forum posts and all available docs on docs.cacti.net and still can't find an authoritative answer whether it is possible or not and how to do it. It seems to be a basic feature in MRTG and I can't find the same feature in cacti. Please help!
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Two different solutions are possible:
1) Create a single Data Template for each OID required. non-indexed SNMP OIDs today require a single Data Template per OID.
Then, create a Graph Template that combines those numbers of OIDs required for your task.
This is the most performant approach
2) Create a script that uses cacti_snmp_get to get any number of OIDs you want. Spit them out in a single line as given at http://docs.cacti.net/node/203
This requires a songle Data Template only and again a Graph Template combining those data source of the (single) Data Template.
Running scripts calling SNMP is less performant

Reinhard
p-smith
Posts: 3
Joined: Tue Apr 15, 2008 8:00 am

Post by p-smith »

gandalf wrote:Two different solutions are possible:
1) Create a single Data Template for each OID required. non-indexed SNMP OIDs today require a single Data Template per OID.
Then, create a Graph Template that combines those numbers of OIDs required for your task.
This is the most performant approach
2) Create a script that uses cacti_snmp_get to get any number of OIDs you want. Spit them out in a single line as given at http://docs.cacti.net/node/203
This requires a songle Data Template only and again a Graph Template combining those data source of the (single) Data Template.
Running scripts calling SNMP is less performant
Thanks for your reply.
Do I understand correctly, that in current cacti version the only way to have multiple OIDs stored in a single RRD file is to use a script with multiple output fields? If this is correct, is there a plan to implement an option to use different unique OIDs per each data source item in a single data template?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Your understanding is quite correct.
IMHO, such a feature request does NOT exist. But I only know about feature request of last 30 months. There's a chance that I missed sth. So please add your request
Reinhard
User avatar
TheWitness
Developer
Posts: 17061
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Well, not true. A Data Template can have as many Data Souces as you want as long as each has it's own OID in the space provided. The data input method could then be SNMP Get.

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?
KnEBeL
Posts: 14
Joined: Wed May 14, 2008 9:36 am

Post by KnEBeL »

Hello TheWitness,

i don't understand what you mean with:
..has it's own OID in the space provided.
I need a data template with more than one datasources and an own oid for each datasource.

And this is not possible to create right now with cacti 0.8.7e.

I hope you could help me to resolv this.

Regards,

Sarah
muniramb
Posts: 8
Joined: Mon Mar 26, 2012 1:38 pm

Re: how use one Data template with multiple data source item

Post by muniramb »

Hi
I am trying to achieve exactly this. Is this possible in the current version of cacti? For some reason my rrds dont get created. When i manually create my rrd, it does not run the 'Get SNMP' command. In my cacti.log, I don't see any updates to the rrd nor do I see any snmp queries.
Thanks,
munira
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests