Skip to content

Add Increasing log level for Insights IoP#4633

Draft
Lennonka wants to merge 4 commits intotheforeman:masterfrom
Lennonka:iop-log-levels
Draft

Add Increasing log level for Insights IoP#4633
Lennonka wants to merge 4 commits intotheforeman:masterfrom
Lennonka:iop-log-levels

Conversation

@Lennonka
Copy link
Contributor

@Lennonka Lennonka commented Feb 4, 2026

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

  • I am okay with my commits getting squashed when you merge this PR.
  • I am familiar with the contributing guidelines.

Please cherry-pick my commits into:

  • Foreman 3.17/Katello 4.19
  • Foreman 3.16/Katello 4.18 (Satellite 6.18; orcharhino 7.6)
  • Foreman 3.15/Katello 4.17
  • Foreman 3.14/Katello 4.16 (Satellite 6.17; orcharhino 7.4; orcharhino 7.5)
  • Foreman 3.13/Katello 4.15 (EL9 only)
  • Foreman 3.12/Katello 4.14 (Satellite 6.16; orcharhino 7.2 on EL9 only; orcharhino 7.3)
  • We do not accept PRs for Foreman older than 3.12.

@github-actions github-actions bot added Needs tech review Requires a review from the technical perspective Needs style review Requires a review from docs style/grammar perspective Needs testing Requires functional testing labels Feb 4, 2026
@github-actions
Copy link

github-actions bot commented Feb 4, 2026

Copy link
Member

@chris1984 chris1984 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

Copy link
Contributor Author

@Lennonka Lennonka Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

      "":
        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).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dkuc do you have an idea what we should call these in the docs ^

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'] 

Copy link
Contributor Author

@Lennonka Lennonka Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'] 

@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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member

@chris1984 chris1984 Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 DEBUG

Copy link
Contributor Author

@Lennonka Lennonka Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +10 to +14
.Log entries of {insights-iop}
====
----
// TODO: Examples with default log levels
----
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chris1984 FYI, this is my intention with the examples of log entries.

Comment on lines +18 to +31
----
logging:
version: 1
disable_existing_loggers: false
loggers:
insights.core.dr:
level: "ERROR"
insights_messaging:
level: "INFO"
insights_kafka_service:
level: "INFO"
"":
level: "INFO"
----
Copy link
Contributor Author

@Lennonka Lennonka Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
----
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?

Copy link
Member

@chris1984 chris1984 Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@Lennonka
Copy link
Contributor Author

Lennonka commented Feb 5, 2026

@chris1984 Is the same doc update applicable to Sat 6.18?

@chris1984
Copy link
Member

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs style review Requires a review from docs style/grammar perspective Needs tech review Requires a review from the technical perspective Needs testing Requires functional testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants