CaMM (Cacti Message Management) plugin v1.6.7 2010-08-26

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
mihho66
Posts: 6
Joined: Thu Jul 03, 2008 12:25 am

Re: Problem with marker ..

Post by mihho66 »

gthe wrote: armstrongzhao and mihho66:
Enable debug mode in camm setting's tab and look for error in cacti log file.
Hi gthe,

thanks for your attention, here is my log from cacti log by debug mode.
thanks your attention, here is my log by used debug mode.

Log File [Total Lines: 500 - All Items Shown]

03/04/2010 09:12:59 AM - SYSTEM camm General STATS: AllTime:0.7157 PurgeTime:0.0069 RuleTime:0.1740 TreeTime:0.5347
03/04/2010 09:12:58 AM - camm: Poller[0] S3.1 The next syslog Tree to DB run time has been determined to be NOW
03/04/2010 09:12:58 AM - camm: Poller[0] S3.1 The next snmptt Tree to DB run time has been determined to be NOW
03/04/2010 09:12:58 AM - camm: Poller[0] S3. Checking to determine if it's time to run AutoCreate Tree Menu.
03/04/2010 09:12:58 AM - camm: Poller[0] S2.1 The next AutoPurge process run time has been determined to be at '2010-03-04 10:42:52'. Last run time was '2010-03-04 8:42:52'
03/04/2010 09:12:58 AM - camm: Poller[0] S2. Checking to determine if it's time to run AutoPurge process.
03/04/2010 09:12:58 AM - camm: Poller[0] -3 Delete records.

03/04/2010 09:12:58 AM - camm: Poller[0] - Select records to process = [0]
03/04/2010 09:12:58 AM - camm: Poller[0] - Found count records==[5]
03/04/2010 09:12:58 AM - camm: Poller[0] - SQL where conditions=[facility='cron' AND `syslog`.`plugin_camm_syslog`.`status`=1]
03/04/2010 09:12:58 AM - camm: Poller[0] - Process only new records
03/04/2010 09:12:58 AM - camm: Poller[0] = Start process rule id=[100]
03/04/2010 09:12:58 AM - camm: Poller[0] S1.2 Found 26 new syslog messages to process
03/04/2010 09:12:58 AM - camm: Poller[0] S1.2 Found 0 new traps to process
03/04/2010 09:12:58 AM - camm: Poller[0] S1.1 Use SYSLOG component
03/04/2010 09:12:58 AM - camm: Poller[0] S1.1 Use SNMPTT component
03/04/2010 09:12:58 AM - camm: Poller[0] S1. Found 1 camm rule to process
03/04/2010 09:12:58 AM - camm: Poller[0] S0. About to enter camm poller processing
03/04/2010 09:12:58 AM - camm: Poller[0] S0. Found enabled DEBUG mode. Output will be verbose
03/04/2010 09:12:47 AM - SYSTEM STATS: Time:147.4300 Method:spine Processes:10 Threads:10 Hosts:73 HostsPerProcess:8 DataSources:3865 RRDsProcessed:1907
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Problem with marker ..

Post by TheWitness »

mihho66 wrote:
gthe wrote: armstrongzhao and mihho66:
Enable debug mode in camm setting's tab and look for error in cacti log file.
Hi gthe,

thanks for your attention, here is my log from cacti log by debug mode.
thanks your attention, here is my log by used debug mode.

Log File [Total Lines: 500 - All Items Shown]

03/04/2010 09:12:59 AM - SYSTEM camm General STATS: AllTime:0.7157 PurgeTime:0.0069 RuleTime:0.1740 TreeTime:0.5347
03/04/2010 09:12:58 AM - camm: Poller[0] S3.1 The next syslog Tree to DB run time has been determined to be NOW
03/04/2010 09:12:58 AM - camm: Poller[0] S3.1 The next snmptt Tree to DB run time has been determined to be NOW
03/04/2010 09:12:58 AM - camm: Poller[0] S3. Checking to determine if it's time to run AutoCreate Tree Menu.
03/04/2010 09:12:58 AM - camm: Poller[0] S2.1 The next AutoPurge process run time has been determined to be at '2010-03-04 10:42:52'. Last run time was '2010-03-04 8:42:52'
03/04/2010 09:12:58 AM - camm: Poller[0] S2. Checking to determine if it's time to run AutoPurge process.
03/04/2010 09:12:58 AM - camm: Poller[0] -3 Delete records.

03/04/2010 09:12:58 AM - camm: Poller[0] - Select records to process = [0]
03/04/2010 09:12:58 AM - camm: Poller[0] - Found count records==[5]
03/04/2010 09:12:58 AM - camm: Poller[0] - SQL where conditions=[facility='cron' AND `syslog`.`plugin_camm_syslog`.`status`=1]
03/04/2010 09:12:58 AM - camm: Poller[0] - Process only new records
03/04/2010 09:12:58 AM - camm: Poller[0] = Start process rule id=[100]
03/04/2010 09:12:58 AM - camm: Poller[0] S1.2 Found 26 new syslog messages to process
03/04/2010 09:12:58 AM - camm: Poller[0] S1.2 Found 0 new traps to process
03/04/2010 09:12:58 AM - camm: Poller[0] S1.1 Use SYSLOG component
03/04/2010 09:12:58 AM - camm: Poller[0] S1.1 Use SNMPTT component
03/04/2010 09:12:58 AM - camm: Poller[0] S1. Found 1 camm rule to process
03/04/2010 09:12:58 AM - camm: Poller[0] S0. About to enter camm poller processing
03/04/2010 09:12:58 AM - camm: Poller[0] S0. Found enabled DEBUG mode. Output will be verbose
03/04/2010 09:12:47 AM - SYSTEM STATS: Time:147.4300 Method:spine Processes:10 Threads:10 Hosts:73 HostsPerProcess:8 DataSources:3865 RRDsProcessed:1907
Those threads and process settings are insane for that size system. No need to have more than 2 processes. Must be on a VM with a virtualized disk.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
jlslatton
Posts: 3
Joined: Thu Oct 08, 2009 10:31 am

CAMM SQL queries

Post by jlslatton »

First of all, thank you very much for this plugin. It has been invaluable in helping defend our network against specific events that otherwise would have been very difficult to report on in a timely fashion.

We have a great number of events being logged via syslog to our database and subsequently being queried and alerted on. However, when trying to view these events through the CAMM interface, our cacti database becomes "hung" and unresponsive. Sometimes the results from CAMM come back and sometimes we get the "transaction aborted" error. At one point, we had somewhere near 13 million rows but have since trimmed it down to 1 million due to this issue.

During the "loading" phase of CAMM and when it's querying the database, the cacti poller has issues writing to the cacti database. Retrieving graphs during that time does not work either. Only when the CAMM query is stopped will other cacti database functions work.

One particular item I have a question on is how CAMM is actually querying the configured database. I've found in viewing the processlist for mysql that the database being queried appears to be cacti, vice the database that actually stores the syslog events. Below are the details for my CAMM configuration:

Syslog db name: syslog_ng
Sylog incoming table: plugin_camm_syslog

So, the syslog events captured by syslog-ng are stored in a mysql database called syslog_ng in the table called plugin_camm_syslog. However, when running a processlist on the mysql server, it appears that the queries are running against the cacti database as shown in the attached image.

Could our "hang up/unresponsive" database issues be related to this? Why does the processlist show the database as being cacti when it should by syslog_ng? What other info do you need to help troubleshoot this?

Any help is greatly appreciated!

Jeremy
Attachments
mysql processlist run from command line on mysql server showing cacti as the database being queried.
mysql processlist run from command line on mysql server showing cacti as the database being queried.
mysql_processlist.JPG (130 KiB) Viewed 5403 times
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

mihho66
Your log contains no errors. Try to update data in camm and check the log again.


jlslatton

1. I also noticed that the cacti has a relationship between the tables. For example when creating graphs all other requests will be waiting for execution.
2. For more accurate decisions I need to faithfully reproduce your steps to create this error.
3. I think that the problem in the type of tables mysql (myisam) - will need to switch to innodb - but first need to check it.
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
jlslatton
Posts: 3
Joined: Thu Oct 08, 2009 10:31 am

Post by jlslatton »

gthe,

Thank you for the quick response.

Would you suggest just using the cacti database right now instead of separate one? My initial thought in a separate syslog db was for ease of queries and database maintenance (backups, purges, etc.).

To your point #1: It seems as though CAMM or cacti is causing some weird relationship issue between databases, not just tables. I'll keep digging and report back as I find new stuff out.

Thank you for helping me out with this.

Jeremy
cta1kep
Posts: 5
Joined: Fri Mar 05, 2010 2:19 am

Post by cta1kep »

Hello every one!

I installed CAMM plugins, its wonderful and powerful plugin i ever saw.
CAMM-1.6.5
PA - 2.6

But. I have one problem with permissions to create a rules for syslog messages.

In a camm-tab (console--->camm) ,
1. Settings and Utilities is not acctive
2. if i choose syslog-messeage to manage for creating a rule, the following error arise: "You do not have rigth for this action".

What i'm doing wrong?
cta1kep
Posts: 5
Joined: Fri Mar 05, 2010 2:19 am

Post by cta1kep »

I find where the problem was

In a file cacti_root/plugins/camm/lib/camm_function.php, chenge following line

$camm_admin_realm_id = db_fetch_cell("SELECT `id`+100 FROM `plugin_realms` where `display` like 'plugin%camm%manage%'");

to

$camm_admin_realm_id = db_fetch_cell("SELECT `id`+100 FROM `plugin_realms` where `display` like 'Plugin%camm%Manage%'");
madsn
Cacti User
Posts: 50
Joined: Tue Oct 13, 2009 6:26 am

Post by madsn »

Hi

Thanks for a very nice plugin! It is exactly what I have been looking for.
It works but I have one small error that I don't know how to resolve.

After installing snmptt i get an error everytime I want to restart snmptrapd.

/etc/init.d/snmptrapd restart

/etc/init.d/snmptrapd: line 16: OPTIONS-Ls -p /var/run/snmptrapd.pid: No such file or directory
Stopping snmptrapd: [ OK ]
Starting snmptrapd: [ OK ]

The snmptrapd is working fine but I can't figure out how to solve this error.
madsn
Cacti User
Posts: 50
Joined: Tue Oct 13, 2009 6:26 am

Post by madsn »

Okay solved it. Some how I managed to alter a line in /etc/init.d/snmptrapd where i deleted a '=' sign.

OPTIONS"-On -Lsd -p /var/run/snmptrapd.pid"
OPTIONS="-On -Lsd -p /var/run/snmptrapd.pid"
sini
Cacti User
Posts: 91
Joined: Mon Nov 24, 2003 10:22 am
Location: Hungary

Re: Doubts with function in camm

Post by sini »

patrulla wrote:Hello everyone, I am again using Cacti and I have some doubts, you know how to execute scripts or any external program when defining rules, for example to add a script to run when a rule is activated.

Thank you very much and I await your response
Select "execute user function" and edit one of the sample test functions
in /plugins/camm/lib/camm_user_func.php file or add your own.
Sini
Elian
Posts: 5
Joined: Fri Feb 12, 2010 3:50 pm

Post by Elian »

Hi,

I'm using CaMM with Cisco Devices and its a great tool.

I have a problem with Global Search filter using SNMP traps (not tested with syslog yet). When I try to define a traptime between 2 dates the combo box is just empty and can't select any date. Traptime in logs are ok.

cacti 0.8.7e
CaMM 1.6.5
snmptt 1.3

Is this a bug?
Attachments
traptime.PNG
traptime.PNG (1.99 KiB) Viewed 5165 times
traps.PNG
traps.PNG (7.53 KiB) Viewed 5165 times
jlslatton
Posts: 3
Joined: Thu Oct 08, 2009 10:31 am

Post by jlslatton »

gthe wrote:
jlslatton

1. I also noticed that the cacti has a relationship between the tables. For example when creating graphs all other requests will be waiting for execution.
2. For more accurate decisions I need to faithfully reproduce your steps to create this error.
3. I think that the problem in the type of tables mysql (myisam) - will need to switch to innodb - but first need to check it.
gthe,

Can you provide any guidance in setting up CAMM as a stand-alone website and not as a plugin to cacti? I love the interface and capability it gives me but I'd like to manage it outside of cacti as well as give its ability to users not needing access to cacti.

Any thoughts? Thanks!
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

Elian wrote:Hi,

I'm using CaMM with Cisco Devices and its a great tool.

I have a problem with Global Search filter using SNMP traps (not tested with syslog yet). When I try to define a traptime between 2 dates the combo box is just empty and can't select any date. Traptime in logs are ok.

cacti 0.8.7e
CaMM 1.6.5
snmptt 1.3

Is this a bug?
Yes? It is. But this bug in one of users plugins for EXTjs, and I'm waiting when the developers fix this problem.

jlslatton wrote:
gthe,

Can you provide any guidance in setting up CAMM as a stand-alone website and not as a plugin to cacti? I love the interface and capability it gives me but I'd like to manage it outside of cacti as well as give its ability to users not needing access to cacti.

Any thoughts? Thanks!
Camm can not operate as a standalone application, only as a plugin for cacti.
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
patrulla
Posts: 6
Joined: Tue Mar 02, 2010 8:14 am

sini

Post by patrulla »

patrulla wrote:
Hello everyone, I am again using Cacti and I have some doubts, you know how to execute scripts or any external program when defining rules, for example to add a script to run when a rule is activated.

Thank you very much and I await your response


Select "execute user function" and edit one of the sample test functions
in /plugins/camm/lib/camm_user_func.php file or add your own.

Thanks SINI, you have help me a lot, you are very kind.
patrulla
Posts: 6
Joined: Tue Mar 02, 2010 8:14 am

Error in cacti.log

Post by patrulla »

Hello again everyone, he continued to work with this great plugin, but still I have problem to understand completely. I would like somebody help me identify the following errors I have in cacti.log, because I can not interpret:


04/09/2010 09:35:21 AM - SYSTEM camm General STATS: AllTime:0.1144 PurgeTime:0.0011 RuleTime:0.1117 TreeTime:0.0017
04/09/2010 09:36:04 AM - PHPSVR: Poller[0] WARNING: PHP Script File to be included, does not exist
04/09/2010 09:36:04 AM - PHPSVR: Poller[0] WARNING: Function does not exist
04/09/2010 09:36:04 AM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1062', SQL:"insert into settings values ('syslog_last_incoming','')'
04/09/2010 09:36:04 AM - SPINE: Poller[0] Host[10] ERROR: Empty result [127.0.0.1]: '/usr/bin/php -q /var/www/html/plugins/syslog/syslog_counter.php'


Thanks
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests