Here's an update...
So I took out one of the destinations in the log line of the syslog-ng config.
Restarted syslog-ng and it started working... and I only had one instance of the shell script in the process list...
Then I went back and added the second destination again,
log { source(net)...
In addition to logging to the mysqldb server, I am logging locally as well. And I see those logs being generated. I have also verified with a tcpdump.
I don't understand why the second instance of the shell script is being generated. I killed them both off, and just ran
./syslog2mysql.sh &...
Thanks for the script.
I've tried this previously, and it just sits there and doesn't send any data to the mysqldb server.
On the syslog server, if I do
ps -ef | grep mysql it returns:
root 27707 27073 0 08:10 pts/1 00:00:00 /bin/bash ./syslog2mysql.sh
root 27708 27707 0 08:10...
I made the changes that you recommended, but I think there's a problem with the shell script because the established connections are not going away, just compounding...
tcp 0 0 ip_of_mysqldb_server:3306 ip_of_syslog_server:35074 ESTABLISHED
... instead of being a...
I do see data in the tables.
If I do a netstat -an from the mysqldb server I see many connections, maybe 28000 total! It seems they may be half open connections, or connections that just never finished or are finishing....
So as you say, they are getting queued up and taking time to finish...
I have a syslog server relaying packets to the mysqldb server. Whenever I try to connect to the database I get the following:
# mysql -u root -p
Enter password:
ERROR 1040 (00000): Too many connections
I have the above script by Patrick Danu running in cron:
crontab -e -u root
@reboot...
Thanks! I can't believe I didn't realize that... lol, I was just specifying the db, so how could it know where the db was if I didn't specify the host!
Just did:
mysql -u 'user' --password='password' -h 'ip_of_mysql_db_server' 'database_name'
Also did a flush priv's.
Thanks again
I've read the Debian link, but I'm still having issues configuring the mysql connection. I ran the command:
mysql -u user --password="password" database_name
OR
mysql -u user database_name -p
I type the password and it kicks back the error:
ERROR 2002 (HY000): Can't connect to local MySQL...
Thanks for the reply.
So there's nothing built into syslog-ng to make the mysql connection, and therefore I'm forced to have a script push the logs to the database?
I'm running syslog-ng v 1.6.11 on RHEL 4. I can log to local files with no problem. I want to also log to a mysql database. I have a mysql database server with a syslog database configured to receive logs.
On the syslog-ng server, do I need mysql installed in order to make the mysql pipe...
The drives are SATA.
Thanks cndcadams. That is exactly what I did and it worked perfectly.
And Thanks to everyone else who replied. It is greatly appreciated.
Basically, I did:
prtvtoc
prtvtoc /dev/rdsk/c0t0d0s0 | /usr/sbin/fmthard -s - /dev/rdsk/c0t1d0s0 > /dev/null
use iostat -En to see...
I have two identical machines. One of the machines is built up and I want the image that drive to the other machine. What is the best way?
Some options that I was thinking about:
a. dd if= of=
but then I've read there could be issues with unique identifiers.
b. flarcreate to create the...
Putting the bad drive back in didn't help so I re-partitioned the 'good' drive, and received a different message saying to run fsck.
Good sign, right? lol
I run:
fsck -F ufs -y /dev/....
Receive message Bad Super Block, use and Alternate.
I then use 32:
fsck -F ufs -o b=32 /dev...
Message is...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.