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 to configure CACTI for single oid but multiple values

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



Joined: 16 May 2008
Posts: 2

PostPosted: Fri May 16, 2008 5:15 am    Post subject: How to configure CACTI for single oid but multiple values Reply with quote

Hi,
I need to configure CACTI for a script which will return multiple values and want to use those individual values to create graphs.

Actually the requirement is to fetch some RAM memory usage for each zone in one server.
We have created the script and run through snmpwalk with following command

snmpwalk -c public -v 1 -O n localhost 1.3.6.1.4.1.2021.8.1.101

Where 1.3.6.1.4.1.2021.8.1.101 is single oid whcih we want to use in CACTI also.

The output of this command is.

.1.3.6.1.4.1.2021.8.1.101.2.1 = STRING: zone_load
.1.3.6.1.4.1.2021.8.1.101.3.1 = STRING: /etc/ram_mem_ind.sh
.1.3.6.1.4.1.2021.8.1.101.100.1 = Wrong Type (should be OCTET STRING): INTEGER: 0
.1.3.6.1.4.1.2021.8.1.101.101.1 = STRING: cae1.lit.sfr
.1.3.6.1.4.1.2021.8.1.101.101.2 = STRING: 2338671403.04
.1.3.6.1.4.1.2021.8.1.101.101.3 = STRING: cae1.nit.sfr
.1.3.6.1.4.1.2021.8.1.101.101.4 = STRING: 3338671403.04
.1.3.6.1.4.1.2021.8.1.101.101.5 = STRING: cc1.lit.sfr
.1.3.6.1.4.1.2021.8.1.101.101.6 = STRING: 3338671403.04
.1.3.6.1.4.1.2021.8.1.101.101.7 = STRING: cc1.nit.sfr
.1.3.6.1.4.1.2021.8.1.101.101.8 = STRING: 6338671403.04
.1.3.6.1.4.1.2021.8.1.101.101.9 = STRING: cre1.lit.sfr
.1.3.6.1.4.1.2021.8.1.101.101.10 = STRING: 4338671403.04
.1.3.6.1.4.1.2021.8.1.101.101.11 = STRING: cre1.nit.sfr
.1.3.6.1.4.1.2021.8.1.101.101.12 = STRING: 4338671403.04
.1.3.6.1.4.1.2021.8.1.101.101.13 = STRING: cre2.lit.sfr
.1.3.6.1.4.1.2021.8.1.101.101.14 = STRING: 338671403.04
.1.3.6.1.4.1.2021.8.1.101.101.15 = STRING: cre3.lit.sfr
.1.3.6.1.4.1.2021.8.1.101.101.16 = STRING: 338671403.04
.1.3.6.1.4.1.2021.8.1.101.101.17 = STRING: global
.1.3.6.1.4.1.2021.8.1.101.101.18 = STRING: 3338671403.04

We want to use these RAM usage(ex: 2338671403.04, 3338671403.04 etc) for each zone (ex:cae1.lit.sfrcreate,cae1.nit.sfr etc) to create the graphs.

Please help to configure this situation in CACTI where multiple values are returned for single oid.
Back to top
gandalf
Developer


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

PostPosted: Sun May 18, 2008 8:09 am    Post subject: Reply with quote

Please post the result of running the script on the remote host. I suppose it's a multiline output message.
Of course, you may write a script that runs snmpwalk against that oid and cathes the results to format them in the way cacti needs them (parm:value pairs with whitespace in between).
Reinhard
Back to top
sughose



Joined: 16 May 2008
Posts: 2

PostPosted: Mon May 19, 2008 12:18 am    Post subject: Re:How to configure CACTI for single oid but multiple values Reply with quote

Hi,
We are not being able to understand the replies that you have posted.
I think running the script with local host instead of remote host does not make any difference.
As you have written that it is possible to configure cacti with single oid which will return the result in multiple rows and cathes the results to format them in the way cacti needs them "(parm:value pairs with whitespace in between). "

What type of script do we have to write in to map this situation(single oid returning multiple values and those values have to be fetched in a single call)
We are very much new in CACTI ,so if you can please elaborate the sollution with the screen shot of CACTI, it will be easier for us to understand.

Back to top
gandalf
Developer


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

PostPosted: Mon May 19, 2008 8:46 am    Post subject: Reply with quote

Well, I see that your example runs /etc/ram_mem_ind.sh against localhost. But I suppose, this is for testing only. It would not make sense to call a script via SNMP if it ONLY runs locally.
So I suppose, you will copy that script to a remote host and run SNMP against that remote host to make it call the script and return data via SNMP.

What I asked you to do is to call /etc/ram_mem_ind.sh natively and post results. If my assumptions are wrong, please let me know as well
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