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

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

niobe wrote:Hi gthe,

I created a few different .conf files use MIB packs from different vendors. Since these are not perfect and some re-include the standard RFC MIBS no doubt there are duplicates.

Is there a way for snmptt to find and avoid these duplicates itself?
from snmptt site:

Code: Select all

Q:  Each trap received is being logged multiple times. Why?

A:  There are a few possible reasons for this.

    * The device is sending the trap multiple times. If the device is running Net-SNMP's agent (snmpd), make sure there is only ONE trapsink, trap2sink or informsink line in snmpd.conf. If you are sending the trap using SNMP V1, use trapsink. For SNMP V2, use trap2sink. For SNMP V3, use informsink. Having both a trapsink and a trap2sink for example will cause snmpd to send the trap twice. Once using SNMP V1 and once using SNMP V2. It is possible that snmpd is loading multiple snmp.conf files. Start snmpd using snmpd -f -Dread_config to see what configuration files are being loaded.
    * Snmptrapd is passing the trap to SNMPTT multiple times. Ensure there is only one traphandle statement in snmptrapd.conf. It is possible that snmpdtrapd is loading multiple snmptrapd.conf files. Start snmpdtrapd using snmpd -f -Dread_config to see what configuration files are being loaded.
    * There is more than one EVENT line defined in one or more snmptt.conf files for the trap and multiple_event is enabled in snmptt.ini. To find all duplicate EVENT entries, run snmptt --dump
run snmptt --dump
niobe wrote: But I think even half as many traps coming in is still quite a few, so performance could still be a concern.
Do you have new rows in mysqld_slow.log with new (0.1.22b) version ?
steffenn
Posts: 19
Joined: Fri Jun 23, 2006 11:07 am
Location: Munich

SNMPTT Plugin - db-scheme plugin_snmptt_statistics

Post by steffenn »

Hello,

Where can we get the db-scheme from "plugin_snmptt_statistics" table.
It's not included in the snmptt package nor in the plugin package.

Maybe ists the reason that the plugin doesnt work at our installation, because the table doesnt exist and will not be created with the plugin installation.

1 hint to them, having problems with dupplicate traps: Avoid the use of NetSNMP v5.3. We use v5.4 and after elemating all other causes for trap dupplication, mentioned at this forum thraeds, it should be gone.

Steffen
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

steffenn, Can you post you's hostinfo ?
joez
Posts: 34
Joined: Mon Feb 11, 2008 7:03 am

Post by joez »

I love this plugin, it is working great!!

Just one note to the installation: you HAVE to create the tables for sql logging yourself, but it is very easy, just follow the steps http://snmptt.sourceforge.net/docs/snmp ... ngDatabase.

The manual there describes how to create an OWN database for snmptt, the first post in this thread is using the cacti database plus adding the required tables, so dont switch off your brain when doing the steps ;)

Be careful: all table names must be changed to a leading "plugin_" when configuring your .ini according to the first post in this thread.

However I have a few questions myself:

Is there a way to limit the disk space of the logged traps in the database (syslog plugin does that I think) so old traps will be deleted accordingly?

The trap description under "formatline" is truncated. How can I have the full description of the trap there, as this is very useful?

Thanks
joez
eternal
Cacti User
Posts: 68
Joined: Thu Dec 14, 2006 4:38 pm
Location: Kingsport TN
Contact:

Post by eternal »

Purging not working here,

Also can you set default view to be the latest?
steffenn
Posts: 19
Joined: Fri Jun 23, 2006 11:07 am
Location: Munich

i

Post by steffenn »

gthe, here is the hostinfo
Cacti Version - 0.8.7b
Plugin Architecture - 2.1
Poller Type - Cactid v
Server Info - Linux 2.6.16.53-0.8-smp
Web Server - Apache/2.2.0 (Linux/SUSE)
PHP - 5.1.2
PHP Extensions - libxml, xml, standard, SimpleXML, SPL, session, Reflection, date, pcre, apache2handler, bcmath, bz2, calendar, ctype, curl, dbase, dom, exif, filepro, ftp, gd, gettext, gmp, iconv, ldap, mbstring, mcrypt, mhash, mysql, mysqli, odbc, openssl, pgsql, posix, snmp, sockets, sysvmsg, xmlrpc, zlib
MySQL - 5.0.26
RRDTool - 1.2.27
SNMP - 5.4
Plugins
  • Network Discovery (discovery - v0.8.4)
    Documents (docs - v0.1)
    Host Info (hostinfo - v0.2)
    Device Tracking (mactrack - v1.1)
    PHP Network Managing (PHP Network Managing - v0.6)
    Device Monitoring (monitor - v0.8.2)
    PHP Network Weathermap (weathermap - v0.941)
    ReportIt (ReportIt - v0.5.1)
    Global Plugin Settings (settings - v0.5)
    SNMPTT viewer for cacti (snmptt - v0.1.21b)
    Syslog Monitoring (haloe - v0.4)
    Thresholds (thold - v0.3.9)
    Network Tools (tools - v0.2)
    Update Checker (update - v0.4)
    Real-time statistics (zond - v0.34b)
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Re: i

Post by gthe »

steffenn, if you do uninstall / install and enable plugin is there any error ? May be in cacti.log ?
steffenn
Posts: 19
Joined: Fri Jun 23, 2006 11:07 am
Location: Munich

fixed

Post by steffenn »

Hi gthe,

Its working now, i just forgot the plugin - enable at the new "Plugin Management" Tab (same problem as with the new management plugin) after clicking install from PA-v2.x. Im not yet so familar with the new plugin architecture and not so happy with this new GUI mouse clicking staff for plugin installation, also because can't keep installations unattended and scripted for this any more.

Its also working with having tables as DB-views (MySQL >5), because we want to use this frontend beside NagiosTrap Frontend, without the need for storing the traps at 2 databases twice.
Its a design issue for me as well: traps and syslogs does'nt belong to the cacti-DB, because they are can grow a lot and need extented long term maintanance as regular archiving and purging. Without this it could be very danger for cactis main functionality in longterm :)

By the way - have you got an idea for the lots of:
tail /var/log/apache2/error_log
[Thu May 15 17:36:59 2008] [error] [client 172.16.15.26] PHP Notice: Undefined index: alert in /usr/local/cacti/plugins/snmptt/snmptt_view.php on line 616
[Thu May 15 17:36:59 2008] [error] [client 172.16.15.26] PHP Notice: Undefined index: alert in /usr/local/cacti/plugins/snmptt/snmptt_view.php on line 616
[Thu May 15 17:36:59 2008] [error] [client 172.16.15.26] PHP Notice: Undefined index: alert in /usr/local/cacti/plugins/snmptt/snmptt_view.php on line 616


and Thank you for your help in short response times to my questions

Steffen
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

steffenn,
1. Plugin already has autopurge functions in settings to disallow snmptt tables grow.
2. You error because you installation is corupt. After installing plugin and open snmptt tab first time the AutoUpdate process will lanch (see my first post with screenshot).
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

Added new version:
--- 1.0.23b ---

Code: Select all

      - Added extjs interface. Speedup for big tables and new look ;
Screens in first post.
eternal
Cacti User
Posts: 68
Joined: Thu Dec 14, 2006 4:38 pm
Location: Kingsport TN
Contact:

Post by eternal »

Looks great

in
include/snmptt_header_ext.php: you have

<iframe src="/cacti/plugins/snmptt/snmptt_view.php?report=extjs_main" frameborder="0"

Might break a few people


and

PHP Fatal error: Call to undefined function json_encode() in /var/www/html/plugins/snmptt/js/state.get-state.php on line 9, referer: http://foo.com/plugins/snmptt/snmptt_vi ... extjs_main
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

eternal, Thanks for bug report :)
eternal wrote:Looks great

in
include/snmptt_header_ext.php: you have

<iframe src="/cacti/plugins/snmptt/snmptt_view.php?report=extjs_main" frameborder="0"

Might break a few people
Fixed and updated in first post.

eternal wrote: PHP Fatal error: Call to undefined function json_encode() in /var/www/html/plugins/snmptt/js/state.get-state.php on line 9, referer: http://foo.com/plugins/snmptt/snmptt_vi ... extjs_main
You php don't have json module. Install it or update php to 5.2 or wait my fix (may be today).
eternal
Cacti User
Posts: 68
Joined: Thu Dec 14, 2006 4:38 pm
Location: Kingsport TN
Contact:

Post by eternal »

Installed json no errors

Get nothing displayed in any window

and in stats I get access denied.
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

gthe wrote:
eternal wrote: PHP Fatal error: Call to undefined function json_encode() in /var/www/html/plugins/snmptt/js/state.get-state.php on line 9, referer: http://foo.com/plugins/snmptt/snmptt_vi ... extjs_main
You php don't have json module. Install it or update php to 5.2 or wait my fix (may be today).
Done.

--- 0.1.24b ---
  • - Fix path bug;
    - Fix for php without json;
    - For Arch 2.x issue need run sql:
    update plugin_realms set file = 'snmptt_view.php,snmptt_db.php' where file like '%snmptt_view.php%'
eternal - This is Arch 2.x issue. Try this sql command:

Code: Select all

update plugin_realms set file = 'snmptt_view.php,snmptt_db.php' where `file` like '%snmptt_view.php%'
eternal
Cacti User
Posts: 68
Joined: Thu Dec 14, 2006 4:38 pm
Location: Kingsport TN
Contact:

Post by eternal »

Perfect!

Beautiful layout! best in cacti so far.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests