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    


mySNMP - SNMP-Tools for Cacti

 
Post new topic   Reply to topic    Cacti Forum Index -> Plugin Announcements
Author Message
kyosanim



Joined: 05 Apr 2007
Posts: 32

PostPosted: Wed Feb 13, 2008 12:52 pm    Post subject: mySNMP - SNMP-Tools for Cacti Reply with quote

My first selfmade plugin!

Its a little but useful tool. i'am using it at work to get information from hundreds of routers.
maybe it is useful for you too.

----[ Requirements

Perl, Perl:DBI, Net-SNMP, Cacti >= 0.8.7

----[ Features

- Simple SNMP-GET and SNMP-WALK-Querys per Webinterface
- Host-filter for customized requests
- Export function to Exel (xls)
- Adding own ODIs to Database


please give me feedback...
regards
kyosanim



mySNMP.rar
 Description:

Download
 Filename:  mySNMP.rar
 Filesize:  35.49 KB
 Downloaded:  172 Time(s)



Last edited by kyosanim on Fri Feb 22, 2008 2:47 pm; edited 2 times in total
Back to top
kyosanim



Joined: 05 Apr 2007
Posts: 32

PostPosted: Fri Feb 22, 2008 9:01 am    Post subject: Reply with quote

don't be shy -
feedback would be nice
Back to top
fmangeant
Cacti Guru User


Joined: 19 Sep 2003
Posts: 2325
Location: Sophia-Antipolis, France

PostPosted: Fri Feb 22, 2008 9:09 am    Post subject: Reply with quote

Hi

nice plugin

I have an error running it with Cacti 0.8.7b and plugin arch 2.0 :
Code:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/cactiuser/cacti-0.8.7b/plugins/mySNMP/mySNMP.php on line 269

when going to the "mySNMP" tab, and
Code:
Notice: Undefined index: mySNMP.php:actions in /home/cactiuser/cacti-0.8.7b/lib/functions.php on line 1634

when running a walk.
Back to top
fmangeant
Cacti Guru User


Joined: 19 Sep 2003
Posts: 2325
Location: Sophia-Antipolis, France

PostPosted: Fri Feb 22, 2008 9:21 am    Post subject: Reply with quote

Oops, I forgot to import database.sql

But it returns an error :
Code:
$ mysql cacti -p < database.sql
Enter password:
ERROR 1062 (23000) at line 46: Duplicate entry '0' for key 1
Back to top
kyosanim



Joined: 05 Apr 2007
Posts: 32

PostPosted: Fri Feb 22, 2008 10:41 am    Post subject: Reply with quote

thanks for your reply...
i think i have a little mistake in the "insert"-part.

i will correct it and post a working one


---update ---
here is the fixed database-file



database.sql.txt
 Description:

Download
 Filename:  database.sql.txt
 Filesize:  2.11 KB
 Downloaded:  170 Time(s)

Back to top
fmangeant
Cacti Guru User


Joined: 19 Sep 2003
Posts: 2325
Location: Sophia-Antipolis, France

PostPosted: Mon Feb 25, 2008 5:46 am    Post subject: Reply with quote

Thanks, the new .sql file imports correctly.
Back to top
airwalk
Cacti User


Joined: 18 Aug 2006
Posts: 103
Location: MSK, RU

PostPosted: Thu Mar 13, 2008 6:23 am    Post subject: Reply with quote

I get the follwoing error after clicking "Yes" on the page saying "To start the SNMP-Get, press the "yes" button below."


Notice: Undefined variable: version in C:\cacti\plugins\mySNMP\mySNMP.php on line 166

Warning: Cannot modify header information - headers already sent by (output started at C:\cacti\plugins\mySNMP\mySNMP.php:166) in C:\cacti\plugins\mySNMP\mySNMP.php on line 188

What could be the problem.
Cacti is 0.8.7a
Plugin Arch is 1.4
Back to top
dave99



Joined: 17 Mar 2006
Posts: 19

PostPosted: Thu Mar 13, 2008 6:35 pm    Post subject: Reply with quote

fmangeant wrote:
Hi

Code:
Notice: Undefined index: mySNMP.php:actions in /home/cactiuser/cacti-0.8.7b/lib/functions.php on line 1634

when running a walk.

I'm getting this same error.
Back to top
kyosanim



Joined: 05 Apr 2007
Posts: 32

PostPosted: Mon Mar 17, 2008 10:11 am    Post subject: Reply with quote

on line 166 the script starts the snmp get/walk.
what snmp version does the device use?
at the moment mySNMP only supports v2c and v1.

please check if snmp version is correct and if community is set correctly.

@dave99 - i have not tested on a cacti 0.8.7b yet. i will check this out.
Back to top
Dyr



Joined: 10 Sep 2007
Posts: 8

PostPosted: Wed Apr 30, 2008 8:58 am    Post subject: Reply with quote

kyosanim, would be much better, if you'll take all db-related stuff (like password, login etc) from standart include/config.php. It's not such hard, isn't it?
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Plugin Announcements All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group