You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/08/09 11:45:05 UTC

[GitHub] [cloudstack] soreana commented on pull request #5296: [WIP] Centralized logging capability. Follow up on the #4108

soreana commented on pull request #5296:
URL: https://github.com/apache/cloudstack/pull/5296#issuecomment-895155940


   @rhtyd @DaanHoogland @weizhouapache 
   
   I have added a new global setting to enable/disable the remote logging in system VMs and router VMs. Based on the `systemvm.remote.logging.enabled` value which is passed to system VMs through `cmdline` it decide whether send the logs to a remote server or not. One missing part of this puzzle is the changes in nodes and management servers. I wasn't sure where I should add the changes, I need your help with that.
   
   One option is to leave it as is and let the system administrator be in charge of changes in management servers and nodes. Another option is that cloudstack changes the following files in the management server/agent restart. I prefer to automate the procedure as much as possible, but I don't know how to achieve that. I appreciate any help.
   
   ### Changes in nodes:
   
   1. edit `/etc/rsyslog.conf` and uncomment/comment the following lines.
   
   ```Python
   module(load="imtcp")
   input(type="imtcp" port="514")
   
   module(load="imudp")
   input(type="imudp" port="514")
   ```
   
   
   2. Adding below file on each hypervisor to export logs from hypervisor to management server.
   
   ```Java
   # cat /etc/rsyslog.d/00-fwd.conf
   if ($fromhost-ip startswith '169.') then {
       *.* @<Management Server IP>:514
       stop
   }
   ```
   
   ### Changes in management servers:
   
   1. Just like nodes, below 4 lines have to uncommented in rsyslog configuration file on management server in `/etc/rsyslog.conf`
   
   ```Python
   module(load="imtcp")
   input(type="imtcp" port="514")
   
   module(load="imudp")
   input(type="imudp" port="514")
   ```
   
   2. Add below file on management server
   
   ```Java
   # cat /etc/rsyslog.d/00-remote.conf
   $template remote-incoming-logs,"/var/log/rsyslog/%HOSTNAME%/syslog"
   $template remote-incoming-logs-combined,"/var/log/rsyslog/remote"
   if ($fromhost-ip startswith '10.' or $fromhost-ip startswith '172.') then ?remote-incoming-logs
   if ($fromhost-ip startswith '10.' or $fromhost-ip startswith '172.') then ?remote-incoming-logs-combined
   & ~ 
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org