Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Mon Jan 22, 2018 9:04 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Syslog 2.1 - Doesn't show any register
PostPosted: Thu May 18, 2017 7:11 am 
Offline

Joined: Wed Oct 10, 2012 12:32 pm
Posts: 9
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


Last edited by rsanchezre on Fri May 19, 2017 9:44 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Syslog 2.1 - Doesn't show any register
PostPosted: Fri May 19, 2017 9:43 am 
Offline

Joined: Wed Oct 10, 2012 12:32 pm
Posts: 9
As additional information, i added alert roules and when i go to Alert Logs tab, registers are shown me correctly
Attachment:
Alert Logs.PNG
Alert Logs.PNG [ 32.38 KiB | Viewed 604 times ]


but as I said, when i go to system logs tab (same period), does not shown any thing and should show something
Attachment:
system logs.png
system logs.png [ 22.66 KiB | Viewed 604 times ]


Well, I'd appreciate some help
Regards


Top
 Profile  
 
 Post subject: Re: Syslog 2.1 - Doesn't show any register
PostPosted: Wed Jun 07, 2017 9:58 am 
Offline

Joined: Wed Oct 10, 2012 12:32 pm
Posts: 9
Could some one healp me??
Regards


Top
 Profile  
 
 Post subject: Re: Syslog 2.1 - Doesn't show any register
PostPosted: Mon Jun 19, 2017 12:09 pm 
Offline

Joined: Sun Jun 04, 2017 6:25 am
Posts: 14
Show syslog-ng conf, syslog config.php


Top
 Profile  
 
 Post subject: Re: Syslog 2.1 - Doesn't show any register
PostPosted: Mon Jun 19, 2017 1:31 pm 
Offline

Joined: Wed Oct 10, 2012 12:32 pm
Posts: 9
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.


Top
 Profile  
 
 Post subject: Re: Syslog 2.1 - Doesn't show any register
PostPosted: Fri Jan 12, 2018 8:53 am 
Offline

Joined: Fri Sep 08, 2017 6:38 am
Posts: 2
Hi;

Your syslog_incomming table is on syslog data base or cacti data base?


Top
 Profile  
 
 Post subject: Re: Syslog 2.1 - Doesn't show any register
PostPosted: Sun Jan 14, 2018 8:46 pm 
Offline
Cacti User
User avatar

Joined: Wed Jul 20, 2016 8:00 pm
Posts: 127
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:
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.1.21
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
Code:
SYSTEM STATS: Time:17.7383 Method:spine Processes:1 Threads:10 Hosts:279 HostsPerProcess:279 DataSources:7309 RRDsProcessed:3718

Code:
WEATHERMAP STATS: Weathermap 0.98 run complete - Thu, 16 Nov 17 08:42:56 +1300: 39 maps were run in 23.22 seconds with 0 warnings.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group