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

[Fleet]: No data available under Data Streams for installed Agents. #654

Closed
amolnater-qasource opened this issue Jun 29, 2022 · 19 comments · Fixed by elastic/kibana#135817
Closed
Assignees
Labels
bug Something isn't working impact:high Short-term priority; add to current release, or definitely next. Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Comments

@amolnater-qasource
Copy link

Kibana version: 8.4 Snapshot Kibana cloud environment

Host OS and Browser version: All, All

Build details:

VERSION: 8.4.0 Snapshot cloud
BUILD: 53518
COMMIT: 8a54c809495bc08782359073d9392f25c8eb6499

Preconditions:

  1. 8.4 Snapshot Kibana cloud environment should be available.
  2. Agent should be installed using Policy.

Steps to reproduce:

  1. Navigate to Fleet>Agents tab.
  2. Observe agents installed Healthy under Agents tab.
  3. Navigate to Data Streams and observe no data available for any integrations.

Expected Result:
Data should be available under Data Streams for installed Agents.

Logs:
elastic-agent-diagnostics-2022-06-29T05-32-50Z-00.zip

Screenshots:

9
10

@amolnater-qasource amolnater-qasource added bug Something isn't working impact:critical Immediate priority; high value or cost to the product. Team:Fleet Label for the Fleet team labels Jun 29, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@amolnater-qasource
Copy link
Author

@manishgupta-qasource Please review.

@manishgupta-qasource
Copy link

Secondary review for this ticket is Done

@jen-huang
Copy link

@amolnater-qasource I see you included the agent log files for the windows agent. Could you include them for the Ubuntu agent as well? Going to transfer this to the agent team as this seems to be a data ingestion issue and not a UI one.

@jen-huang jen-huang transferred this issue from elastic/kibana Jun 30, 2022
@jen-huang jen-huang added Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team and removed Team:Fleet Label for the Fleet team labels Jun 30, 2022
@jen-huang
Copy link

cc @pierrehilbert

@pierrehilbert
Copy link
Contributor

@amolnater-qasource : As it seems to be the same for each OS, could you please provide me linux agent logs?

@amolnater-qasource
Copy link
Author

Hi @jen-huang @pierrehilbert
We have revalidated on latest 8.4 Snapshot Kibana cloud-staging environment and found that the issue is still reproducible.

  • No data available under Data Streams for installed Agents.

Build details:
BUILD: 54160
COMMIT: b509d2466e88bf6c4386d8dd5fe89b5c8a54a97f

Logs:
Windows:
Windows.zip

Linux:
Linux.zip

MAC:
MAC.zip

Please let us know if anything else is required from our end.
Thanks

@pierrehilbert
Copy link
Contributor

In addition, could you please share with me the link to the kibana?

@amolnater-qasource
Copy link
Author

Hi @pierrehilbert
We have shared the required 8.4 Snapshot Kibana details over slack.

Please let us know if anything else is required from our end.
Thanks

@pierrehilbert
Copy link
Contributor

Hello,
By using the credentials I was able to see an http error:
Capture d’écran 2022-07-06 à 14 33 35
After that I saw that we have Data Streams in the Stack Management > Index Management > Data Streams
Capture d’écran 2022-07-06 à 14 34 24
My thoughts are that it's related to Fleet UI. @kpollich will take a look to check if it's the case.

@jen-huang
Copy link

jen-huang commented Jul 6, 2022

Thanks for the investigation @pierrehilbert! Is the lack of event.ingested field something to look into?

Edit: closing loop, Kyle has explanation for missing field here: elastic/kibana#135858

@amolnater-qasource amolnater-qasource added the QA:Ready For Testing Code is merged and ready for QA to validate label Jul 7, 2022
@amolnater-qasource
Copy link
Author

Hi @kpollich
We have revalidated this issue on latest 8.4 Snapshot and found it fixed now.

  • Data is available under Data Streams for installed Agents.

Build details:
BUILD: 54370
COMMIT: 27befe47a084f7b046426aa3edac01293d6e407b

Screenshot:
11

Hence marking this as QA:Validated.
Thanks

@amolnater-qasource
Copy link
Author

Hi @pierrehilbert
While testing logstash output on 8.4 Snapshot Kibana cloud environment, we have observed this issue reproducible.

Steps followed:

  1. Create 3 certs ca, client and logstash with below commands:
elasticsearch-certutil ca --pem
elasticsearch-certutil cert --name logstash --ca-cert C:\elk\elasticsearch\ca\ca.crt --ca-key C:\elk\elasticsearch\ca\ca.key --pem
elasticsearch-certutil cert --name client --ca-cert C:\elk\elasticsearch\ca\ca.crt --ca-key C:\elk\elasticsearch\ca\ca.key --pem

  1. Convert the logstash key to pkcs8 as it is the only format supported by logstash:

openssl pkcs8 -inform PEM -in logstash.key -topk8 -nocrypt -outform PEM -out logstash.pkcs8.key

  1. Create logstash output-My Logstash Output(could be any):

Add logstash hosts: 10.10.10.10:5044 (machine ip)

Add below certs:

In Server SSL certificate we added- ca certificate.
In Client SSL certificate we added- client certificate.
In Client SSL certificate SSL key we added- client certificate key.

  1. Added required configuration in pipelines.yml and created elastic-agent-pipeline.conf.

pipelines.yml:

- pipeline.id: elastic-agent-pipeline
  path.config: "C:\elk\logstash\config\elastic-agent-pipeline.conf"

elastic-agent-pipeline.conf:

input {
  elastic_agent {
    port => 5044
    ssl => true
    ssl_certificate_authorities => ["C:\elk\elasticsearch\ca\ca.crt"]
    ssl_certificate => "C:\elk\elasticsearch\logstash\logstash.crt"
    ssl_key => "C:\elk\elasticsearch\logstash\logstash.pkcs8.key"
    ssl_verify_mode => "force_peer"
  }
}

output {
  elasticsearch {
    hosts => ["https://10.10.10.10:9200"](https://10.10.10.10:9200/)
    api_key => "zorYA4ABQH2oZOWhPX_Q:_Y00OErrQGCRr5tJBE1_zQ"
    data_stream => true
    ssl => true
   # cacert => 
  }
}

  1. Run logstash from bin using below command:

logstash -f C:\elk\logstash\config\elastic-agent-pipeline.conf

  1. Create new policy with integrations output selected as- My Logstash Output.
  2. Run Agent install command for second agent.
  3. Observe data for System integration for this installed agent under Data Streams tab.
  4. Add OSQuerybeat integration and observe data for OSQuerybeat data too.

After some time Kibana get logged out itself and we observed all data streams removed under Data Streams tab.
However, we have observed new data under Discover tab.

Screenshots:
15
14
14

Build details:

VERSION: 8.4.0
BUILD: 54378
COMMIT: 17a2bcc82856ea7720f684a5f0e2ab0664517401

Hence we are re-opening this issue and sharing the kibana build over slack.

Thanks

@joshdover joshdover added impact:high Short-term priority; add to current release, or definitely next. and removed impact:critical Immediate priority; high value or cost to the product. labels Jul 12, 2022
@joshdover
Copy link
Contributor

After some time Kibana get logged out itself and we observed all data streams removed under Data Streams tab.
However, we have observed new data under Discover tab.

Want to make sure I understand what's happening here. @amolnater-qasource you were able to see the data streams created from data ingested via Logstash, but then they disappeared after some time even though no ingest changes were made?

Could you check the event.ingested field on the documents you're seeing in discover and share a screenshot of the data including the data_stream.dataset and data_stream.type fields?

@amolnater-qasource
Copy link
Author

Hi @joshdover
Thank you for looking into this.

you were able to see the data streams created from data ingested via Logstash, but then they disappeared after some time even though no ingest changes were made?

Yes we were able see the data streams, however after adding both the integrations (System & OSQueryManager) and passing few minutes we observed authentication error and also error pop-ups like shown below:
image

After few failed attempts of logging in to environment because of session errors and we were able to login to the environment.
However when we navigated to Data Streams tab, none of the previous data streams were available.

Further please find below event.ingested field results under Discover tab:
2
3

Json file for elastic_agent.metricbeat dataset:
event-ingested.txt

Please let us know if anything else is required from our end.
Thanks

@joshdover
Copy link
Contributor

Thanks for the information. I think the best course of action would be to have a developer dig into this on the cluster you have (if you haven't deleted it of course). @kpollich would you agree?

@kpollich
Copy link
Member

Yes it'd be great to get access to this cluster to take a look at the data streams API response in detail.

@amolnater-qasource
Copy link
Author

Hi @kpollich @joshdover
We have shared the existing environment over slack.

Further we will be revalidating the shared issue under #654 (comment) on latest 8.4 Snapshot Kibana environment and will be logging a separate issue if found reproducible again.

Please let us know if anything else is required from our end.
Thanks

@amolnater-qasource
Copy link
Author

Hi Team
We have revalidated this issue on latest 8.4 Snapshot and found it reproducible there.

  • For reproducing this issue we need to run a live query at OSQuery tab and data under data streams gets removed.

We have logged a separate issue for this at #721
Hence we are closing this.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working impact:high Short-term priority; add to current release, or definitely next. Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants