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    


SNMPTT viewer Plugin for Cacti. v 1.2.2rc (2008/11/18) extjs
Goto page Previous  1, 2, 3 ... 8, 9, 10, 11  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Plugin General
Author Message
gthe
Cacti User


Joined: 29 Jul 2006
Posts: 113
Location: RU

PostPosted: Wed Nov 12, 2008 12:50 am    Post subject: Reply with quote

gumis wrote:

I've tried Chrome as well, still no luck - empty pane on the right.

Thats strange. At the end - try FF. And what about panel in Chrome ?

gumis wrote:
Although I've noticed that 'formatline' field in plugin_snmptt_unknown table has only 255 chars, so that might be the problem (limitation - sounds better).The same field in plugin_snmptt table is Text.

Added in next version.
gumis wrote:

I'm not quite sure what exactly do you mean with that `alert` field. I'll have a quick look as soon as I can on the *.php files to see if I could help with that. Can you let me know which files would have to be modified?

I can create mode to change trap's alert field. (when you open full trap view window - you can see alert field).
So, you can create rule to change this field. But I cannot create graphs, based on this field value, because I don't know which value you will use, and what it mean.

Thanks and sorry for my English.
Back to top
123ralle



Joined: 20 Dec 2006
Posts: 8

PostPosted: Wed Nov 12, 2008 4:07 am    Post subject: Reply with quote

Hi gthe,

i've another suggestion for the rules :

It would be nice, to have an rule action for executing an external program.

With that rule somebody could trigger an event for an NMS, like sending
an event via nsca to an nagios host.

In the settings it should be possible to define the trigged programm and define some arguments for the program.

The deluxe variant for this, would be placeholders for the arguments,
like hostname, event, etc to distingish the events on the NMS.

regards,
Ralf
Back to top
gumis



Joined: 09 Nov 2008
Posts: 10

PostPosted: Wed Nov 12, 2008 2:50 pm    Post subject: Reply with quote

Quote:
Thats strange. At the end - try FF. And what about panel in Chrome ?

No luck with FF as well. Blank page, I can't see anything at all even after pressing the Update button. Would you know what could cause the problem? What else could I try ?

Quote:
I can create mode to change trap's alert field. (when you open full trap view window - you can see alert field).
So, you can create rule to change this field. But I cannot create graphs, based on this field value, because I don't know which value you will use, and what it mean.

I know what you mean now. But, to make it more universal for other users, what would you say about this:
when you go to Rules tab and then click on Add new rule, you can create new rule with mode 'Monitor'. Instead of e-mail and message field you could put simple drop-down box with for example... 10 values like 'monitor1', 'monitor2'...'monitor10'. By doing this you would assign new created rule to 'monitorX' variable.
Of course values in drop-down boxes would have to be marked somehow (which one are in use already), perhaps even renamed to rule's name? This would limit monitoring to 10 concurrent sessions at the same time, but would be more universal.

So lets say that I have a firewall on the network sending snmp traps to my box about people on my blacklist trying to login to any of the services on my internal network. My linux (snmptrapd) box caches that and executes snmptt.
Now in Cacti: I would go to 'Add new rule' and:
- rule name: 'Blacklisted_Idiots'
- mode: 'Monitor'
- assign to: '1. monitor1' (new created drop-down box)
- format line search: 'Contains'
- format line: 'B-listed' (let say that my firewall marks them like that)
- hostname: my_firewall

after you click on the save button, it could re-name '1. monitor1' field to '1. Blacklisted_Idiots'.
Then you could put them all on the graph as well - maybe additional one.

How about that?
Back to top
gthe
Cacti User


Joined: 29 Jul 2006
Posts: 113
Location: RU

PostPosted: Mon Nov 17, 2008 1:42 am    Post subject: Reply with quote

123ralle - execute external program is not so simple (especially with parametres). I offer other variant - execute user php function like this:
Code:
function snmptt_user_test1 ($alerted_trap, $alert) {

   cacti_log("Got trap with id=" . $alerted_trap["id"], false, "SNMPTT");

};

So, you can create own function, place it in snmptt_user_func.php and execute any external program in that function.
I try add this in next ver.

gumis wrote:

No luck with FF as well. Blank page, I can't see anything at all even after pressing the Update button. Would you know what could cause the problem? What else could I try ?



Thats fixed.

gumis - about mark trap rule - will try to implement this.


sorry for my english.
Back to top
gthe
Cacti User


Joined: 29 Jul 2006
Posts: 113
Location: RU

PostPosted: Tue Nov 18, 2008 5:59 am    Post subject: Reply with quote

New version in first post.
Quote:

--- 1.2.2rc ---

    - Rebuild "Add/Edit rule" window again. New system for creating filter - more powerfull.
    This update DELETE ALL existing rule, you need recreate it after;
    - New rule's modes - "Mark rule" and "Execute user functions". User functions must be in snmptt/lib/
    - "Show full unknown traps info" window;
    - Deleted "Create rule based on traps";
    - Fix bug for show stats if [plugin_snmptt_statistics] table is emty;
    Minor updates:
    - Constrain the window to the viewport;
    - Just after create and save rule - auto reload grid, so deleting new rule work fine;
    - Changed type formatline for unknown traps table from varchar(255) to text;
    - ReFixed save/restore state (IE). Checked on IE, GC, FF.
Back to top
gumis



Joined: 09 Nov 2008
Posts: 10

PostPosted: Wed Nov 19, 2008 3:04 pm    Post subject: Reply with quote

gthe first of all thanks for the update.
after update I'm having problems with saving rules...
When i press 'Done' button it goes to Rules window where I need to press 'Save' to save it... But as soon as I do that, it vanishes from the list. At the moment I can't add any rules, they all go...

Regards
Back to top
gthe
Cacti User


Joined: 29 Jul 2006
Posts: 113
Location: RU

PostPosted: Thu Nov 20, 2008 4:21 am    Post subject: Reply with quote

gumis, try recreate alert table:
Code:

DROP TABLE IF EXISTS `plugin_snmptt_alert`;
CREATE TABLE  `plugin_snmptt_alert` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `name` varchar(255) NOT NULL,
  `is_function` tinyint(1) NOT NULL default '0',
  `is_email` tinyint(1) NOT NULL default '0',
  `is_mark` tinyint(1) NOT NULL default '0',
  `is_delete` tinyint(1) NOT NULL default '0',
  `function_name` varchar(255) default NULL,
  `email` varchar(255) default NULL,
  `email_message` text,
  `marker` tinyint(2) NOT NULL default '0',
  `notes` varchar(255) default NULL,
  `json_filter` text,
  `sql_filter` text,
  `user_id` int(10) unsigned NOT NULL default '0',
  `date` datetime default NULL,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `unique` USING BTREE (`is_function`,`is_email`,`is_mark`,`is_delete`,`function_name`(25),`email`(25),`marker`)
) ENGINE=MyISAM AUTO_INCREMENT=100 COMMENT='Traps Alert';
Back to top
gumis



Joined: 09 Nov 2008
Posts: 10

PostPosted: Thu Nov 20, 2008 8:44 am    Post subject: Reply with quote

yep! Thanks a lot gthe.

I'm going to test all new options now.
Back to top
westside



Joined: 07 Nov 2008
Posts: 4

PostPosted: Tue Nov 25, 2008 4:27 pm    Post subject: Error with new Update Reply with quote

I am getting the following error when I try to create a new rule and I am doing the "Edit filter for rule" When I click done I get the below error.

Fatal error: Call to undefined function json_encode()
in /var/www/html/plugins/snmptt/snmptt_db.php on line 865
Back to top
gthe
Cacti User


Joined: 29 Jul 2006
Posts: 113
Location: RU

PostPosted: Tue Nov 25, 2008 11:34 pm    Post subject: Reply with quote

westside - you hostinfo (php, apache, mysql versions) ?

Or try this version snmpt_db.php (just replace it).



snmptt_db.rar
 Description:

Download
 Filename:  snmptt_db.rar
 Filesize:  5.59 KB
 Downloaded:  36 Time(s)

Back to top
westside



Joined: 07 Nov 2008
Posts: 4

PostPosted: Wed Nov 26, 2008 10:58 am    Post subject: That fixed the issue Reply with quote

Thank you for your fast response to this issue. The issue is now resolved. I am glad that you respond and work on issues, as most people on internet are lame. Just kidding.
Back to top
westside



Joined: 07 Nov 2008
Posts: 4

PostPosted: Wed Dec 03, 2008 1:03 pm    Post subject: Issue with new version of SNMPTT Reply with quote

I made a rule to email me a TRAP and when I hit the test button on the rule it does not show any results. I tested rules that I built earlier and they work. Also I have no way of making a rule from the Trap List as the icon that use to be there is no longer there any more. I am running CactiEZ.
Back to top
computer_guru



Joined: 10 Apr 2008
Posts: 29

PostPosted: Mon Dec 15, 2008 3:36 pm    Post subject: No tree Reply with quote

I found my Tree view missing today. What are the first steps in troubleshooting this?


I tried the refresh and recreate buttons with no success.

SNMPTT plugin: 1.0.23b
Cacti 0.8.7b
Back to top
gthe
Cacti User


Joined: 29 Jul 2006
Posts: 113
Location: RU

PostPosted: Mon Dec 15, 2008 11:54 pm    Post subject: Reply with quote

If You can - provide me next sql rezults:
Code:
SELECT * FROM settings where name like '%snmpt%'

Code:
SELECT count(*) FROM plugin_snmptt;

Code:
SELECT count(*) FROM plugin_snmptt_tree;
Back to top
computer_guru



Joined: 10 Apr 2008
Posts: 29

PostPosted: Tue Dec 16, 2008 9:55 am    Post subject: here are the results Reply with quote

see attached files for results. The tree pane in the SNMPTT plugin, is just completely empty. No error messages of any kind.

the attached files are in html format. just rename the extension.



3rd_sql_statement.txt
 Description:

Download
 Filename:  3rd_sql_statement.txt
 Filesize:  399 Bytes
 Downloaded:  8 Time(s)


2nd_sql_Statement.txt
 Description:

Download
 Filename:  2nd_sql_Statement.txt
 Filesize:  391 Bytes
 Downloaded:  9 Time(s)


1st_sql_statement.txt
 Description:

Download
 Filename:  1st_sql_statement.txt
 Filesize:  1.33 KB
 Downloaded:  11 Time(s)

Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Plugin General All times are GMT - 5 Hours
Goto page Previous  1, 2, 3 ... 8, 9, 10, 11  Next
Page 9 of 11

 



Powered by phpBB © 2001, 2005 phpBB Group