Skip to content

Conversation

ChrsMark
Copy link
Member

@ChrsMark ChrsMark commented Jun 25, 2020

Implementing Prometheus package migration

Screenshots:
Screenshot 2020-06-29 at 20 20 32
Screenshot 2020-06-29 at 20 22 54
Screenshot 2020-06-29 at 20 22 28
Screenshot 2020-07-06 at 12 37 16

ChrsMark added 7 commits June 25, 2020 10:57
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
@ChrsMark ChrsMark marked this pull request as draft June 25, 2020 09:15
@elasticmachine
Copy link

elasticmachine commented Jun 25, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Branch indexing]

  • Start Time: 2020-07-09T01:44:54.158+0000

  • Duration: 3 min 51 sec

Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
@mtojek mtojek added the Team:Integrations Label for the Integrations team label Jun 26, 2020
ChrsMark added 7 commits June 29, 2020 15:50
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
@ChrsMark ChrsMark marked this pull request as ready for review June 29, 2020 17:24
@elasticmachine
Copy link

Pinging @elastic/integrations (Team:Integrations)

Copy link
Contributor

@mtojek mtojek left a comment

Choose a reason for hiding this comment

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

I left a couple of notes.

Could you please post a screenshot with integration's configuration form in Kibana?

default: "9201"
- name: ssl.enabled
type: bool
title: Ssl Enabled
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Enabled SSL?

default: false
- name: ssl.certificate
type: text
title: Ssl Certificate
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: SSL certificate

required: false
show_user: true
default: /etc/pki/server/cert.key
title: Prometheus remote_write metrics
Copy link
Contributor

Choose a reason for hiding this comment

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

Prometheus remote write metrics

show_user: true
default: /etc/pki/server/cert.key
title: Prometheus remote_write metrics
description: Collect Prometheus remote_write metrics
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

To scrape metrics from a Prometheus exporter, configure the `hosts` field to it. The path
to retrieve the metrics from (`/metrics` by default) can be configured with `metrics_path`.

```$yml
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 that this config is not relevant for Elastic Agent anymore. All configs are distributed and generated in Kibana.


When `use_types` and `rate_counters` are enabled, metrics are stored like this:

```$json
Copy link
Contributor

Choose a reason for hiding this comment

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

Yesterday I pushed the tool for generating docs, which supports rendering events from a separate JSON file.

Could you please adjust the README template (import-beats-resources) similarly to #110 ?


#### Scraping all metrics from a Prometheus server

> ⚠️
Copy link
Contributor

Choose a reason for hiding this comment

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

What's this :D ?

| dataset.name | Dataset name. | constant_keyword |
| dataset.namespace | Dataset namespace. | constant_keyword |
| dataset.type | Dataset type. | constant_keyword |
| prometheus. | | keyword |
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you miss type somewhere?

"ecs": {
"version": "1.5.0"
},
"host": {
Copy link
Contributor

Choose a reason for hiding this comment

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

I used to clean all details regarding host. It would make the event smaller.

@mtojek
Copy link
Contributor

mtojek commented Jun 30, 2020

Please also rebase against master.

ChrsMark added 4 commits July 6, 2020 11:02
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
@ChrsMark
Copy link
Member Author

ChrsMark commented Jul 6, 2020

Thanks for the review @mtojek !

PR has been updated:

  • Added screenshot
  • Addressed comments and rebased
  • Renamed datasources to config_templates
  • Renamed metrics category to datastores
ChrsMark added 2 commits July 6, 2020 13:26
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
ChrsMark added 5 commits July 7, 2020 15:02
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
@ChrsMark ChrsMark requested a review from a team July 8, 2020 07:58
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
@@ -0,0 +1,11 @@
- name: prometheus
Copy link

Choose a reason for hiding this comment

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

This file seems to be missing some fields. I would expect it to be a mix between x-pack and oss fields.yml's, as we are shipping the basic agents with the agent

Copy link
Member Author

Choose a reason for hiding this comment

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

🤦 good catch, thanks!

Copy link

@exekias exekias left a comment

Choose a reason for hiding this comment

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

fields.yml is incomplete, everything else LGTM!

Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
@ChrsMark
Copy link
Member Author

ChrsMark commented Jul 9, 2020

@exekias I added manually the missing fields and tested manually again to verify nothing is broken. Feel free to have another look :)!

@ChrsMark ChrsMark merged commit 4d00202 into elastic:master Jul 9, 2020
@masci masci mentioned this pull request Nov 19, 2021
8 tasks
@andrewkroh andrewkroh added Integration:prometheus Prometheus New Integration Issue or pull request for creating a new integration package. labels Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Integration:prometheus Prometheus New Integration Issue or pull request for creating a new integration package. Team:Integrations Label for the Integrations team

5 participants