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

OSQuery results are not viewable in Kibana when upgrading to the 8.6.0 Agent running the OSQuery Manager integration #34250

Closed
kevinlog opened this issue Jan 12, 2023 · 7 comments · Fixed by #34246 or elastic/integrations#4990
Labels

Comments

@kevinlog
Copy link

When upgrading to the 8.6.0 Agent, OSQuery results will not be visible in Kibana due to changes in a couple values in documents that are shipped to ES by the OSQuery beat. These differing docs between OSQuery beat in the 8.5.x Agent and the 8.6.0 Agent cause the newer documents to be rejected by the logs-osquery_manager.result-* datastream.

Steps to Reproduce:

  1. Install the 8.5.x stack and enroll a 8.5.x Agent with the OSQuery Manager integration installed on the Agent policy
  2. Run a live query and see that the results are visible in Kibana
  3. Install the 8.6.0 stack and upgrade the Agent to 8.6.0
  4. Run a live query and see that the result are not visible in Kibana due to rejected documents as described above.
  • Version: 8.6.0
  • Operating System: Linux, Mac, Windows
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jan 12, 2023
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jan 12, 2023
@kevinlog kevinlog added needs_team Indicates that the issue/PR needs a Team:* label Team:Elastic-Agent Label for the Agent team labels Jan 12, 2023
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent (Team:Elastic-Agent)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jan 12, 2023
@botelastic
Copy link

botelastic bot commented Jan 12, 2023

This issue doesn't have a Team:<team> label.

@kevinlog
Copy link
Author

This is an internally confirmed bug in Agent and OSQuery beat for 8.6.0. I opened this so that it can be tracked externally

@aleksmaus
Copy link
Contributor

The proposal to support 8.6.0 and fix the issue in 8.6.1 is the following:

  1. Update osquerybeat configuration transformation to enforce the correct values for data_stream fields.
  2. Update osquery_manager integration to include the pipeline that sets the correct values for data_stream in order to fix the issues with 8.6.0 deployments already that are already installed.
  3. Document the additional logstash filter that needs to be used for 8.6.0 agents that will overwrite the data_stream fields in order to route the data into the correct datastream.
  4. Document in the release notes for 8.6.0

@aleksmaus
Copy link
Contributor

Please disregard the linked #33587 PR above, this was linked by mistake. Not sure how to unlink it.

The correct relevant PR link is the next one #34246

@aleksmaus
Copy link
Contributor

For the logstash the additional filter needs to be configured in the logstash pipeline only if the used with 8.6.0 version of the agent.
This is only needed for 8.6.0 elastic agent, since all the other versions are not affected.

This is want I tested so far works:

filter {
  if [data_stream][type] == "osquery" {
    mutate {
        replace => { "[data_stream][type]" => "logs" }
        replace => { "[data_stream][dataset]" => "osquery_manager.result" }
    }
  }
}

@kevinlog
Copy link
Author

The latest osquery_manager package 1.6.0 is now available. Users who upgraded to 8.6.0 from 8.5.x can workaround this problem today by doing the following.

In their deployment, click on "Add Integrations"
image

Click on the "Installed Integrations" tab and "Updates available"
image

Click on "OSQuery Manager" and then "Upgrade to latest version"
image

After the new assets install, users should be able to run queries with both 8.5.x and 8.6.0 Agents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants