Syslog 2.1 - Doesn't show any register
Moderators: Developers, Moderators
-
- Posts: 10
- Joined: Wed Oct 10, 2012 12:32 pm
Syslog 2.1 - Doesn't show any register
Hi,
I'm running cacti 1.1.6 and syslog plugin 2.1. When i try to see some syslog register (Syslog tab - System logs), it doesn't show me any of them.
I made the following,
- I've check that the syslog plugin was installed correctly.
- I've set up the config.php correcty.
- I've checked that syslog messages are comming from devices and they are inserted into syslog_incomming table of MySQL.
- I've checked that syslog_host table is filling up.
- I've not have error messages in cacti logs.
So, I'd apprecite if you could tell me what can i see to resolve my issue
Regards.
Rodrigo
I'm running cacti 1.1.6 and syslog plugin 2.1. When i try to see some syslog register (Syslog tab - System logs), it doesn't show me any of them.
I made the following,
- I've check that the syslog plugin was installed correctly.
- I've set up the config.php correcty.
- I've checked that syslog messages are comming from devices and they are inserted into syslog_incomming table of MySQL.
- I've checked that syslog_host table is filling up.
- I've not have error messages in cacti logs.
So, I'd apprecite if you could tell me what can i see to resolve my issue
Regards.
Rodrigo
Last edited by rsanchezre on Fri May 19, 2017 9:44 am, edited 1 time in total.
-
- Posts: 10
- Joined: Wed Oct 10, 2012 12:32 pm
Re: Syslog 2.1 - Doesn't show any register
As additional information, i added alert roules and when i go to Alert Logs tab, registers are shown me correctly
Regards
but as I said, when i go to system logs tab (same period), does not shown any thing and should show something
Well, I'd appreciate some helpRegards
-
- Posts: 10
- Joined: Wed Oct 10, 2012 12:32 pm
Re: Syslog 2.1 - Doesn't show any register
Could some one healp me??
Regards
Regards
Re: Syslog 2.1 - Doesn't show any register
Show syslog-ng conf, syslog config.php
-
- Posts: 10
- Joined: Wed Oct 10, 2012 12:32 pm
Re: Syslog 2.1 - Doesn't show any register
Hi Itkroplis,
Thanks for answer....
Here you have both configurations
this is sylog-ng config file
source s_all {
udp(ip("0.0.0.0") port(514));
};
destination d_mysql {
sql(
type(mysql)
host("localhost") username("cactiuser") password("XXXXXXXX")
database("syslog")
table("syslog_incoming")
columns("facility_id","priority_id","programn","date","time","host","message")
values("$FACILITY_NUM","$LEVEL_NUM","$PROGRAM","$YEAR-$MONTH-$DAY","$HOUR:$MIN:$SEC","$HOST_FROM","$MSG")
);
};
destination remotos { file("/var/log/BST-$YEAR$MONTH$R_syslog.log"); };
log {
source(s_all);
destination(d_mysql);
destination(remotos);
};
and this is config.php (/usr/share/cacti/site/plugins/syslog)
*/
global $config, $database_type, $database_default, $database_hostname;
global $database_username, $database_password, $database_port;
/* revert if you dont use the Cacti database */
$use_cacti_db = false;
if (!$use_cacti_db) {
$syslogdb_type = 'mysql';
$syslogdb_default = 'syslog';
$syslogdb_hostname = 'localhost';
$syslogdb_username = 'cactiuser';
$syslogdb_password = 'XXXXXXXX';
$syslogdb_port = 3306;
}else{
$syslogdb_type = $database_type;
$syslogdb_default = $database_default;
$syslogdb_hostname = $database_hostname;
$syslogdb_username = $database_username;
$syslogdb_password = $database_password;
$syslogdb_port = $database_port;
}
/* field in the incomming table */
$syslog_incoming_config['dateField'] = 'date';
$syslog_incoming_config['timeField'] = 'time';
$syslog_incoming_config['priorityField'] = 'priority_id';
$syslog_incoming_config['facilityField'] = 'facility_id';
$syslog_incoming_config['hostField'] = 'host_id';
$syslog_incoming_config['textField'] = 'message';
$syslog_incoming_config['id'] = 'seq';
?>
Regards.
Thanks for answer....
Here you have both configurations
this is sylog-ng config file
source s_all {
udp(ip("0.0.0.0") port(514));
};
destination d_mysql {
sql(
type(mysql)
host("localhost") username("cactiuser") password("XXXXXXXX")
database("syslog")
table("syslog_incoming")
columns("facility_id","priority_id","programn","date","time","host","message")
values("$FACILITY_NUM","$LEVEL_NUM","$PROGRAM","$YEAR-$MONTH-$DAY","$HOUR:$MIN:$SEC","$HOST_FROM","$MSG")
);
};
destination remotos { file("/var/log/BST-$YEAR$MONTH$R_syslog.log"); };
log {
source(s_all);
destination(d_mysql);
destination(remotos);
};
and this is config.php (/usr/share/cacti/site/plugins/syslog)
*/
global $config, $database_type, $database_default, $database_hostname;
global $database_username, $database_password, $database_port;
/* revert if you dont use the Cacti database */
$use_cacti_db = false;
if (!$use_cacti_db) {
$syslogdb_type = 'mysql';
$syslogdb_default = 'syslog';
$syslogdb_hostname = 'localhost';
$syslogdb_username = 'cactiuser';
$syslogdb_password = 'XXXXXXXX';
$syslogdb_port = 3306;
}else{
$syslogdb_type = $database_type;
$syslogdb_default = $database_default;
$syslogdb_hostname = $database_hostname;
$syslogdb_username = $database_username;
$syslogdb_password = $database_password;
$syslogdb_port = $database_port;
}
/* field in the incomming table */
$syslog_incoming_config['dateField'] = 'date';
$syslog_incoming_config['timeField'] = 'time';
$syslog_incoming_config['priorityField'] = 'priority_id';
$syslog_incoming_config['facilityField'] = 'facility_id';
$syslog_incoming_config['hostField'] = 'host_id';
$syslog_incoming_config['textField'] = 'message';
$syslog_incoming_config['id'] = 'seq';
?>
Regards.
Re: Syslog 2.1 - Doesn't show any register
Hi;
Your syslog_incomming table is on syslog data base or cacti data base?
Your syslog_incomming table is on syslog data base or cacti data base?
Re: Syslog 2.1 - Doesn't show any register
rsanchezre wrote: destination d_mysql {
sql(
type(mysql)
host("localhost") username("cactiuser") password("XXXXXXXX")
database("syslog")
table("syslog_incoming")
columns("facility_id","priority_id","programn","date","time","host","message")
values("$FACILITY_NUM","$LEVEL_NUM","$PROGRAM","$YEAR-$MONTH-$DAY","$HOUR:$MIN:$SEC","$HOST_FROM","$MSG")
);
};
You've got a typo in there that might be causing your syslog-ng to fail the query to the database.
programn != program
Code: Select all
MariaDB [cacti]> describe syslog_incoming;
+-------------+---------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+---------------------+------+-----+---------+----------------+
| facility_id | int(10) unsigned | YES | | NULL | |
| priority_id | int(10) unsigned | YES | | NULL | |
| program | varchar(40) | YES | MUL | NULL | |
| date | date | YES | | NULL | |
| time | time | YES | | NULL | |
| host | varchar(64) | YES | | NULL | |
| message | varchar(1024) | NO | | | |
| seq | bigint(20) unsigned | NO | PRI | NULL | auto_increment |
| status | tinyint(4) | NO | MUL | 0 | |
+-------------+---------------------+------+-----+---------+----------------+
Cacti - 1.2.15
Poller Type - Spine
Weathermap 0.98a
Server Info - Linux 3.10.0 - Centos 7
Web Server - Apache/2.4.6 PHP 5.4.16
MySQL - 5.5 ;RRDTool - 1.4.8 ;SNMP - 5.7.2
Religion - Anti forum pets
Poller Type - Spine
Weathermap 0.98a
Server Info - Linux 3.10.0 - Centos 7
Web Server - Apache/2.4.6 PHP 5.4.16
MySQL - 5.5 ;RRDTool - 1.4.8 ;SNMP - 5.7.2
Religion - Anti forum pets
-
- Posts: 10
- Joined: Wed Oct 10, 2012 12:32 pm
Re: Syslog 2.1 - Doesn't show any register
Thanks Pucho for help me to find my mistake. I've fixed this parameter and now is working fine.
Thanks again.
Regards
Rodrigo
Thanks again.
Regards
Rodrigo
Who is online
Users browsing this forum: No registered users and 0 guests