Add Increasing log level for Insights IoP#4633
Add Increasing log level for Insights IoP#4633Lennonka wants to merge 4 commits intotheforeman:masterfrom
Conversation
|
The PR preview for 00db915 is available at theforeman-foreman-documentation-preview-pr-4633.surge.sh The following output files are affected by this PR: |
chris1984
left a comment
There was a problem hiding this comment.
Left some comments to help with your PR
| [role="_abstract"] | ||
| You can increase the logging level for {insights-iop} to `DEBUG` to get more detailed logs. | ||
| You can find the logs in `/var/log/messages`. | ||
| The default log level is `INFO`. // TODO: are there multiple defaults? |
There was a problem hiding this comment.
Most are set to INFO We had one set to ERROR by default:
logging:
version: 1
disable_existing_loggers: false
loggers:
insights.core.dr:
level: "ERROR"
insights_messaging:
level: "INFO"
insights_kafka_service:
level: "INFO"
"":
level: "INFO"There was a problem hiding this comment.
"": level: "INFO"
What exactly does this ^^ mean?
And what is the generic term for these things: insights.core.dr, insights_messaging, insights_kafka_service? Components? Containers? Just loggers?
I hesitate to call them "services" because we call the functionalities services (advisor, vulnerability).
There was a problem hiding this comment.
@dkuc do you have an idea what we should call these in the docs ^
There was a problem hiding this comment.
I would hope this remains an internal implementation detail and not documented.
| + | ||
| [options="nowrap", subs="+quotes,verbatim,attributes"] | ||
| ---- | ||
| # // TODO: Add the command to check the log level |
There was a problem hiding this comment.
You can run this:
podman exec iop-core-engine cat /var/config.yml | grep -A15 "logging:" which would return this:
logging:
version: 1
disable_existing_loggers: false
loggers:
insights.core.dr:
level: "DEBUG"
insights_messaging:
level: "DEBUG"
insights_kafka_service:
level: "DEBUG"
"":
level: "DEBUG"You can cat /var/log/messages and you will see this:
Feb 2 12:24:09 ip-10-0-168-10 iop-core-engine[177812]: DEBUG:insights.core.dr:telemetry.rules.plugins.networking.network_vlan_i40e_driver_offloading_issue.check_bond_master_slave_config missing requirements All: ['telemetry.rules.plugins.networking.bonding.check_bond_master_slave_conn'] There was a problem hiding this comment.
You can cat
/var/log/messagesand you will see this:Feb 2 12:24:09 ip-10-0-168-10 iop-core-engine[177812]: DEBUG:insights.core.dr:telemetry.rules.plugins.networking.network_vlan_i40e_driver_offloading_issue.check_bond_master_slave_config missing requirements All: ['telemetry.rules.plugins.networking.bonding.check_bond_master_slave_conn']
@chris1984 Can you, please, get me more examples with the default logging levels?
And the ip-10-0-168-10 string is a hostname? I'd prefer to anonymize it for the docs.
There was a problem hiding this comment.
Here are some logs with the info level set:
Feb 3 10:39:54 ip-xxx.example.com iop-core-engine[213708]: INFO:insights.core.dr:Trying telemetry.rules.plugins.sap.sap_hana_loose_sudo.check_group_members
Feb 3 10:39:54 ip-xxx.example.com iop-core-engine[213708]: INFO:insights.core.dr:Trying telemetry.rules.plugins.sap.sap_hana_loose_sudo.report
Feb 3 10:39:54 ip-xxx.example.com iop-core-engine[213708]: INFO:insights.core.dr:Trying telemetry.rules.plugins.ros.ros_instance_evaluation.find_solution
Feb 3 10:39:54 ip-xxx.example.com iop-core-engine[213708]: INFO:insights.core.dr:Trying telemetry.rules.plugins.ros.ros_instance_evaluation.report
Feb 3 10:39:54 xxx.example.com iop-core-engine[213708]: INFO:insights_kafka_service.consumer:Completed processing request id 4be0099772a23aad477e493990247876
Feb 3 10:39:54 xxx.example.com iop-core-engine[213708]: INFO:insights_messaging.consumers.kafka:Completed one payload| + | ||
| [options="nowrap", subs="+quotes,verbatim,attributes"] | ||
| ---- | ||
| # {foreman-installer} // TODO: Add the command to increase the log level |
There was a problem hiding this comment.
foreman-installer -l info --iop-core-engine-log-level-insights-core-dr DEBUG --iop-core-engine-log-level-insights-kafka-service DEBUG --iop-core-engine-log-level-insights-messaging DEBUG --iop-core-engine-log-level-root DEBUGThere was a problem hiding this comment.
Is the -l info argument absolutely necessary in here? Isn't that the default?
We have a section to set the logging level for installer separately.
There was a problem hiding this comment.
Yeah that is fine to remove the -l info I just use that so I can see what the installer is doing, so it was from my copy and paste.
| .Log entries of {insights-iop} | ||
| ==== | ||
| ---- | ||
| // TODO: Examples with default log levels | ||
| ---- |
There was a problem hiding this comment.
@chris1984 FYI, this is my intention with the examples of log entries.
| ---- | ||
| logging: | ||
| version: 1 | ||
| disable_existing_loggers: false | ||
| loggers: | ||
| insights.core.dr: | ||
| level: "ERROR" | ||
| insights_messaging: | ||
| level: "INFO" | ||
| insights_kafka_service: | ||
| level: "INFO" | ||
| "": | ||
| level: "INFO" | ||
| ---- |
There was a problem hiding this comment.
| ---- | |
| logging: | |
| version: 1 | |
| disable_existing_loggers: false | |
| loggers: | |
| insights.core.dr: | |
| level: "ERROR" | |
| insights_messaging: | |
| level: "INFO" | |
| insights_kafka_service: | |
| level: "INFO" | |
| "": | |
| level: "INFO" | |
| ---- | |
| ---- | |
| loggers: | |
| insights.core.dr: | |
| level: "ERROR" | |
| insights_messaging: | |
| level: "INFO" | |
| insights_kafka_service: | |
| level: "INFO" | |
| "": | |
| level: "INFO" | |
| ---- |
@chris1984 Will it still make sense if I reduce it like this? Or would you advise me against it? Or perhaps I should use a different formatting altogether, such as a list?
There was a problem hiding this comment.
That is fine to reduce it like that, line 19 - 27 is what the installer pr changes, so we can focus on that. Let me know if you want me to try and find a better grep command
|
@chris1984 Is the same doc update applicable to Sat 6.18? |
No it's not, unless we decide to backport it. I guess for now until we are given that direction we just put it in the Sat 6.19 docs. If I hear anything about a backport, I will make a follow up Jira |
DRAFT = Not ready for review!
What changes are you introducing?
Adding a procedure to increase the logging level for Insights IoP services
Why are you introducing these changes? (Explanation, links to references, issues, etc.)
New feature
Documents theforeman/puppet-iop#90
SAT-42054 (public)
Anything else to add? (Considerations, potential downsides, alternative solutions you have explored, etc.)
Contributor checklists
Please cherry-pick my commits into: