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    


add_graphs.php select network interface

 
Post new topic   Reply to topic    Cacti Forum Index -> Help: Linux/Unix Specific
Author Message
kamal06



Joined: 24 Jun 2008
Posts: 7

PostPosted: Fri Aug 01, 2008 8:00 am    Post subject: add_graphs.php select network interface Reply with quote

Is there any possibility in Cacti to use the Data Query "SNMP - Interface Statistics" together with add_graphs.php to import just a subset of interfaces which are up?
The problem is that I can set only one pair of
-snmp-field --snmp-value

So I can say create the graphs for all interfaces which are up for example. But the result is that I also get interfaces like lo or vibr0 etc. which are up but I don't want to monitor.

What I need is something like create graphs for all interfaces which are up, but not for lo, vibr0,...

Thanks
Kamal
Back to top
Linegod
Developer


Joined: 20 Feb 2003
Posts: 502
Location: Canada

PostPosted: Sat Aug 02, 2008 4:45 pm    Post subject: Reply with quote

Since I love quick and dirty solutions, I would:

- create a bash script
- have the script do a walk of the device, getting the index, status and description from the device[0]
- pass the output through a grep for up interfaces
- passs that output through a sed to remove lo (then vibr0, etc, etc)
- pass that output through the 'add_graphs.php' script.

[0] If you are familiar with the cache, you can pull this info from the DB.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Help: Linux/Unix Specific All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group