You will never see status=1 unless it is currently processing items. That is the column it uses to tell what it is currently processing, since as it processes items, more items are continuously pouring in.kingaru wrote:Soo.. if I'm correct the setup.php should select records for alarm which have "status=1" ... I just checked my database and all records in my syslog_incoming database have status=0 ... where and how this status is changing? Why it is always stays 0?
Thoughts?
Igor
Syslog monitor addon beta
Moderators: Developers, Moderators
Thanks for catching that. Its now fixed in my SVN version. BTW, why would you be using $alert['msg'] when the alert table isn't specifically setup that way originally?nahun wrote:Ok I got everything to work now. Under:Add:Code: Select all
/* SEND OUT ALERTS ON THINGS WE SPECIFY */ $alertarray = db_fetch_assoc("SELECT * FROM " . $haloe_config["alertTable"]); foreach ($alertarray as $alert) { $sql = ''; $alertm = '';
Code: Select all
if ($alert['type'] == 'host') { $sql = 'select * from ' . $haloe_config["incomingTable"] . " where " . $haloe_config["hostField"] . "='" . $alert['msg'] . "' and status=1"; }
How so? The column names themselves are just the defaults. Your syslog-ng may be setup differently, but thats doesn't constitute the syslog.sql file as inaccurate, its just not the defaults for your setup. You could just have easily changed the syslog-ng table structure to use different column names.klr0514 wrote:so what columns should be in the syslog and syslog_incoming tables? The bundled file syslog.sql is very inaccurate...
Just because my syslog and syslog_incoming tables were like that and I felt like being consistentcigamit wrote:BTW, why would you be using $alert['msg'] when the alert table isn't specifically setup that way originally?
[size=75]Solaris 10 x86 [color=red][b]||[/b][/color] Cacti - 0.8.7 [color=red][b]||[/b][/color] MySQL - 5.0.45 [color=red][b]||[/b][/color] PHP - 5.2.6 [color=red][b]||[/b][/color] RRDTool - 1.2.23 [color=red][b]||[/b][/color] NET-SNMP - 5.4.1 [color=red][b]||[/b][/color] Syslog-ng 2.0.5
[url=http://www.indigo-networks.com]indigo-networks.com[/url][/size]
[url=http://www.indigo-networks.com]indigo-networks.com[/url][/size]
-
- Posts: 41
- Joined: Mon Jan 16, 2006 7:44 am
- Location: Brasil
- Contact:
new using this plugin
Hi i´m new using this plugin!
I have instaled how a standard plugin installation, coping files and add haloe on config.php
open ok the syslog page, but no hosts show, what i need do more?
thanks for help.
I have instaled how a standard plugin installation, coping files and add haloe on config.php
open ok the syslog page, but no hosts show, what i need do more?
thanks for help.
Flavio Humberto Barcellos Dietze
MCP - MCDST - MCTS:SQL 2005 - CCA - MCSA - MCSE: Messaging & Security
MCP - MCDST - MCTS:SQL 2005 - CCA - MCSA - MCSE: Messaging & Security
Re: new using this plugin
Do you have a syslog database setup? And a syslog program inserting syslogs into the database? What version of the plugin are you using. Could you post your config.php and your syslog program's config file.phantom_rgs wrote:Hi i´m new using this plugin!
I have instaled how a standard plugin installation, coping files and add haloe on config.php
open ok the syslog page, but no hosts show, what i need do more?
thanks for help.
[size=75]Solaris 10 x86 [color=red][b]||[/b][/color] Cacti - 0.8.7 [color=red][b]||[/b][/color] MySQL - 5.0.45 [color=red][b]||[/b][/color] PHP - 5.2.6 [color=red][b]||[/b][/color] RRDTool - 1.2.23 [color=red][b]||[/b][/color] NET-SNMP - 5.4.1 [color=red][b]||[/b][/color] Syslog-ng 2.0.5
[url=http://www.indigo-networks.com]indigo-networks.com[/url][/size]
[url=http://www.indigo-networks.com]indigo-networks.com[/url][/size]
-
- Posts: 41
- Joined: Mon Jan 16, 2006 7:44 am
- Location: Brasil
- Contact:
Re: new using this plugin
thanks for help nahunnahun wrote:Do you have a syslog database setup? And a syslog program inserting syslogs into the database? What version of the plugin are you using. Could you post your config.php and your syslog program's config file.phantom_rgs wrote:Hi i´m new using this plugin!
I have instaled how a standard plugin installation, coping files and add haloe on config.php
open ok the syslog page, but no hosts show, what i need do more?
thanks for help.
i think more easily you tell me how to full install syslog plugin. thanks for help.
Flavio Humberto Barcellos Dietze
MCP - MCDST - MCTS:SQL 2005 - CCA - MCSA - MCSE: Messaging & Security
MCP - MCDST - MCTS:SQL 2005 - CCA - MCSA - MCSE: Messaging & Security
Re: new using this plugin
I think I'll write a general how-to in the information/howto's section soon. Look for it there sometime soon.phantom_rgs wrote: i think more easily you tell me how to full install syslog plugin. thanks for help.
[size=75]Solaris 10 x86 [color=red][b]||[/b][/color] Cacti - 0.8.7 [color=red][b]||[/b][/color] MySQL - 5.0.45 [color=red][b]||[/b][/color] PHP - 5.2.6 [color=red][b]||[/b][/color] RRDTool - 1.2.23 [color=red][b]||[/b][/color] NET-SNMP - 5.4.1 [color=red][b]||[/b][/color] Syslog-ng 2.0.5
[url=http://www.indigo-networks.com]indigo-networks.com[/url][/size]
[url=http://www.indigo-networks.com]indigo-networks.com[/url][/size]
-
- Posts: 41
- Joined: Mon Jan 16, 2006 7:44 am
- Location: Brasil
- Contact:
Re: new using this plugin
ok i willnahun wrote:I think I'll write a general how-to in the information/howto's section soon. Look for it there sometime soon.phantom_rgs wrote: i think more easily you tell me how to full install syslog plugin. thanks for help.
i have already haloe.sql imported (created) db in mysql and plugin installed only.
what need more? my cacti server is under windows.
Flavio Humberto Barcellos Dietze
MCP - MCDST - MCTS:SQL 2005 - CCA - MCSA - MCSE: Messaging & Security
MCP - MCDST - MCTS:SQL 2005 - CCA - MCSA - MCSE: Messaging & Security
Hi everyone!
If I setup a event color to black (#000000), it can't be read in the syslog page because all the event text colors are also black!
So I need a workaround to resolve this issue...
Anyone?!
Thanks in advance!
(And sorry for my poor English...)
If I setup a event color to black (#000000), it can't be read in the syslog page because all the event text colors are also black!
So I need a workaround to resolve this issue...
Anyone?!
Thanks in advance!
(And sorry for my poor English...)
Thanks in advance!
(And sorry for my poor English...)
_______________________________________
twelzy (Enio Sanches)
(And sorry for my poor English...)
_______________________________________
twelzy (Enio Sanches)
Feature/Enhancement Request...
I think that would be great if the facility and priority/level filters show the options in the correct order (ascending or descending):
Thanks in advance!
Code: Select all
Facility:
- auth
- authpriv
- cron
- daemon
- kern
- local0
- local1
- local2
- local3
- local4
- local5
- local6
- local7
- lpr
- mail
- mark
- news
- syslog
- user
- uucp
Priority/Level:
- emerg (0)
- alert (1)
- crit (2)
- err (3)
- warning (4)
- notice (5)
- info (6)
- debug (7)
Thanks in advance!
(And sorry for my poor English...)
_______________________________________
twelzy (Enio Sanches)
(And sorry for my poor English...)
_______________________________________
twelzy (Enio Sanches)
Guys.........I've almost got this syslog plugin workin. I've got syslog-ng working fine. I see all kinds of good stuff rollin through my mysql.pipe fifo file. But here is what I see in the mysql.log file ////
ERROR 1054 (42S22) at line 1: Unknown column 'level' in 'field list'
Cant seem to track down where my error is in what config file???
THX
ERROR 1054 (42S22) at line 1: Unknown column 'level' in 'field list'
Cant seem to track down where my error is in what config file???
THX
Think its in my syslog-ng.conf file??>>
Here it is.
# all known message sources
source s_all {
# message generated by Syslog-NG
internal();
# standard Linux log source (this is the default place for the syslog()
# function to send logs to)
unix-stream("/dev/log");
# messages from the kernel
file("/proc/kmsg" log_prefix("kernel: "));
# use the above line if you want to receive remote UDP logging messages
# (this is equivalent to the "-r" syslogd flag)
udp();
tcp();
};
# Mysql Database
# pipe messages to /var/log/mysql.pipe to be processed by mysql
destination d_mysql {
pipe("/var/log/mysql.pipe" template("INSERT INTO syslog_incoming (host, facility, priority, level, tag, date, time, program, message)
VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL', '$TAG', '$YEAR-$MONTH-$DAY', ' $HOUR:$MIN:$SEC', '$PROGRAM', '$MESSAGE'
);\n") template-escape(yes)
);
};
# MySQL Database
log { source(s_all); destination(d_mysql); };
Thanks for the help all!!!!
Here it is.
# all known message sources
source s_all {
# message generated by Syslog-NG
internal();
# standard Linux log source (this is the default place for the syslog()
# function to send logs to)
unix-stream("/dev/log");
# messages from the kernel
file("/proc/kmsg" log_prefix("kernel: "));
# use the above line if you want to receive remote UDP logging messages
# (this is equivalent to the "-r" syslogd flag)
udp();
tcp();
};
# Mysql Database
# pipe messages to /var/log/mysql.pipe to be processed by mysql
destination d_mysql {
pipe("/var/log/mysql.pipe" template("INSERT INTO syslog_incoming (host, facility, priority, level, tag, date, time, program, message)
VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL', '$TAG', '$YEAR-$MONTH-$DAY', ' $HOUR:$MIN:$SEC', '$PROGRAM', '$MESSAGE'
);\n") template-escape(yes)
);
};
# MySQL Database
log { source(s_all); destination(d_mysql); };
Thanks for the help all!!!!
Level
Looks like your mysql table doesn't match your syslog-ng insert statement.
from mysql do this:
and make sure it matches the insert statement below:
This link may help also:
http://www.de.gentoo-wiki.com/HOWTO_setup_PHP-Syslog-NG
from mysql do this:
Code: Select all
show create table syslog_incoming \G
Code: Select all
INSERT INTO syslog_incoming (host, facility, priority, level, tag, date, time, program, message)
VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL', '$TAG', '$YEAR-$MONTH-$DAY', ' $HOUR:$MIN:$SEC', '$PROGRAM', '$MESSAGE'
http://www.de.gentoo-wiki.com/HOWTO_setup_PHP-Syslog-NG
spoonman wrote:Think its in my syslog-ng.conf file??>>
Here it is.
# all known message sources
source s_all {
# message generated by Syslog-NG
internal();
# standard Linux log source (this is the default place for the syslog()
# function to send logs to)
unix-stream("/dev/log");
# messages from the kernel
file("/proc/kmsg" log_prefix("kernel: "));
# use the above line if you want to receive remote UDP logging messages
# (this is equivalent to the "-r" syslogd flag)
udp();
tcp();
};
# Mysql Database
# pipe messages to /var/log/mysql.pipe to be processed by mysql
destination d_mysql {
pipe("/var/log/mysql.pipe" template("INSERT INTO syslog_incoming (host, facility, priority, level, tag, date, time, program, message)
VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL', '$TAG', '$YEAR-$MONTH-$DAY', ' $HOUR:$MIN:$SEC', '$PROGRAM', '$MESSAGE'
);\n") template-escape(yes)
);
};
# MySQL Database
log { source(s_all); destination(d_mysql); };
Thanks for the help all!!!!
Do the tables have to match in exact order??
mysql> show create table syslog_incoming \G
*************************** 1. row ***************************
Table: syslog_incoming
Create Table: CREATE TABLE `syslog_incoming` (
`facility` varchar(10) default NULL,
`priority` varchar(10) default NULL,
`date` date default NULL,
`time` time default NULL,
`host` varchar(128) default NULL,
`message` text,
`seq` int(10) unsigned NOT NULL auto_increment,
`status` tinyint(4) NOT NULL default '0',
PRIMARY KEY (`seq`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
1 row in set (0.01 sec)
mysql>
Thanks
mysql> show create table syslog_incoming \G
*************************** 1. row ***************************
Table: syslog_incoming
Create Table: CREATE TABLE `syslog_incoming` (
`facility` varchar(10) default NULL,
`priority` varchar(10) default NULL,
`date` date default NULL,
`time` time default NULL,
`host` varchar(128) default NULL,
`message` text,
`seq` int(10) unsigned NOT NULL auto_increment,
`status` tinyint(4) NOT NULL default '0',
PRIMARY KEY (`seq`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
1 row in set (0.01 sec)
mysql>
Thanks
Who is online
Users browsing this forum: No registered users and 1 guest