SNMPTT/SYSLOG viewer Plugin for Cacti. v 1.4.3 (2009/02/06)

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
lints
Cacti User
Posts: 107
Joined: Thu Nov 08, 2007 2:00 pm
Location: Ottawa, Canada

Post by lints »

So, I tinkered a little more with this, and I figured out that there's something weird with the way that the 'manage' plugin works and it was causing grief with snmptt.

I had 'manage' installed but disabled and that seems to have caused the issue. the second I un-installed it SNMPTT started working.
lints
Cacti User
Posts: 107
Joined: Thu Nov 08, 2007 2:00 pm
Location: Ottawa, Canada

Post by lints »

Is there any way to change the default columns that show in the traps list.

The default columns are: Description, EventName, HostName, Severity, Trap Time and Format Line.

Is there a way to change these columns by default instead of having to change it each time I reload the page?
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

lints, columns order, sort, and column view are auto stored in cookies/php_variables and restored after every page reload (F5) and even browser reopen.
computer_guru
Cacti User
Posts: 141
Joined: Thu Apr 10, 2008 6:52 pm

recommended change for alphabetical tree view

Post by computer_guru »

FYI, for alphabetical tree view. In file "lib/snmptt_ext_functions.php"

change line 39 as follows:

*****Before*******
$tree_lists = db_fetch_assoc("SELECT * FROM plugin_snmptt_tree order by device_type_name, agentip, eventname ");

*****After*****
$tree_lists = db_fetch_assoc("SELECT * FROM plugin_snmptt_tree order by hostname, agentip, eventname ");

This give me a much more usable tree view.
computer_guru
Cacti User
Posts: 141
Joined: Thu Apr 10, 2008 6:52 pm

what?

Post by computer_guru »

gthe said, "I am recheck rules and it work good. The problem (may be) - сorrect rule creating. So, at all who has problems with rules, - spread sql line with a trap and rule here (or at PM). "

what does this part mean, "spread sql line with a trap and rule here (or at PM). " ??

Can you post another screen shot of a functioning rule that works by keyword instead of event and for multiple hosts instead of a single host?
computer_guru
Cacti User
Posts: 141
Joined: Thu Apr 10, 2008 6:52 pm

Make rules work!!

Post by computer_guru »

If your alerts / rules are not emailing you from SNMPTT then try replacing the file lib/snmptt_functions.php with the one attached to this post.
Attachments
snmptt_functions.zip
modified version of file that has updated function (snmptt_create_where_sql)
(6.41 KiB) Downloaded 151 times
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

computer_guru, thanks. I add this patch to next version.
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

And here is new version in first post.

--- 1.1.0rc ---
  • - Rebuild "Add/Edit rule" window;
    - Ability to test rule (show traps which will be alerted);
    - Create rule based on traps;
    - "Show full traps info" window;
    - Added patch to snmptt_create_where_sql (thanks computer_guru);
    Minor updates:
    - Correct tree state save again;
    - Improve search filters;
    - im Traps and UnkTraps grid add css to wrap FormatLine row;
    - Maintain scroll position when store is reloaded;
    - Added stripeRows for Grids;
    - All actions column moved to left side of grid;

    * after update delete /lib/snmptt_ext_functions.php file.
computer_guru wrote: what does this part mean, "spread sql line with a trap and rule here (or at PM). " ??
Thats mean: Post you sql row for trap and rule, like radiumfu in some posts ago.
computer_guru wrote: Also I think it is very strange that I can't double click on a trap and see the complete information in a popup window. It seems like a very simple feature that would have been incorporated in the first version. Can I make a request for that to be added in the next version?
Done.
mandor101
Posts: 8
Joined: Wed Jun 13, 2007 8:51 am

Post by mandor101 »

Thanks for all the hard work on this plugin!

Just installed 1.0.1rc and getting an error on the progress bar when adding a rule:

HTTP is complaining about a wrong path

File does not exist: /var/www/html/plugins/resources, referer: https://x.x.x.x/plugins/snmptt/css/xtheme-slate.css

Looked in xthem-slate.css and did find an error:

/* Progress Bar */

.x-progress-bar{
background:#9CBFEE url( ../../resources/images/slate/progress/progress-bg.gif ) repeat-x left center;
border-top:1px solid #ddd;
border-bottom:1px solid #ddd;
}

I changed (../../resources/images/slat/progress/progress-bg.gif) to (../images/slate/progress/progress-bg.gif) but still not working...any other ideas...
computer_guru
Cacti User
Posts: 141
Joined: Thu Apr 10, 2008 6:52 pm

thanks.

Post by computer_guru »

Thanks gthe for all of your hard work. This plugin is getting better everyday.
westside
Posts: 4
Joined: Fri Nov 07, 2008 2:38 pm

Add Unknown Trap to Traps Section

Post by westside »

It would be nice to have a button to force traps from the unknown section into the TRAPS section, if that would be possible, or at least be able to email alert from the unknown traps section.
computer_guru
Cacti User
Posts: 141
Joined: Thu Apr 10, 2008 6:52 pm

I agree

Post by computer_guru »

I agree with westside. Sometimes MIB support can leave something to be desired. Being able to get alerts on unknown traps is an important feature. Being able to move them would be an added perk.
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

mandor101 wrote: .....
I changed (../../resources/images/slat/progress/progress-bg.gif) to (../images/slate/progress/progress-bg.gif) but still not working...any other ideas...
Fixed, Thanks.

Does error still exist ?
computer_guru wrote:Being able to get alerts on unknown traps is an important feature.
I need time to work with it.
computer_guru wrote: Being able to move them would be an added perk.
Cacti plugin can't do it. It is possible only for snmptt program.
computer_guru
Cacti User
Posts: 141
Joined: Thu Apr 10, 2008 6:52 pm

More Tips and a Tutorial

Post by computer_guru »

Changing the Unknown MySQL table in Snmptt.ini to the regular traps table solved the problem with unknown traps. I believe that alerting on unknown traps is working now.

A college of mine did mention that it would be nice for the TrapOid column from MySQL to be included in the alert emails. Maybe a more appropriate solution would be for the snmptt options screen in cacti to include some email options. Like what columns to include in an email.


FYI, I have also created a CactiEZ / SNMPTT tutorial:
http://paulscomputerservice.net/article ... .php?ID=50
gumis
Posts: 10
Joined: Sun Nov 09, 2008 9:39 am

Post by gumis »

First of all I need to say thank for great work.

I've just installed fresh install of snmptt plugin for cacti + snmptt perl script and snmptrapd on my Debian etch server. Almost everything seams to work fine except adding new rules in SNMPTT. As soon as I press on the 'Save' button in 'Add new rule' window it displays 'Processing...' info window and freezes the whole SNMPTT tab. I then need to go to Console or Graphs tab and then go back to SNMPTT. Ofcourse nothing is being saved...

Does anyone know what am I doing wrong?

ps.
- no errors in apache2 logs
- no errors in cacti.log
- no errors in mysql.log
Attachments
snmptt1.1.0_not_responding (Medium).JPG
snmptt1.1.0_not_responding (Medium).JPG (53.53 KiB) Viewed 4492 times
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests