hosting template nulled
Firstly, syslog-ng
I use Ubuntu, so you can use your package manager and run the practice
apt-get install syslog-ng
Then whip the file / etc / syslog-ng / syslog-ng.conf your favorite editor and add this to the configuration.
Home s_net (
UDP (IP (10.0.0.58) port (514));
TCP (IP (10.0.0.58) port (51400));
);
The should be 10.0.0.58 IP address to syslog-ng to listen, be related to syslog-ng server.
Also add the following to syslog-ng write to a particular Tube:
d_mysql destination (
( "/ Tmp Tube / mysql.pipe"
template ( "INSERT INTO logs (host, facility, priority, level, tag, date,
time, program, msg) VALUES ( '$ HOST', '$ FUND', '$ PRIORITY' Level '$', '$ Tag',
YEAR MONTH $ $ $-Day "Program" HOUR: $ MIN: $ SEC ',' $ msg ',' $ ') N ") template escape (yes));
);
And to make things go s_net comes d_mysql:
log (
Source (s_net);
Destination (d_mysql);
);
Make a pipe that syslog-ng can write this command:
mkfifo / tmp / mysql.pipe
MySQL
Installing the MySQL database like this:
CREATE DATABASE syslog
Syslog USE
CREATE TABLE records (
Home varchar (32) default NULL,
facility varchar (10) default NULL,
priority varchar (10) default NULL,
level varchar (10) default NULL,
tag varchar (10) default NULL,
Date default NULL,
hours delay default NULL,
program varchar (15) default NULL,
msg text
seq int (10) NOT NULL,
PRIMARY KEY (SS)
Password Host (host)
KEY seq (seq)
Key Program (Program)
Key time (time)
Key date (date)
Key priority (priority)
KEY facility (facility)
) TYPE = MyISAM;
# Also create the user, replace the username and password
GRANT ALL PRIVILEGES ON syslog .* TO SyslogNG @ localhost IDENTIFIED BY mypassword BY'';
Running This command to channel the query to MySQL, preferably on a screen or make a script that can run in the background.
SyslogNG mysql-u – Password = mypassword syslog
Restart the syslog-ng process now:
/ Etc / init.d / syslog-ng stop
/ Etc / init.d / Syslog-ng start
Cisco Syslog Configuration
Now all you have to do in the Cisco router is a simple order entry which is the syslog database.
Router (config) # logging 10.0.0.58
This will cause the Cisco router to send all output to log syslog-ng process 10.0.0.58
I made a simple PHP page that makes the syslog output more visible, is something we can do with ease.
Look for more cisco related tips and tricks on my website!
Espen Holm Nilsen is a network technician for a Norwegian ISP, you can find his Cisco Network blog at http://www.gho.no/
|
|
|
Scooter .Jumping All Over The World Official Video HD + 3D
Leave a Reply
Using Gravatars in the comments - get your own and be recognized!
XHTML: These are some of the tags you can use:
<a href=""> <b> <blockquote> <code> <em> <i> <strike> <strong>