Using Syslog with MySQL ClusterPosted on June 28th, 2010 No comments
By default, MySQL Cluster sends log data to a file but you can also send it to the console or to Syslog; this article explains how to send it to Syslog. The example given here is for LINUX.
In this example, I’ll use the “user” syslog facility name and so the first step is to make sure that syslog is configured to route those messages. If this hasn’t already been configured then add the following lines to /etc/rsyslog.conf:
# Log user messages to local files user.* /var/log/user
For the changes to take effect, restart the syslog service:
[root@ws1 etc]# service rsyslog restart Shutting down system logger: [ OK ] Starting system logger: [ OK ]
Note that you should make those changes as root.
Still as root, start up a stream of any additions to the new log file:
[root@ws1 etc]# tail -f /var/log/user
To tell Cluster to use Syslog, add this line into the [ndb_mgmd] section in config.ini:
and then start up your Cluster as normal.
You should now be able to see that MySQL Cluster information is being logged to /var/log/user.
You can adjust how much information is logged either through the config file or from the ndb_mgm tool, for example – to see when global checkpoints are written:
ndb_mgm> all clusterlog checkpoint=15 Executing CLUSTERLOG CHECKPOINT=15 on node 3 OK! Executing CLUSTERLOG CHECKPOINT=15 on node 4 OK!Note that a log-level of 15 will show all logs and 0 will show none. Other log categories besides CHECKPOINT are STARTUP, SHUTDOWN, STATISTICS, NODERESTART, CONNECTION, INFO, ERROR, CONGESTION, DEBUG and BACKUP.
Leave a reply