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    


gather specific data via snmp

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



Joined: 24 Apr 2008
Posts: 2

PostPosted: Thu Apr 24, 2008 4:53 am    Post subject: gather specific data via snmp Reply with quote

hi,
i know that i can wrote a script which outputs for example TotalMemory, Free and Used using multiple output field.

but i don't know how to prepare xml file for snmp, to gather the same parameters - could anyone put some example?

let's say i want to use snmget for gather value for 2-3 OID

thanks,
Adam
Back to top
gandalf
Developer


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

PostPosted: Thu Apr 24, 2008 1:46 pm    Post subject: Reply with quote

Nogo.
A Script can be used for a single output or a multiple output.
A "GEneral SNMP OID" Method can be used for a single OID only.

For both scripts and SNMP, Data Query exists. But they work on table structures only!

Two solutions possible:
- Write a script that wraps multiple SNMP calls (ugly and slow).
- use a single "SNMP OID" method for each OID.
I prefer the second one. It's faster and offers more flexibility. And space usgae does not differ from the first one
Reinhard
Back to top
arzadkowolski



Joined: 24 Apr 2008
Posts: 2

PostPosted: Fri Apr 25, 2008 3:31 am    Post subject: Reply with quote

so the best solution is to create 2 datasources for 2 different OIDs and draw them on single graph...

but is there a way to put these oids in some xml file or the only way is to gather data by the script ?
Back to top
gandalf
Developer


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

PostPosted: Fri Apr 25, 2008 2:44 pm    Post subject: Reply with quote

arzadkowolski wrote:
so the best solution is to create 2 datasources for 2 different OIDs and draw them on single graph...
Yes

Quote:
but is there a way to put these oids in some xml file or the only way is to gather data by the script ?
No need to do so. Just create two copied of the "Generic SNMP OID" Data Template and use the correct OIDs. This is shown at the first link of my sig
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