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

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 »

replace folders from archive
Attachments
new_colour_camm.rar
(206.15 KiB) Downloaded 461 times
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Works perfect - thanks ! :)
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Hmm - I now have a few errors

When attempting to delete a rule, I get the enclosed error messages ?

Also, I can't seem to delete any messages based on rules I create ? I create the rule, test it (see data), but the messages are never deleted ?

Thanks
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

mcutting wrote:Hmm - I now have a few errors

When attempting to delete a rule, I get the enclosed error messages ?
Here is the fix.
mcutting wrote: Also, I can't seem to delete any messages based on rules I create ? I create the rule, test it (see data), but the messages are never deleted ?

Thanks
Rule process only new message.
To process old messages - force it from rule tab.
Attachments
camm_db_admin.rar
(4.01 KiB) Downloaded 409 times
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Thanks. No more error messages, but I still see the syslogs in the list. Forcing the rule to run doesn't seem to make any difference ?
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

mcutting wrote:Thanks. No more error messages, but I still see the syslogs in the list. Forcing the rule to run doesn't seem to make any difference ?
Ok - ignore that - it's working.

Thanks
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
erickbe
Cacti User
Posts: 52
Joined: Sat Jan 17, 2009 1:01 am

Post by erickbe »

This is a great plugin, I got syslog working using Rsyslog on Fedora. Took a bit of messing around but got it figured out and working (I think). Does the alert column on the camm syslog view suppose to have anything in it from the syslog message?

Also, is CAMM using the database username/password defined in the cacti global.php but just with a different database name set in the camm config? Just curious as I didn't see a username/password field anywhere, etc.

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

Post by gthe »

from http://forums.cacti.net/viewtopic.php?t=26040 :
noflies wrote:HOW-TO Install Syslog 0.5.2 plugin on Linux/Unix Cacti versions 0.8.7, 0.8.7a and 0.8.7b
-------------------------------------------------------------------------------------------
[submitted by noflies, 26 Feb 2008]

4a. Grant privileges to cactidb_user for the syslogdb_default.

Code: Select all

shell# mysql --user=root --password
Enter password: ********
mysql> GRANT ALL ON <syslogdb_default>.* TO <cacti_dbuser>@<syslogdb_hostname> IDENTIFIED BY '<cacti_dbpass>';
mysql> flush privileges;
mysql> exit
NOTE: Change the above user credentials to your specific installation.
Soo you just need grant privileges for cacti mysql user to database.
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
erickbe
Cacti User
Posts: 52
Joined: Sat Jan 17, 2009 1:01 am

Post by erickbe »

Ok, thanks.

Is there a way to edit items in the Tree yet without going into the SQL database?

I have added a few Cisco routers for syslog with this and some show up under "Cisco Router" part of tree and some don't. For now I went into the SQL table and edited the field so those devices fell under the "Cisco Router" tree.
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

Erickbe - CaMM uses the host template to identify the syslog messages. I have all mine grouped under host templates called "Windows Servers", "Cisco Routers" etc.

Fastest way is to go into the devives, and change the host template they use. This won't affect the existing graphs either.

If you want to keep the graphs the same but with a different host template, then copy an existing one and rename it.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
erickbe
Cacti User
Posts: 52
Joined: Sat Jan 17, 2009 1:01 am

Post by erickbe »

Oh, ok. Well, I had existing servers in Cacti with a host template of "HP Servers" and the hostname in Cacti Devices is VOIPSERVER which matches the server name. I set up syslog on the server to send to the Cacti IP server and see the syslogs from the server fine but in the CAMM tree it shows up as just IP:VOIPSERVER and not under "HP Servers". There is no tree item called "HP Servers" even.
erickbe
Cacti User
Posts: 52
Joined: Sat Jan 17, 2009 1:01 am

Rsyslog and camm

Post by erickbe »

Here is what I added to rsyslog configuration for use with CAMM...

Code: Select all


#Use MySQL
$ModLoad ommysql.so
# Provides UDP syslog reception
$ModLoad imudp.so
$UDPServerRun 514


########################################################
##
## Template to write to MySQL table for Cacti/CAMM use
##

$template camm,"insert into plugin_camm_syslog_incoming(host, facility, priority, sys_date,  message) values ('%hostname:::UPPERCASE%', '%syslogfacility-text%', '%syslogpriority-text%', '%timereported:::date-mysql%', '%msg%')", SQL

# Near bottom of config
*.* :ommysql:127.0.0.1,syslog,cactiDBusername,cactiDBpassword;camm

erickbe
Cacti User
Posts: 52
Joined: Sat Jan 17, 2009 1:01 am

Title bar and tab issue with non-admin users and CAMM

Post by erickbe »

Hello,

I have a basic helpdesk type user with view only type rights in Cacti. The user does not have console tab access so that tab does not show up normally. The tabs they see are graphs, npc, camm, weathermaps.

However, when they use camm, the console tab is shown and the camm tab is shown before the others so when the user switches between tabs the tab graphics jump around since when they go back to graphs, etc the console tab goes away.

Any ideas on how to fix this?
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

SQL Error ?

Post by mcutting »

Gthe,

Every other poll, I get the below error in the log

CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1062', SQL:"INSERT INTO `syslog`.`plugin_camm_syslog` SELECT * FROM `syslog`.`plugin_camm_syslog_incoming` WHERE status=2'

Any ideas ?

Thanks
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

erickbe - I will try clean install and check.
mcutting - what scheme do you use ?
There are may be 2 schems of work

a)One table - all incoming messages stored in one table (default "plugin_camm_syslog")
b)Two tables - all incoming messages stored in temp table (default "plugin_camm_syslog_incoming"). On each run poller process all rules and after that copy messages to main table
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 2 guests