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 »

I am correct label for rules.
Try updated version from first post. You rule must look like this:
lints
Cacti User
Posts: 107
Joined: Thu Nov 08, 2007 2:00 pm
Location: Ottawa, Canada

Problem with plugin

Post by lints »

Hi

I've had 1.0.23b running for a few months without issues, and suddenly yesterday whenever I try to view the traps collected, it won't load. It just sits there at the "loading" screen, but never actually loads.

I saw that you posted a few updates (1.0.24b and 1.0.25b), so I thought I'd update to see if it fixed the problem.

Now whenever I install it Cacti totally breaks because PHP is throwing fatal errors.

This is the line logged by Apache:

Code: Select all

PHP Fatal error:  [] operator not supported for strings in /var/www/html/lib/plugins.php on line 33
The line in question should just append a string to the end of an array, but obviously it's not working.

To get Cacti working properly again, I had to disable the plugin in global.php and run

Code: Select all

DELETE FROM plugin_hooks WHERE name = 'snmptt';
on the SQL server.

I tried reverting back to 1.0.23b but it's the same thing.

Any ideas?

For reference, this is my setup:
Cacti Version - 0.8.7b
Plugin Architecture - 2.1
Poller Type - Cactid v
Server Info - Linux 2.6.18-53.el5
Web Server - Apache/2.2.3 (CentOS)
PHP - 5.1.6
PHP Extensions - libxml, xml, wddx, tokenizer, sysvshm, sysvsem, sysvmsg, standard, SimpleXML, sockets, SPL, shmop, session, Reflection, pspell, posix, mime_magic, iconv, hash, gmp, gettext, ftp, exif, date, curl, ctype, calendar, bz2, zlib, pcre, openssl, apache2handler, dbase, gd, json, ldap, mbstring, mysql, mysqli, PDO, pdo_mysql, pdo_sqlite, rrdtool, snmp
MySQL - 5.0.22-log
RRDTool - 1.2.23
SNMP - 5.3.1
Plugins
  • Global Plugin Settings (settings - v0.5)
    Thresholds (thold - v0.3.9)
    Large Site Performane Booster for Cacti (boost - v1.8)
    Host Info (hostinfo - v0.2)
    Cycle Graphs (Cycle Graphs - v0.4)
    Device Monitoring (monitor - v0.8.2)
    Network Tools (tools - v0.3)
    killspike (killspike - v0.1.0a)
    Update Checker (update - v0.4)
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Re: Problem with plugin

Post by gthe »

lints wrote:...

I tried reverting back to 1.0.23b but it's the same thing.
...
"same thing" - cacti don't work or snmptt plugin don't show ?
1. You need dump all cacti db and plugin_snmptt* tables to different dumps.
2. Uninstall plugin.
3. Drop plugin_snmptt* tables if they still exists.
4. delete FROM plugin_realms where `plugin`= 'snmptt';
5. delete FROM plugin_hooks where `name`= 'snmptt';
6. delete FROM plugin_config where `directory`= 'snmptt';
7. delete FROM plugin_db_changes where `plugin`= 'snmptt';
----
After that you Cacti must work good.
If soo, try to install 1.0.23b , restore plugin_snmptt* dump and after that update do last version.

Sorry for my English.
lints
Cacti User
Posts: 107
Joined: Thu Nov 08, 2007 2:00 pm
Location: Ottawa, Canada

Post by lints »

When I try to re-install 1.0.23b, I get the same problem where Cacti won't display anything and Apache is throwing the Fatal Error.

I ran through all the steps you provided, but it still has the same effect, Cacti totally stops working.
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

But without snmptt cacti work well ?
lints
Cacti User
Posts: 107
Joined: Thu Nov 08, 2007 2:00 pm
Location: Ottawa, Canada

Post by lints »

Yeah.

I'm going to see if it's just this plugin or if ALL plugins cause it to break.

I'll let you know how it goes.
lints
Cacti User
Posts: 107
Joined: Thu Nov 08, 2007 2:00 pm
Location: Ottawa, Canada

Post by lints »

I tried some another plugin (SuperLinks) and it seems to work properly.

I'm not entirely sure which hook in the snmptt plugin that's causing the error, so it's possible that SuperLinks isn't re-producing the situation that snmptt is.

For now I'll leave it disabled but I'll create the tables so snmptt can keep logging properly.

let me know if you get any ideas.
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

I have spent 2 days for searches of a problem and was lost.
Can you help me by adding debugging string:

Code: Select all

cacti_log("name=[" . $hdata['name'] . "] file=[" . $hdata['file'] . "] func=[" . $hdata['function'] . "]", false, "LOG ERROR");
to /lib/plugins.php before line

Code: Select all

$p[] = $hdata['name'];
and try to reproduce error. After that grep last few rows from logs like this and post it:
10/11/2008 03:57:55 PM - LOG ERROR: Poller[0] name=[npc] file=[setup.php] func=[npc_config_arrays]
10/11/2008 03:57:55 PM - LOG ERROR: Poller[0] name=[ipm] file=[setup.php] func=[ipm_config_arrays]
10/11/2008 03:57:55 PM - LOG ERROR: Poller[0] name=[nettp] file=[setup.php] func=[nettp_config_arrays]
lints
Cacti User
Posts: 107
Joined: Thu Nov 08, 2007 2:00 pm
Location: Ottawa, Canada

Post by lints »

Here is a couple dozen lines from the end of the log.

Let me know if this helps.

Code: Select all

10/14/2008 09:27:11 AM - LOG ERROR: Poller[0] name=[internal] file=[] func=[plugin_config_arrays]
10/14/2008 09:27:11 AM - LOG ERROR: Poller[0] name=[aggregate] file=[setup.php] func=[aggregate_config_arrays]
10/14/2008 09:27:11 AM - LOG ERROR: Poller[0] name=[manage] file=[setup.php] func=[plugin_manage_config_arrays]
10/14/2008 09:27:11 AM - LOG ERROR: Poller[0] name=[manage] file=[setup.php] func=[manage_config_settings]
10/14/2008 09:27:11 AM - LOG ERROR: Poller[0] name=[aggregate] file=[setup.php] func=[aggregate_config_form]
10/14/2008 09:27:11 AM - LOG ERROR: Poller[0] name=[manage] file=[setup.php] func=[manage_config_form]
10/14/2008 09:27:29 AM - LOG ERROR: Poller[0] name=[internal] file=[] func=[plugin_config_arrays]
10/14/2008 09:27:29 AM - LOG ERROR: Poller[0] name=[aggregate] file=[setup.php] func=[aggregate_config_arrays]
10/14/2008 09:27:29 AM - LOG ERROR: Poller[0] name=[manage] file=[setup.php] func=[plugin_manage_config_arrays]
10/14/2008 09:27:29 AM - LOG ERROR: Poller[0] name=[snmptt] file=[setup.php] func=[snmptt_config_arrays]
10/14/2008 09:27:33 AM - LOG ERROR: Poller[0] name=[internal] file=[] func=[plugin_config_arrays]
10/14/2008 09:27:33 AM - LOG ERROR: Poller[0] name=[aggregate] file=[setup.php] func=[aggregate_config_arrays]
10/14/2008 09:27:33 AM - LOG ERROR: Poller[0] name=[manage] file=[setup.php] func=[plugin_manage_config_arrays]
10/14/2008 09:27:33 AM - LOG ERROR: Poller[0] name=[snmptt] file=[setup.php] func=[snmptt_config_arrays]
10/14/2008 09:27:39 AM - LOG ERROR: Poller[0] name=[internal] file=[] func=[plugin_config_arrays]
10/14/2008 09:27:39 AM - LOG ERROR: Poller[0] name=[aggregate] file=[setup.php] func=[aggregate_config_arrays]
10/14/2008 09:27:39 AM - LOG ERROR: Poller[0] name=[manage] file=[setup.php] func=[plugin_manage_config_arrays]
10/14/2008 09:27:39 AM - LOG ERROR: Poller[0] name=[snmptt] file=[setup.php] func=[snmptt_config_arrays]
10/14/2008 09:27:40 AM - LOG ERROR: Poller[0] name=[internal] file=[] func=[plugin_config_arrays]
10/14/2008 09:27:40 AM - LOG ERROR: Poller[0] name=[aggregate] file=[setup.php] func=[aggregate_config_arrays]
10/14/2008 09:27:40 AM - LOG ERROR: Poller[0] name=[manage] file=[setup.php] func=[plugin_manage_config_arrays]
10/14/2008 09:27:40 AM - LOG ERROR: Poller[0] name=[snmptt] file=[setup.php] func=[snmptt_config_arrays]
10/14/2008 09:27:41 AM - LOG ERROR: Poller[0] name=[internal] file=[] func=[plugin_config_arrays]
10/14/2008 09:27:41 AM - LOG ERROR: Poller[0] name=[aggregate] file=[setup.php] func=[aggregate_config_arrays]
10/14/2008 09:27:41 AM - LOG ERROR: Poller[0] name=[manage] file=[setup.php] func=[plugin_manage_config_arrays]
10/14/2008 09:27:41 AM - LOG ERROR: Poller[0] name=[snmptt] file=[setup.php] func=[snmptt_config_arrays]
10/14/2008 09:27:42 AM - LOG ERROR: Poller[0] name=[internal] file=[] func=[plugin_config_arrays]
10/14/2008 09:27:42 AM - LOG ERROR: Poller[0] name=[aggregate] file=[setup.php] func=[aggregate_config_arrays]
10/14/2008 09:27:42 AM - LOG ERROR: Poller[0] name=[manage] file=[setup.php] func=[plugin_manage_config_arrays]
10/14/2008 09:27:42 AM - LOG ERROR: Poller[0] name=[snmptt] file=[setup.php] func=[snmptt_config_arrays]
10/14/2008 09:27:43 AM - LOG ERROR: Poller[0] name=[internal] file=[] func=[plugin_config_arrays]
10/14/2008 09:27:43 AM - LOG ERROR: Poller[0] name=[aggregate] file=[setup.php] func=[aggregate_config_arrays]
10/14/2008 09:27:43 AM - LOG ERROR: Poller[0] name=[manage] file=[setup.php] func=[plugin_manage_config_arrays]
10/14/2008 09:27:43 AM - LOG ERROR: Poller[0] name=[snmptt] file=[setup.php] func=[snmptt_config_arrays]
10/14/2008 09:28:06 AM - LOG ERROR: Poller[0] name=[internal] file=[] func=[plugin_config_arrays]
10/14/2008 09:28:06 AM - LOG ERROR: Poller[0] name=[aggregate] file=[setup.php] func=[aggregate_config_arrays]
10/14/2008 09:28:06 AM - LOG ERROR: Poller[0] name=[manage] file=[setup.php] func=[plugin_manage_config_arrays]
10/14/2008 09:28:06 AM - LOG ERROR: Poller[0] name=[manage] file=[setup.php] func=[manage_config_settings]
10/14/2008 09:28:06 AM - LOG ERROR: Poller[0] name=[aggregate] file=[setup.php] func=[aggregate_config_form]
10/14/2008 09:28:06 AM - LOG ERROR: Poller[0] name=[manage] file=[setup.php] func=[manage_config_form]
10/14/2008 09:28:06 AM - LOG ERROR: Poller[0] name=[internal] file=[] func=[plugin_config_arrays]
10/14/2008 09:28:06 AM - LOG ERROR: Poller[0] name=[aggregate] file=[setup.php] func=[aggregate_config_arrays]
10/14/2008 09:28:06 AM - LOG ERROR: Poller[0] name=[manage] file=[setup.php] func=[plugin_manage_config_arrays]
10/14/2008 09:28:06 AM - LOG ERROR: Poller[0] name=[internal] file=[] func=[plugin_config_arrays]
10/14/2008 09:28:06 AM - LOG ERROR: Poller[0] name=[aggregate] file=[setup.php] func=[aggregate_config_arrays]
10/14/2008 09:28:06 AM - LOG ERROR: Poller[0] name=[manage] file=[setup.php] func=[plugin_manage_config_arrays]
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

lints, sorry, but I can't reproduce error.
ceyounger
Posts: 44
Joined: Fri Feb 10, 2006 2:59 pm
Location: Orange County, CA
Contact:

Post by ceyounger »

Has anyone gotten a Delete Traps rule to work?

I get a ton of SNMP autheniticationFailure traps that I want to auto delete until my SysAdmins get around to modifying all the servers to not send it.

I tried various ways of building a rule to do it but they are all ignored/not working.

Any advice?
Felbane
Posts: 8
Joined: Fri Aug 24, 2007 12:53 pm

Post by Felbane »

I, for one, haven't been able to get *ANY* rules to work. I've resorted to using rules in SNMPTT's configuration to send alerts. The plugin is fantastic as far as being able to view SNMP traps, but the lack of documentation and less-than-intuitive rules options make it difficult to operate. I hope gthe continues to develop and improve this plugin as it has a TON of potential!
computer_guru
Cacti User
Posts: 141
Joined: Thu Apr 10, 2008 6:52 pm

Rules not Working / Feature Request

Post by computer_guru »

I can't get the rules to work properly either, but I'm still on version ...24. I've yet to upgrade to ...25.


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?
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

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).

Sorry for last response, but now I hard work over the new plugin.
ceyounger
Posts: 44
Joined: Fri Feb 10, 2006 2:59 pm
Location: Orange County, CA
Contact:

Post by ceyounger »

I gave up and went to my DBAs for help.

We created a stored procedure in the cacti DB to delete the records I want. Then I run that stored procedure in an cron job every 10 mins. It works very well.
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests