Title: Centralised logging via rsyslog · Issue #4093 · apache/cloudstack · GitHub
Open Graph Title: Centralised logging via rsyslog · Issue #4093 · apache/cloudstack
X Title: Centralised logging via rsyslog · Issue #4093 · apache/cloudstack
Description: ISSUE TYPE Feature Idea COMPONENT NAME Systemvm CLOUDSTACK VERSION It can be merge to 4.14 CONFIGURATION OS / ENVIRONMENT Used Ubuntu 18:04 as a host for management server and KVM Hypervisor. SUMMARY Hello Cloudstack community. There is ...
Open Graph Description: ISSUE TYPE Feature Idea COMPONENT NAME Systemvm CLOUDSTACK VERSION It can be merge to 4.14 CONFIGURATION OS / ENVIRONMENT Used Ubuntu 18:04 as a host for management server and KVM Hypervisor. SUMMA...
X Description: ISSUE TYPE Feature Idea COMPONENT NAME Systemvm CLOUDSTACK VERSION It can be merge to 4.14 CONFIGURATION OS / ENVIRONMENT Used Ubuntu 18:04 as a host for management server and KVM Hypervisor. SUMMA...
Opengraph URL: https://github.com/apache/cloudstack/issues/4093
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Centralised logging via rsyslog","articleBody":"##### ISSUE TYPE\r\n * Feature Idea\r\n\r\n##### COMPONENT NAME\r\n~~~\r\nSystemvm\r\n~~~\r\n\r\n##### CLOUDSTACK VERSION\r\n~~~\r\nIt can be merge to 4.14\r\n~~~\r\n\r\n##### CONFIGURATION\r\n\u003c!--\r\nInformation about the configuration if relevant, e.g. basic network, advanced networking, etc. N/A otherwise\r\n--\u003e\r\n\r\n\r\n##### OS / ENVIRONMENT\r\nUsed Ubuntu 18:04 as a host for management server and KVM Hypervisor.\r\n\r\n##### SUMMARY\r\n\r\nHello Cloudstack community. There is a systemvm remote logging feature proposal. It enabled administrator to access systemvm's log file through management server. I think it would be interesting for other as well. To better explaining my setup I depicted the configuration in below picture.\r\n\r\n\r\n\r\nIn this case rather than downloading log file manually from systemvms, they will be available automatically through management server.\r\n\r\n### STEPS TO REPRODUCE\r\n\r\nBelow are configuration files for hypervisor, management server and sytemvms.\r\n\r\n#### Hypervisors\r\n\r\nBelow 4 lines have to uncommented in rsyslog configuration file on each hypervisor in `/etc/rsyslog.conf`\r\n\r\n```Python\r\nmodule(load=\"imtcp\")\r\ninput(type=\"imtcp\" port=\"514\")\r\n\r\nmodule(load=\"imudp\")\r\ninput(type=\"imudp\" port=\"514\")\r\n```\r\n\r\nAdding below file on each hypervisor to export logs from hypervisor to management server.\r\n\r\n```Java\r\n# cat /etc/rsyslog.d/00-fwd.conf\r\nif ($fromhost-ip startswith '169.') then {\r\n *.* @\u003cManagement Server IP\u003e:514\r\n stop\r\n}\r\n```\r\n\r\n#### Management Server\r\n\r\nJust like hypervisors, below 4 lines have to uncommented in rsyslog configuration file on management server in `/etc/rsyslog.conf`\r\n\r\n```Python\r\nmodule(load=\"imtcp\")\r\ninput(type=\"imtcp\" port=\"514\")\r\n\r\nmodule(load=\"imudp\")\r\ninput(type=\"imudp\" port=\"514\")\r\n```\r\n\r\nAdd below file on management server\r\n\r\n```Java\r\n# cat /etc/rsyslog.d/00-remote.conf\r\n$template remote-incoming-logs,\"/var/log/rsyslog/%HOSTNAME%/syslog\"\r\n$template remote-incoming-logs-combined,\"/var/log/rsyslog/remote\"\r\nif ($fromhost-ip startswith '10.' or $fromhost-ip startswith '172.') then ?remote-incoming-logs\r\nif ($fromhost-ip startswith '10.' or $fromhost-ip startswith '172.') then ?remote-incoming-logs-combined\r\n\u0026 ~ \r\n```\r\n\r\n#### Systemvm\r\n\r\n`00-fwd.conf` file should add on each systemvm as well to export logs from systemvms to hypervisors.\r\n\r\n```Java\r\n# cat /etc/rsyslog.d/00-fwd.conf\r\n*.* @169.254.0.1:514\r\n```\r\n\r\n`49-cloud.conf` file should add on each systemvm. This file describes the logs that eventually sent to a management server\r\n\r\n```Java\r\n # cat /etc/rsyslog.d/49-cloud.conf\r\n$InputFileName /var/log/cloud.log\r\n$InputFileTag cloud\r\n$InputFileStateFile stat-file1-cloud\r\n$InputFileSeverity info \r\n$InputFileFacility local7 \r\n$InputFilePollInterval 1 \r\n$InputFilePersistStateInterval 1 \r\n$InputRunFileMonitor\r\n```\r\n \r\nNeed to uncomment below lines if they are commented in /etc/rsyslog.conf\r\n\r\n```python\r\n$ModLoad imudp\r\n$UDPServerRun 3914\r\n```\r\n\r\n##### EXPECTED RESULTS\r\n\r\n~~~\r\nManagement server store systemvm's logs in /var/log/rsyslog/\u003cSystemvm's host name\u003e/syslog\r\n~~~\r\n","author":{"url":"https://github.com/soreana","@type":"Person","name":"soreana"},"datePublished":"2020-05-20T10:24:52.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":13},"url":"https://github.com/4093/cloudstack/issues/4093"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d8eb2950-0a8d-f156-5e67-0a5d6df35162 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C77E:162B2:1F6D9C5:2B76755:6A4ED3C4 |
| html-safe-nonce | 494419bcea51a8f3b28982175a34a544546d1140ddcbf6906b0b12296f89decd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNzdFOjE2MkIyOjFGNkQ5QzU6MkI3Njc1NTo2QTRFRDNDNCIsInZpc2l0b3JfaWQiOiI2NTExMzM1MzQ5MjYzNzE3MzE2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 254381125ef435e41735f038596675ec6f5eaa6f0747fe523da1bd87d7cb8c63 |
| hovercard-subject-tag | issue:621646900 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/apache/cloudstack/4093/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8d81d95c5d8aa7c3fd3d21dda1318e6c6d1676777c887147e5819e73c936dc00/apache/cloudstack/issues/4093 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8d81d95c5d8aa7c3fd3d21dda1318e6c6d1676777c887147e5819e73c936dc00/apache/cloudstack/issues/4093 |
| og:image:alt | ISSUE TYPE Feature Idea COMPONENT NAME Systemvm CLOUDSTACK VERSION It can be merge to 4.14 CONFIGURATION OS / ENVIRONMENT Used Ubuntu 18:04 as a host for management server and KVM Hypervisor. SUMMA... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | soreana |
| hostname | github.com |
| expected-hostname | github.com |
| None | 41b6ab3ba6d20a71766ac245b5a4a94c6fc672a9cd4da7d44c1b33ab8bf6a21c |
| turbo-cache-control | no-preview |
| go-import | github.com/apache/cloudstack git https://github.com/apache/cloudstack.git |
| octolytics-dimension-user_id | 47359 |
| octolytics-dimension-user_login | apache |
| octolytics-dimension-repository_id | 9759448 |
| octolytics-dimension-repository_nwo | apache/cloudstack |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 9759448 |
| octolytics-dimension-repository_network_root_nwo | apache/cloudstack |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c37fe3e3f5f306900bd5b6bee97463f66c938b2c |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width