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

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
computer_guru
Cacti User
Posts: 141
Joined: Thu Apr 10, 2008 6:52 pm

thanks.

Post by computer_guru »

I think that did the trick. Giving me a trap message and an email message in the email body. Thanks again.
computer_guru
Cacti User
Posts: 141
Joined: Thu Apr 10, 2008 6:52 pm

another quick question

Post by computer_guru »

What method do yo use for installing custom mib files? The process that I have been using doesn't appear to always work. Some of my Traps show up as unknown when they should not.

*update: Never mind. I think I got it working. I just had my mib in the wrong folder. If anyone else needs help this site is pretty cool for installing custom mibs:

http://net-snmp.sourceforge.net/wiki/in ... ty_Vendors
netocool
Posts: 7
Joined: Mon Dec 01, 2008 8:11 pm

Post by netocool »

HI,gthe, I want your help.
cacti-0.8.7b
snmtt-1.2.2rc
PA-3.2

1) I want to add a snmptt rule, but, my cacti display a error like this:

Code: Select all

12/30/2008 10:37:19 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1054', SQL:"INSERT INTO `plugin_snmptt_alert` SET `json_filter`='{"fieldId":"eventname","operatorId":"STRING_LIST","values":[{"label":"coldStart","value":"coldStart"},{"label":"linkDown","value":"linkDown"}]}', `sql_filter`=' eventname in (\'coldStart\',\'linkDown\')', `is_delete`='0', `is_email`='1', `is_function`='1', `is_mark`='1', `name`='Server_alert', `function_name`='snmptt_user_test1', `email`='dika.ye@nkcom.cn', `email_message`='!!!!!!!!!!!', `marker`='1', `notes`='Server_alert!!!!!!!!!!', `date`='2008-12-30T10:32:20', `user_id`='1' ' 
2) My snmptt can not display graphs in the "Stats" tab.
I have import the addones/graph xml, and copy the ss_snmpttpoller.php file to the cacti/scripts.
I can't see any error in the cacti log, what's the problem with my snmptt?
Please help me? Thanks a lot.

:x
netocool
Posts: 7
Joined: Mon Dec 01, 2008 8:11 pm

Post by netocool »

netocool wrote:HI,gthe, I want your help.
cacti-0.8.7b
snmtt-1.2.2rc
PA-3.2

1) I want to add a snmptt rule, but, my cacti display a error like this:

Code: Select all

12/30/2008 10:37:19 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1054', SQL:"INSERT INTO `plugin_snmptt_alert` SET `json_filter`='{"fieldId":"eventname","operatorId":"STRING_LIST","values":[{"label":"coldStart","value":"coldStart"},{"label":"linkDown","value":"linkDown"}]}', `sql_filter`=' eventname in (\'coldStart\',\'linkDown\')', `is_delete`='0', `is_email`='1', `is_function`='1', `is_mark`='1', `name`='Server_alert', `function_name`='snmptt_user_test1', `email`='dika.ye@nkcom.cn', `email_message`='!!!!!!!!!!!', `marker`='1', `notes`='Server_alert!!!!!!!!!!', `date`='2008-12-30T10:32:20', `user_id`='1' ' 
2) My snmptt can not display graphs in the "Stats" tab.
I have import the addones/graph xml, and copy the ss_snmpttpoller.php file to the cacti/scripts.
I can't see any error in the cacti log, what's the problem with my snmptt?
Please help me? Thanks a lot.

:x
Sorry, gthe, for the second question, I have the anwer.
1. Import all snmptt/addons/graph/cacti_graph_template_local_-_snmptt_*.xml
2. Copy snmptt/addons/graph/ss_snmpttpoller.php to cacti/scripts/ss_snmpttpoller.php
3. Go to => Console => New Graph. Select local Cacti host, in Graph Templates dropdown list select all snmptt* graph and Create it.
4. Wait 2-3 poller cycle.
5. Go to Graph Management, search snmptt and check that graph are exists.
6. Go to Cacti snmptt plugin stat tab and check graphs.

Please help me the first question. Thanks.
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

netocool, I use you sql insert string and it work well. So, the problem in incorrect structure of plugin_snmptt_alert table, and thats not for first time. I need info about your's table structure to fix it.

Can you give me output from mysql command ?

Code: Select all

SHOW COLUMNS FROM plugin_snmptt_alert;
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
netocool
Posts: 7
Joined: Mon Dec 01, 2008 8:11 pm

Post by netocool »

Hi gthe, thanks very much.
Below is the result:

Code: Select all

mysql> SHOW COLUMNS FROM plugin_snmptt_alert;
+-----------+------------------+------+-----+---------+----------------+
| Field     | Type             | Null | Key | Default | Extra          |
+-----------+------------------+------+-----+---------+----------------+
| id        | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| name      | varchar(255)     | NO   |     |         |                |
| type      | varchar(16)      | NO   | MUL |         |                |
| mode      | tinyint(1)       | NO   |     | 0       |                |
| hostname  | varchar(100)     | YES  |     | NULL    |                |
| eventname | varchar(50)      | YES  |     | NULL    |                |
| message   | text             | YES  |     | NULL    |                |
| user      | varchar(32)      | NO   |     |         |                |
| date      | datetime         | YES  |     | NULL    |                |
| email     | text             | NO   |     |         |                |
| notes     | varchar(255)     | YES  |     | NULL    |                |
+-----------+------------------+------+-----+---------+----------------+
11 rows in set (0.00 sec)
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

Table incorrect. Try this:

Code: Select all

UPDATE `settings` SET `value`='0' where name = 'snmptt_version';

and reopen plugin page - this force sql autoupdate process. After that - post columns info one more time.
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
netocool
Posts: 7
Joined: Mon Dec 01, 2008 8:11 pm

Post by netocool »

that work, I love you very much. :lol:
GuessWho
Posts: 16
Joined: Tue Jan 13, 2009 2:55 pm

Problems creating rules

Post by GuessWho »

Is anyone having problems creating rules in snmptt. I read the thread and already installed the json php module but after I save the rule it is delete from the screen with no error and the plugin_snmptt_alerts table is emplty.

Any thoughts?

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

Post by gthe »

Are You install up update plugin ?
gthe wrote:Table incorrect. Try this:

Code: Select all

UPDATE `settings` SET `value`='0' where name = 'snmptt_version';

and reopen plugin page - this force sql autoupdate process. After that - post columns info one more time.
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
GuessWho
Posts: 16
Joined: Tue Jan 13, 2009 2:55 pm

Post by GuessWho »

gthe,
That worked! Thanks for the very fast reply.

Two more things if you don't mind. I noticed that I get error when I try to delete all the unknown traps by checking all in the window. Is this expected?

This may be more of a snmptt problem but I always have two messages coming in but only one event in snmptrapd. Do you know of a possible cause? I have already read the docs for snmptt specifically the FAQ regarding duplicate messages.

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

Post by gthe »

GuessWho wrote:gthe,
That worked! Thanks for the very fast reply.

Two more things if you don't mind. I noticed that I get error when I try to delete all the unknown traps by checking all in the window. Is this expected?
No.
what kind of error ?
If You delete not all but part of unknown traps is error exist ?
GuessWho wrote: This may be more of a snmptt problem but I always have two messages coming in but only one event in snmptrapd. Do you know of a possible cause? I have already read the docs for snmptt specifically the FAQ regarding duplicate messages.

Thanks.
I see only one way - from FAQ :
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
I will ask once again - Are You install clear plugin or update it ?
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
GuessWho
Posts: 16
Joined: Tue Jan 13, 2009 2:55 pm

Post by GuessWho »

gthe,
This was a fresh install on cacti 0.8.7b with PIA 2.1.....not an update.

I stopped logging unknown traps because I had to manually delete them from the db. I will try again to log the unknown traps and let you know what happen when I attempt to delete them.

> If You delete not all but part of unknown traps is error exist ?
the error specifically happen when I tried to delete all on the current page.

the error states "Could not delete the entire selection"

Thanks.
GuessWho
Posts: 16
Joined: Tue Jan 13, 2009 2:55 pm

Post by GuessWho »

gthe, I am still getting the "Could not delete the entire selection" when I try to delete the entire page...infact i also get the error when I try to delete more than just 1 at a time.


I have also noticed that the plugin_snmptt_statistics table is not populating even though it is set in the snmptt.ini file.
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

GuessWho wrote:gthe, I am still getting the "Could not delete the entire selection" when I try to delete the entire page...infact i also get the error when I try to delete more than just 1 at a time.
It is error in message. In realy - plugin delete records from db.
Fixed in next version.
GuessWho wrote: I have also noticed that the plugin_snmptt_statistics table is not populating even though it is set in the snmptt.ini file.
No data in mysql db ?
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests