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

Manually prepare mysql package (alpha) #323

Merged
merged 20 commits into from
Apr 21, 2020

Conversation

mtojek
Copy link
Contributor

@mtojek mtojek commented Apr 1, 2020

I'm opening this as draft to present all manual changes that were applied.

Changes:

Action items:

Closes: #317
Closes: #318
Closes: #319
Closes: #320

Screenshot:
screencapture-localhost-5601-ekv-app-ingestManager-2020-04-01-15_48_02

@mtojek mtojek requested a review from ruflin April 1, 2020 11:14
@mtojek mtojek self-assigned this Apr 1, 2020
description: Collect logs and metrics from MySQL instances
inputs:
- type: logs
description: Collecting MySQL logs
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be nice to also have a title for the logs and metrics input

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

default: 10s
- name: raw
type: bool
title: Raw (all fields from "SHOW /*!50002 GLOBAL */ STATUS;")
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we put this into the description?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

default:
- /var/log/mysql/mysql-slow.log*
- /var/lib/mysql/{{.builtin.hostname}}-slow.log
os.darwin:
Copy link
Contributor

Choose a reason for hiding this comment

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

The platform flags will not work yet but please keep them in as we plan to support them later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I adjusted all config properties with path variables.

show_user: true
default:
- /var/log/mysql/mysql-slow.log*
- /var/lib/mysql/{{.builtin.hostname}}-slow.log
Copy link
Contributor

Choose a reason for hiding this comment

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

Not supported yet, but we plan to add it: elastic/beats#17340 As soon as we add it we need to adjust this the way we need it. Best keep it as is for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I adjusted all config properties with path variables.

@mtojek mtojek force-pushed the package-mysql-0.0.2 branch from 335e9c8 to b4ffdfb Compare April 1, 2020 13:21
@mtojek
Copy link
Contributor Author

mtojek commented Apr 1, 2020

Also, screenshot updated.

@mtojek mtojek requested a review from ruflin April 1, 2020 13:49
@mtojek
Copy link
Contributor Author

mtojek commented Apr 2, 2020

@ruflin

After fixing the issue with merging vars, I managed to install the package flawlessly.

health status index                                  uuid                   pri rep docs.count docs.deleted store.size pri.store.size
yellow open   logs-mysql.error-default               PGiI_XKlRoumrhcBHRtldw   1   1         12            0     17.8kb         17.8kb
green  open   .apm-custom-link                       1hlCqV90QxSGfaahQos9_Q   1   0          0            0       208b           208b
yellow open   metrics-system.users-default           tVWFKAdyQgWxsvslCXJHIw   1   1       1510            0      1.1mb          1.1mb
green  open   .kibana_task_manager_1                 rotyxHtLTTC13l-e-IOpgA   1   0          5            7     32.3kb         32.3kb
yellow open   metrics-system.fsstat-default          NZBTRa11SKKO4kQWAb-XhQ   1   1        304            0      266kb          266kb
yellow open   metrics-system.raid-default            iH5Q93BPTZynPjE-PcgUlw   1   1       1242            0    986.8kb        986.8kb
yellow open   metrics-system.diskio-default          KcxO0FkBSk6ypXkHBDEdRQ   1   1       1244            0    980.2kb        980.2kb
yellow open   metrics-system.core-default            e0rlMsp1SHauqtNJbK69BA   1   1       1242            0   1008.8kb       1008.8kb
yellow open   metrics-system.network_summary-default byWDiHpVS9CqlROJIl8F7w   1   1       1764            0      1.2mb          1.2mb
yellow open   metrics-system.filesystem-default      wH30U3GlQ_q2THzXeUaITg   1   1        313            0    269.3kb        269.3kb
yellow open   metrics-system.cpu-default             4YAfxdPmRUqd_--J_UqVnA   1   1       1236            0    985.2kb        985.2kb
green  open   .apm-agent-configuration               JUeER1i-QSGOVp2_r4aNsg   1   0          0            0       208b           208b
yellow open   metrics-system.entropy-default         XeR7q0LARgu5nv7brBcsZw   1   1       1246            0   1020.1kb       1020.1kb
yellow open   metrics-system.service-default         iiyTJB2ASOmjP2UVJWdnOw   1   1       1252            0    965.2kb        965.2kb
yellow open   metrics-system.process_summary-default aLDlD2-NTzaX-1rFbjKfcg   1   1       1768            0      1.2mb          1.2mb
green  open   .kibana_1                              yxriaA3yRzy1kamcY_IQIg   1   0        375          207    509.5kb        509.5kb
yellow open   metrics-mysql.status-default           9fYhAPjER2eZwr0vyAhE7A   1   1         21            0     97.7kb         97.7kb
green  open   .security-7                            3O5VlAZwSlWxkF3bqPifAg   1   0         49            0    162.8kb        162.8kb
yellow open   metrics-system.memory-default          u74S8se-T8iD788aY0elgA   1   1       1776            0      1.2mb          1.2mb
yellow open   metrics-system.uptime-default          6AosWZ-kSTO_SVXO5KCzsg   1   1        306            0    289.3kb        289.3kb
yellow open   metrics-system.process-default         yiRugaNkQleo4R1thgj-PQ   1   1       1766            0      1.2mb          1.2mb
yellow open   metrics-system.network-default         ayaXEXp1Rb2VKfbl2w9KHQ   1   1       1243            0        1mb            1mb
yellow open   metrics-mysql.galera_status-default    4hay0weLQui4g4VqohoMCg   1   1         21            0     97.7kb         97.7kb
yellow open   metrics-system.load-default            UPR0fTo_QkK1V9lF8xo93A   1   1       1252            0      980kb          980kb
yellow open   metrics-system.socket_summary-default  SXAXQb8tRMKdHIWpzIexhA   1   1       1234            0    972.8kb        972.8kb

Dashboard:

screencapture-localhost-5601-gek-app-kibana-2020-04-02-11_50_13

- name: thread_id
type: alias
path: mysql.thread_id
migration: true
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the migration field be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, I'm not sure. If so, then probably that field should disappear at all from all entries?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, I meant here thread_id, the full block. I assume mysql.error.thread_id does not exist anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, so this change will affect fields.yml and exported fields in README. I will work on this then, but it may take some time.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mtojek
Copy link
Contributor Author

mtojek commented Apr 6, 2020

There was an issue with stream generation found last week: elastic/kibana#62330 .

Once it's fixed, I will re-verify the integration and re-generate events (leaving it here for visibility).

@exekias
Copy link

exekias commented Apr 7, 2020

Hi @mtojek just checking in, is this still blocked? is there anything else pending to have MySQL package ready?

@mtojek
Copy link
Contributor Author

mtojek commented Apr 7, 2020

Hi @mtojek just checking in, is this still blocked? is there anything else pending to have MySQL package ready?

  1. Once [Ingest] Fix stream generation from package kibana#62330 is closed, I can reverify the integration and regenerate real events for docs purposes.
  2. PR: Remove migrated not-ECS migrated fields #327 (you're marked also as reviewer).

In the mean time, I've prepared a tutorial how to build a package (#330).

@mtojek
Copy link
Contributor Author

mtojek commented Apr 20, 2020

@ruflin I verified all bugfixes, merged changes from the master branch, installed the package in the testing environment. It works fine.

Switching to a ready PR.

@mtojek mtojek requested a review from ruflin April 20, 2020 12:49
@mtojek mtojek marked this pull request as ready for review April 20, 2020 12:49
@ruflin
Copy link
Contributor

ruflin commented Apr 21, 2020

I look at this in the UI and created the config. The part I didn't test was if it ingests data after shipping it to the agent but the config looks good.

One thing I stumbled over is we should have status and galera status both enabled by default?

@mtojek
Copy link
Contributor Author

mtojek commented Apr 21, 2020

One thing I stumbled over is we should have status and galera status both enabled by default?

I like this one. The dataset galera status has been disabled.

@mtojek mtojek merged commit 579d05d into elastic:master Apr 21, 2020
@ruflin
Copy link
Contributor

ruflin commented Apr 21, 2020

Tried this locally and it seems it is still enabled in the UI. If you can reproduce it on your end, this sounds more like a bug in Kibana.

The other part I stumbled over is that I think quite a few fields in error are not documented.

But lets move forward here and get this and follow up with iterations.

Great job!

@ruflin
Copy link
Contributor

ruflin commented Apr 21, 2020

Haha, already merged. Seems like we agree :-D

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