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

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

Comments

  • 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
  • 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
  • what is best way to check vertica log, is database is corrupted
  • Write a reply   

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file