Skip to main content

Can we send Vertica logs to a remote host using something like syslog (or other inbuilt mechanism?)

  • April 26, 2013
  • 4 replies
  • 20 views

James_2
Hi, Our DBAs need to read the vertica log files (in realtime) under the catalog directories however we would prefer not to give ssh access to the nodes. Instead we would like these logs presented on a separate host. We could share the catalog directory over nfs however I was hoping there would be another way to do it - possibly using something like rsyslog/syslog. Is this supported? Or is there an inbuilt mechanism in which Vertica can send these logs to a remote host? I'm not even sure if the Vertica logs are syslog compatible. Thanks James

4 replies

Forum|alt.badge.img+2
  • Participating Frequently
  • April 27, 2013
vertica log files are usually managed by the 'logrotate' linux utility. Please see the vertica docs for details of custom logrotate script. logrotate allows an arbitrary 'postrotate' command. Suppose you make the postrotate command be something like: pkill -f 'ssh -l remote_user cat' tail -f /a/databases/mydb/v_mydb_node0001_catalog/vertica.log | ssh -l remote_user cat \>> /dblogs/mydb/node0001.vertica.log & I'm pretty sure this will work, though if you get it running you might check that it's not adding too much load to cpu or network. [tail -f vertica.log | ssh host cat >>file works, I did not test the postrotate hack] Vertica does support syslog for _events_ like low-disk-space, or recovery-error (see the docs), but not for vertica.log. I strongly advise against having the catalog directory on nfs. The above hack or some equivalent will get you what you need without the substantial performance and integrity(of metadata) risks of nfs. -- George

James_2
  • Author
  • New Participant
  • April 29, 2013
Thanks George - I agree with you that NFS is not a good idea. However we would ideally like these logs in real time - I shall talk with the DBAs to see if this is really required. If so we may look at using rsyslog and the "imfile" approach to turn any log into syslog format so that we can send it however I am still unsure on how this may affect performance, i think we will just have to monitor it. Thanks James

Sai_Pasupulati
  • Participating Frequently
  • March 6, 2014
what is best way to check vertica log, is database is corrupted

Sai_Pasupulati
  • Participating Frequently
  • March 6, 2014
Write a reply