Unix Technical Forum

mysql calling ulogd, come in ulogd!

This is a discussion on mysql calling ulogd, come in ulogd! within the Gentoo Linux Support forums, part of the Unix Operating Systems category; --> Hello. Would someone please tell me how to make ulogd feed data into a mysql database table? I used ...


Go Back   Unix Technical Forum > Unix Operating Systems > Gentoo Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-21-2008, 05:26 AM
chavez
 
Posts: n/a
Default mysql calling ulogd, come in ulogd!

Hello.

Would someone please tell me how to make ulogd feed data
into a mysql database table?

I used the file 'mysql.table.ipaddr-as-string' that
came with the ulogd package to create the database.

I changed the name of the database to 'ulogdatabase'
and the name of the table to 'ulogtable'.

Afaict, mysql "sees" the table just fine:

mysql> show databases;
+--------------+
| Database |
+--------------+
| menagerie |
| mysql |
| test |
| ulogdatabase |
+--------------+
4 rows in set (0.03 sec)

mysql> use ulogdatabase
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+------------------------+
| Tables_in_ulogdatabase |
+------------------------+
| ulogtable |
+------------------------+
1 row in set (0.00 sec)

mysql> describe ulogtable;

[..]

|
| pwsniff_user | varchar(30) | YES | | NULL |
|
| pwsniff_pass | varchar(30) | YES | | NULL |
|
| ahesp_spi | int(10) unsigned | YES | | NULL |
|
+---------------+----------------------+------+-----+---------+----------------+
42 rows in set (0.00 sec)

However,

mysql> select * from ulogtable;
Empty set (0.03 sec)

I have added

iptables -A FORWARD -j ULOG --ulog-nlgroup 32 --prefix foo

to /etc/ppp/ip-up.local and in /etc/ulogd.conf I have put

#
# ulogd_MYSQL.so: optional logging into a MySQL database
#
# database information
mysqldb ulogdatabase
mysqltable ulogtable
mysqluser mysql
mysqlpass
mysqlhost localhost
# load the plugin (remove the '#' if you want to enable it)
plugin /usr/lib/ulogd/ulogd_MYSQL.so

What might be a necessary and sufficient sequence of steps that would
persuade ulogd to feed data into my ulogdatabase?

In particular,

1. How can I tell if ulogd even knows that mysql is running?

2. How can I tell if ulogd knows about my ulogdatabase and ulogtable?

Thanks.

--

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:27 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com