Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate logging to /var/log/messages #21211

Closed
lamm opened this issue May 11, 2021 · 4 comments
Closed

Duplicate logging to /var/log/messages #21211

lamm opened this issue May 11, 2021 · 4 comments
Assignees
Labels

Comments

@lamm
Copy link

lamm commented May 11, 2021

Hello,
We just installed a kasparov (kasparov-1.20210203001902_15acbea) VMWare appliance and we noticed ManageIQ logs are written to /var/log/messages. This make /var/log 100% full.
Here is a short extract of /var/log/messages

May 11 14:23:52 kasparovtest manageiq[1348088]: INFO -- manageiq: MiqVimUpdate.monitorUpdatesSince (test.local_TEST\miquser): applying update...Starting (version = 398196)
May 11 14:23:52 kasparovtest manageiq[1348088]: INFO -- manageiq: MiqVimUpdate.monitorUpdatesSince (test.local_TEST\miquser): applying update...Complete (version = 398196)
May 11 14:23:52 kasparovtest manageiq[1348088]: INFO -- manageiq: MiqVimUpdate.monitorUpdatesSince (test.local_TEST\miquser): call to waitForUpdates...Starting (version = 398196)
May 11 14:23:52 kasparovtest manageiq[1348088]: INFO -- manageiq: HandSoap Request  [47430619788780]: length: [484], URI: [https://test.local/sdk], Content-Type: [text/xml;charset=UTF-8], SOAPAction: [WaitForUpdatesEx]
May 11 14:23:52 kasparovtest manageiq[2944]: INFO -- manageiq: EMS: [VCENTER], id: [1000000000023] Saving EMS Inventory...
May 11 14:23:52 kasparovtest manageiq[3097628]: INFO -- manageiq: MIQ(ManageIQ::Providers::Vmware::InfraManager::Inventory::Collector#process_update_set) EMS: [DIGSVVMWVC67DA], id: [1000000000021] Processing 100 updates...Complete
May 11 14:23:52 kasparovtest manageiq[554460]: INFO -- manageiq: MIQ(MiqGenericWorker::Runner#get_message_via_drb) Message id: [1000176518667], MiqWorker id: [1000001637276], Zone: [default], Role: [], Server: [], MiqTask id: [], Ident: [generic], Target id: [], Instance id: [], Task id: [], Command: [Storage.scan_watchdog], Timeout: [600], Priority: [100], State: [dequeue], Deliver On: [2021-05-11 12:23:47 UTC], Data: [], Args: [1000000412674], Dequeued in: [65.234230223] seconds
May 11 14:23:52 kasparovtest manageiq[554460]: INFO -- manageiq: MIQ(MiqQueue#deliver) Message id: [1000176518667], Delivering...
May 11 14:23:52 kasparovtest manageiq[1595248]: INFO -- manageiq: HandSoap Request  [47223504091460]: length: [484], URI: [https://digsvvmwvc67da.dig.intra.groupama.fr/sdk], Content-Type: [text/xml;charset=UTF-8], SOAPAction: [WaitForUpdatesEx]
May 11 14:23:52 kasparovtest manageiq[1595248]: INFO -- manageiq: HandSoap Response [47223504091460]: length: [6927], HTTP-Status: [200], Content-Type: [text/xml; charset=utf-8]
May 11 14:23:52 kasparovtest manageiq[2944]: INFO -- manageiq: EMS: [VCENTER], id: [1000000000023] Saving EMS Inventory...Complete
May 11 14:23:52 kasparovtest manageiq[2944]: INFO -- manageiq: MIQ(ManageIQ::Providers::Vmware::InfraManager::Inventory::Saver#post_refresh) EMS: [VCENTER], id: [1000000000023] Performing post-refresh operations for VmOrTemplate instances...
May 11 14:23:52 kasparovtest manageiq[554460]: INFO -- manageiq: MIQ(MiqQueue.put) Message id: [1000176518804],  id: [], Zone: [default], Role: [], Server: [], MiqTask id: [], Ident: [generic],
Target id: [], Instance id: [], Task id: [], Command: [Storage.scan_watchdog], Timeout: [600], Priority: [100], State: [ready], Deliver On: [2021-05-11 12:24:52 UTC], Data: [], Args: [1000000412674]
May 11 14:23:52 kasparovtest manageiq[554460]: INFO -- manageiq: MIQ(MiqQueue#delivered) Message id: [1000176518667], State: [ok], Delivered in [0.101587525] seconds
May 11 14:23:52 kasparovtest manageiq[2944]: INFO -- manageiq: MIQ(ManageIQ::Providers::Vmware::InfraManager::Inventory::Saver#post_refresh) EMS: [VCENTER], id: [1000000000023] Performing post-refresh operations for VmOrTemplate instances...Complete

These logs seem redundant with the those written in evm.log. Is there a way to avoid manageiq logs to be written in /var/log/messages ?

Thanks.

@Fryguy
Copy link
Member

Fryguy commented May 11, 2021

We're actually trying to go the other way around and make all messages go to /var/log and eventually drop the individual *.log files. However, in the meantime, there might be a way to disable it. @agrare do you know?

@agrare
Copy link
Member

agrare commented May 11, 2021

You can disable rsyslogd from importing journald messages by commenting out the following lines in /etc/rsyslog.conf:

#module(load="imjournal" 	    # provides access to the systemd journal
#       StateFile="imjournal.state") # File to store the position in the journal

@agrare agrare self-assigned this May 13, 2021
@agrare agrare added bug and removed question labels May 13, 2021
@agrare
Copy link
Member

agrare commented May 13, 2021

I'll put in a PR to update rsyslog.conf to disable duplicating the logging from journald into /var/log/messages by default

Fryguy added a commit to Fryguy/manageiq that referenced this issue Jun 10, 2021
In our production deployments, we don't need the log files, and, in fact, they
create issues. In appliances, we now use journald and the logs are duplicated
in both /var/www/miq/vmdb/log as well as /var/log/messages (see also ManageIQ#21211).
In containers, the logs fill up the local volume unnecessarily as they are
also output to STDOUT, and STDOUT is preferable because it can be scraped by
a log aggregator. As such, this PR stops logging to the log files in
production.

Resolves ManageIQ#21004, ManageIQ#21211

Co-authored-by: Keenan Brock <[email protected]>
kbrock added a commit to kbrock/manageiq that referenced this issue Jun 15, 2021
In our production deployments, we don't need the log files, and, in fact, they
create issues. In appliances, we now use journald and the logs are duplicated
in both /var/www/miq/vmdb/log as well as /var/log/messages (see also ManageIQ#21211).
In containers, the logs fill up the local volume unnecessarily as they are
also output to STDOUT, and STDOUT is preferable because it can be scraped by
a log aggregator. As such, this PR stops logging to the log files in
production.

Resolves ManageIQ#21004, ManageIQ#21211

Co-authored-by: Keenan Brock <[email protected]>
Fryguy added a commit to Fryguy/manageiq that referenced this issue Jun 22, 2021
In our production deployments, we don't need the log files, and, in fact, they
create issues. In appliances, we now use journald and the logs are duplicated
in both /var/www/miq/vmdb/log as well as /var/log/messages (see also ManageIQ#21211).
In containers, the logs fill up the local volume unnecessarily as they are
also output to STDOUT, and STDOUT is preferable because it can be scraped by
a log aggregator. As such, this PR stops logging to the log files in
production.

Resolves ManageIQ#21004, ManageIQ#21211

Co-authored-by: Keenan Brock <[email protected]>
Fryguy added a commit to Fryguy/manageiq that referenced this issue Jun 24, 2021
In our production deployments, we don't need the log files, and, in fact, they
create issues. In appliances, we now use journald and the logs are duplicated
in both /var/www/miq/vmdb/log as well as /var/log/messages (see also ManageIQ#21211).
In containers, the logs fill up the local volume unnecessarily as they are
also output to STDOUT, and STDOUT is preferable because it can be scraped by
a log aggregator. As such, this PR stops logging to the log files in
production.

Resolves ManageIQ#21004, ManageIQ#21211

Co-authored-by: Keenan Brock <[email protected]>
agrare pushed a commit to agrare/manageiq that referenced this issue Feb 14, 2022
In our production deployments, we don't need the log files, and, in fact, they
create issues. In appliances, we now use journald and the logs are duplicated
in both /var/www/miq/vmdb/log as well as /var/log/messages (see also ManageIQ#21211).
In containers, the logs fill up the local volume unnecessarily as they are
also output to STDOUT, and STDOUT is preferable because it can be scraped by
a log aggregator. As such, this PR stops logging to the log files in
production.

Resolves ManageIQ#21004, ManageIQ#21211

Co-authored-by: Keenan Brock <[email protected]>
agrare pushed a commit to agrare/manageiq that referenced this issue Feb 16, 2022
In our production deployments, we don't need the log files, and, in fact, they
create issues. In appliances, we now use journald and the logs are duplicated
in both /var/www/miq/vmdb/log as well as /var/log/messages (see also ManageIQ#21211).
In containers, the logs fill up the local volume unnecessarily as they are
also output to STDOUT, and STDOUT is preferable because it can be scraped by
a log aggregator. As such, this PR stops logging to the log files in
production.

Resolves ManageIQ#21004, ManageIQ#21211

Co-authored-by: Keenan Brock <[email protected]>
agrare pushed a commit to Fryguy/manageiq that referenced this issue May 18, 2022
In our production deployments, we don't need the log files, and, in fact, they
create issues. In appliances, we now use journald and the logs are duplicated
in both /var/www/miq/vmdb/log as well as /var/log/messages (see also ManageIQ#21211).
In containers, the logs fill up the local volume unnecessarily as they are
also output to STDOUT, and STDOUT is preferable because it can be scraped by
a log aggregator. As such, this PR stops logging to the log files in
production.

Resolves ManageIQ#21004, ManageIQ#21211

Co-authored-by: Keenan Brock <[email protected]>
agrare pushed a commit to Fryguy/manageiq that referenced this issue Jul 15, 2022
In our production deployments, we don't need the log files, and, in fact, they
create issues. In appliances, we now use journald and the logs are duplicated
in both /var/www/miq/vmdb/log as well as /var/log/messages (see also ManageIQ#21211).
In containers, the logs fill up the local volume unnecessarily as they are
also output to STDOUT, and STDOUT is preferable because it can be scraped by
a log aggregator. As such, this PR stops logging to the log files in
production.

Resolves ManageIQ#21004, ManageIQ#21211

Co-authored-by: Keenan Brock <[email protected]>
@Fryguy
Copy link
Member

Fryguy commented Oct 3, 2022

Fixed in #21177

@Fryguy Fryguy closed this as completed Oct 3, 2022
GilbertCherrie pushed a commit to GilbertCherrie/manageiq that referenced this issue Jul 7, 2023
In our production deployments, we don't need the log files, and, in fact, they
create issues. In appliances, we now use journald and the logs are duplicated
in both /var/www/miq/vmdb/log as well as /var/log/messages (see also ManageIQ#21211).
In containers, the logs fill up the local volume unnecessarily as they are
also output to STDOUT, and STDOUT is preferable because it can be scraped by
a log aggregator. As such, this PR stops logging to the log files in
production.

Resolves ManageIQ#21004, ManageIQ#21211

Co-authored-by: Keenan Brock <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants