Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


how use one Data template with multiple data source items ?

 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
ehaha



Joined: 02 Jun 2007
Posts: 7

PostPosted: Sat Oct 13, 2007 12:55 am    Post subject: how use one Data template with multiple data source items ? Reply with quote

i have a Huawei S8512 switch ,it has 4 slots . i want to use cacti for collecting cpu status by snmp.

Quote:

[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.
Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 11619
Location: Muenster, Germany

PostPosted: Sun Oct 14, 2007 1:22 pm    Post subject: Reply with quote

Please refer to the first link of my signature. Should all be in there
Reinhard
Back to top
ehaha



Joined: 02 Jun 2007
Posts: 7

PostPosted: Mon Oct 15, 2007 2:20 am    Post subject: Reply with quote

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 !
Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 11619
Location: Muenster, Germany

PostPosted: Mon Oct 15, 2007 2:55 pm    Post subject: Reply with quote

Sorry, I assumed that this is an SNMP Index Query issue. And this one is fully explained some chapters later
Reinhard
Back to top
p-smith



Joined: 15 Apr 2008
Posts: 3

PostPosted: Tue Apr 15, 2008 8:09 am    Post subject: Reply with quote

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!
Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 11619
Location: Muenster, Germany

PostPosted: Thu Apr 17, 2008 8:48 am    Post subject: Reply with quote

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
Back to top
p-smith



Joined: 15 Apr 2008
Posts: 3

PostPosted: Mon Apr 21, 2008 6:48 am    Post subject: Reply with quote

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?
Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 11619
Location: Muenster, Germany

PostPosted: Mon Apr 21, 2008 2:24 pm    Post subject: Reply with quote

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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group