Syslog monitor addon beta
Moderators: Developers, Moderators
I am building another system (a little beefier now) using linux... All of my plugins are working except haloe.php... When I click on the syslogs tab, it attempts to open haloe.php as a text file. Everything else (threshold, weathermap, discovery, monitor) are working fine, just haloe... Oddly enough I have this working on my other setup using haloe version 0.2... Any ideas?
I have also tried to remove the entire haloe directory and re-add the plugin, but I am still getting the same result.
I have also tried to remove the entire haloe directory and re-add the plugin, but I am still getting the same result.
Usually a problem with PHP (wierd that everything else works thought) or a permissions problem.klr0514 wrote:I am building another system (a little beefier now) using linux... All of my plugins are working except haloe.php... When I click on the syslogs tab, it attempts to open haloe.php as a text file. Everything else (threshold, weathermap, discovery, monitor) are working fine, just haloe... Oddly enough I have this working on my other setup using haloe version 0.2... Any ideas?
I have also tried to remove the entire haloe directory and re-add the plugin, but I am still getting the same result.
I think I know what you're talking about and I've had the same problem. I've had it where firefox tries to get me to download haloe.php when I click the syslog tab and IE just won't open the page. Nothing to do with a text file, but maybe it is a similar problem.klr0514 wrote:When I click on the syslogs tab, it attempts to open haloe.php as a text file.
My problem was my config.php in haloe. The parameters for the $haloe_config array was wrong. Mainly the "haloeTable" was pointed to the wrong table and I think the "Fields" were wrong too. Could you post your config.php and what your syslog mysql tables look like?
[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]
Here is my config.php from haloe...
<?php
$haloedb_type = "mysql";
$haloedb_default = "haloe";
$haloedb_hostname = "localhost";
$haloedb_username = "xxxxxx";
$haloedb_password = "xxxxxx";
$haloe_config["rows_per_page"] = "30";
// Integrate with Graph View Timespan Selector. If false, keep seperate timespan settings
$haloe_config["graphtime"] = true;
// Display timespan selector or not [ only used if $haloe_config["graphtime"]=false ]
$haloe_config["timespan_sel"] = true;
// Field Mappings, adjust to match the haloe table columns in use
$haloe_config["haloeTable"] = "syslog";
$haloe_config["incomingTable"] = "syslog_incoming";
$haloe_config["removeTable"] = "syslog_remove";
$haloe_config["alertTable"] = "syslog_alert";
$haloe_config["dateField"] = "date";
$haloe_config["timeField"] = "time";
$haloe_config["priorityField"] = "priority";
$haloe_config["facilityField"] = "facility";
$haloe_config["hostField"] = "host";
$haloe_config["textField"] = "msg";
$haloe_config["id"] = "seq";
// Priority colors, change/add/delete to suit
$haloe_colors["Emergency"] = "FF0000";
$haloe_colors["Critical"] = "FF0000";
$haloe_colors["alert"] = "FF0000";
$haloe_colors["err"] = "FFAB00";
$haloe_colors["warn"] = "FFFF00";
// $haloe_colors["Notice"] = "FFAB00";
// $haloe_colors["Info"] = "FFAB00";
$haloe_colors["Debug"] = "D0D0D0";
?>
Here is the sql file (bundled with haloe):
--
-- Table structure for table `syslog`
--
CREATE TABLE syslog (
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,
PRIMARY KEY (seq)
) TYPE=MyISAM;
-- --------------------------------------------------------
--
-- Table structure for table `syslog_alert`
--
CREATE TABLE syslog_alert (
id int(10) NOT NULL auto_increment,
name varchar(255) NOT NULL default '',
`type` varchar(16) NOT NULL default '',
message text NOT NULL,
`user` varchar(32) NOT NULL default '',
`date` int(16) NOT NULL default '0',
email text NOT NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;
-- --------------------------------------------------------
--
-- Table structure for table `syslog_incoming`
--
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)
) TYPE=MyISAM;
-- --------------------------------------------------------
--
-- Table structure for table `syslog_remove`
--
CREATE TABLE syslog_remove (
id int(10) NOT NULL auto_increment,
name varchar(255) NOT NULL default '',
`type` varchar(16) NOT NULL default '',
message text NOT NULL,
`user` varchar(32) NOT NULL default '',
`date` int(16) NOT NULL default '0',
PRIMARY KEY (id)
) TYPE=MyISAM;
unfortunately I think I see the problem... message and msg??
<?php
$haloedb_type = "mysql";
$haloedb_default = "haloe";
$haloedb_hostname = "localhost";
$haloedb_username = "xxxxxx";
$haloedb_password = "xxxxxx";
$haloe_config["rows_per_page"] = "30";
// Integrate with Graph View Timespan Selector. If false, keep seperate timespan settings
$haloe_config["graphtime"] = true;
// Display timespan selector or not [ only used if $haloe_config["graphtime"]=false ]
$haloe_config["timespan_sel"] = true;
// Field Mappings, adjust to match the haloe table columns in use
$haloe_config["haloeTable"] = "syslog";
$haloe_config["incomingTable"] = "syslog_incoming";
$haloe_config["removeTable"] = "syslog_remove";
$haloe_config["alertTable"] = "syslog_alert";
$haloe_config["dateField"] = "date";
$haloe_config["timeField"] = "time";
$haloe_config["priorityField"] = "priority";
$haloe_config["facilityField"] = "facility";
$haloe_config["hostField"] = "host";
$haloe_config["textField"] = "msg";
$haloe_config["id"] = "seq";
// Priority colors, change/add/delete to suit
$haloe_colors["Emergency"] = "FF0000";
$haloe_colors["Critical"] = "FF0000";
$haloe_colors["alert"] = "FF0000";
$haloe_colors["err"] = "FFAB00";
$haloe_colors["warn"] = "FFFF00";
// $haloe_colors["Notice"] = "FFAB00";
// $haloe_colors["Info"] = "FFAB00";
$haloe_colors["Debug"] = "D0D0D0";
?>
Here is the sql file (bundled with haloe):
--
-- Table structure for table `syslog`
--
CREATE TABLE syslog (
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,
PRIMARY KEY (seq)
) TYPE=MyISAM;
-- --------------------------------------------------------
--
-- Table structure for table `syslog_alert`
--
CREATE TABLE syslog_alert (
id int(10) NOT NULL auto_increment,
name varchar(255) NOT NULL default '',
`type` varchar(16) NOT NULL default '',
message text NOT NULL,
`user` varchar(32) NOT NULL default '',
`date` int(16) NOT NULL default '0',
email text NOT NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;
-- --------------------------------------------------------
--
-- Table structure for table `syslog_incoming`
--
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)
) TYPE=MyISAM;
-- --------------------------------------------------------
--
-- Table structure for table `syslog_remove`
--
CREATE TABLE syslog_remove (
id int(10) NOT NULL auto_increment,
name varchar(255) NOT NULL default '',
`type` varchar(16) NOT NULL default '',
message text NOT NULL,
`user` varchar(32) NOT NULL default '',
`date` int(16) NOT NULL default '0',
PRIMARY KEY (id)
) TYPE=MyISAM;
unfortunately I think I see the problem... message and msg??
You need to at least change that to:klr0514 wrote: $haloe_config["textField"] = "msg";
Code: Select all
$haloe_config["textField"] = "message";
[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]
Changing "msg" to "message" worked, but my syslog-ng.conf file is pointing to 'msg'... Should I also change this?
template("INSERT INTO syslog_incoming (host, facility, priority, level, tag, dat
e, time, program, msg)
VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL', '$TAG', '$YEAR-$MONTH-$DAY
', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );\n") template-escape(yes)); };
to this:
template("INSERT INTO syslog_incoming (host, facility, priority, level, tag, dat
e, time, program, message)
VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL', '$TAG', '$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MESSAGE' );\n") template-escape(yes)); };
template("INSERT INTO syslog_incoming (host, facility, priority, level, tag, dat
e, time, program, msg)
VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL', '$TAG', '$YEAR-$MONTH-$DAY
', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );\n") template-escape(yes)); };
to this:
template("INSERT INTO syslog_incoming (host, facility, priority, level, tag, dat
e, time, program, message)
VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL', '$TAG', '$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MESSAGE' );\n") template-escape(yes)); };
yes, I would change all the instances of 'msg' to 'message'. I use 'msg' in all my syslog stuff, but I don't think it matters as long as everything is consistent.
[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]
Anyone getting this message while adding a remove rule ??
Notice: Undefined variable: query in /home/www/htdocs/cacti/plugins/haloe/functions.php on line 47
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/www/htdocs/cacti/plugins/haloe/functions.php on line 47
Notice: Undefined variable: query in /home/www/htdocs/cacti/plugins/haloe/functions.php on line 47
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/www/htdocs/cacti/plugins/haloe/functions.php on line 47
Warning: Cannot modify header information - headers already sent by (output started at /home/www/htdocs/cacti/plugins/haloe/functions.php:47) in /home/www/htdocs/cacti/plugins/haloe/haloe_remove.php on line 51
Notice: Undefined variable: query in /home/www/htdocs/cacti/plugins/haloe/functions.php on line 47
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/www/htdocs/cacti/plugins/haloe/functions.php on line 47
Notice: Undefined variable: query in /home/www/htdocs/cacti/plugins/haloe/functions.php on line 47
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/www/htdocs/cacti/plugins/haloe/functions.php on line 47
Warning: Cannot modify header information - headers already sent by (output started at /home/www/htdocs/cacti/plugins/haloe/functions.php:47) in /home/www/htdocs/cacti/plugins/haloe/haloe_remove.php on line 51
Another Question about syslog plugin. I've tried to set an alert against one of the logs coming in from localhost. How does the email portion work?? I didnt see any settings to choose like for Thold...I've only set up one email alert but hadnt' gotten an email?? Any thing i need to do or check to get that working?
THX
THX
There were some problems getting email alerts to work for me. Look back in this thread to like page 8, you'll see all what we did. I would just wait for cigamit's new version as I'm sure he'll have it fixed.spoonman wrote:Another Question about syslog plugin. I've tried to set an alert against one of the logs coming in from localhost. How does the email portion work?? I didnt see any settings to choose like for Thold...I've only set up one email alert but hadnt' gotten an email?? Any thing i need to do or check to get that working?
[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]
Who is online
Users browsing this forum: No registered users and 0 guests