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

[Synthetics] Observer.name is wrong when using private locations #156320

Closed
dominiqueclarke opened this issue May 1, 2023 · 2 comments · Fixed by #156324 or elastic/integrations#6047
Closed
Labels
bug Fixes for quality problems that affect the customer experience Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v8.8.0

Comments

@dominiqueclarke
Copy link
Contributor

dominiqueclarke commented May 1, 2023

Kibana version: 8.8.0

Description of the problem including expected versus actual behavior:

This is the private location version of the same bug reported for the service: https://github.com/elastic/synthetics-service/issues/1210. This bug must be fixed in Kibana for private locations and in the service for public locations.

Observer.geo.name and Observer.name are currently the same value.

Screen Shot 2023-05-01 at 6 52 45 PM

Observer.name should be the location id, while observer.geo.name should be the location name.

As part of this change we will need to add a new field, locationId to the Saved Object spec, and a new migration will be required.

@dominiqueclarke dominiqueclarke added bug Fixes for quality problems that affect the customer experience Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v8.8.0 labels May 1, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

@dominiqueclarke dominiqueclarke self-assigned this May 2, 2023
dominiqueclarke added a commit that referenced this issue May 12, 2023
## Summary

Resolves #156320

Adjust the value of the `run_from.id` field.

Before
Both the `run_from.id` and the `run_from.name` were the same value.

After
<img width="543" alt="Screen Shot 2023-05-01 at 7 55 24 PM"
src="https://user-images.githubusercontent.com/11356435/235551964-bb9c419d-2ada-4a39-bd08-ce6f5021747b.png">

### Testing
1. Check out this PR from integrations
elastic/integrations#6047
2. In the integrations repo `cd packages/synthetics`
3. Run `elastic-package clean` then `elastic-package build` (You may
need to upgrade elastic package if you're significantly behind)
4. In your `kibana.dev.yml` file add `xpack.fleet.registryUrl:
https://localhost:8080`
5. Start kibana with
`NODE_EXTRA_CA_CERTS=$HOME/.elastic-package/profiles/default/certs/kibana/ca-cert.pem
yarn start --no-base-path`
6. Create a private location
7. Create a monitor assigned to that private location
8. Inspect the agent policy for that private location, then find the
integration policy for that monitor. Ensure the `run_from.id` is the id
of the location, and the `run_from.name` is the name of the location.

(If you run into problems setting up your local kibana connected to
elastic-package registry, see
https://github.com/elastic/security-team/blob/main/docs/cloud-security-posture-team/kibana/local-setup-using-elastic-package.mdx)

---------

Co-authored-by: shahzad31 <shahzad31comp@gmail.com>
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue May 12, 2023
## Summary

Resolves elastic#156320

Adjust the value of the `run_from.id` field.

Before
Both the `run_from.id` and the `run_from.name` were the same value.

After
<img width="543" alt="Screen Shot 2023-05-01 at 7 55 24 PM"
src="https://user-images.githubusercontent.com/11356435/235551964-bb9c419d-2ada-4a39-bd08-ce6f5021747b.png">

### Testing
1. Check out this PR from integrations
elastic/integrations#6047
2. In the integrations repo `cd packages/synthetics`
3. Run `elastic-package clean` then `elastic-package build` (You may
need to upgrade elastic package if you're significantly behind)
4. In your `kibana.dev.yml` file add `xpack.fleet.registryUrl:
https://localhost:8080`
5. Start kibana with
`NODE_EXTRA_CA_CERTS=$HOME/.elastic-package/profiles/default/certs/kibana/ca-cert.pem
yarn start --no-base-path`
6. Create a private location
7. Create a monitor assigned to that private location
8. Inspect the agent policy for that private location, then find the
integration policy for that monitor. Ensure the `run_from.id` is the id
of the location, and the `run_from.name` is the name of the location.

(If you run into problems setting up your local kibana connected to
elastic-package registry, see
https://github.com/elastic/security-team/blob/main/docs/cloud-security-posture-team/kibana/local-setup-using-elastic-package.mdx)

---------

Co-authored-by: shahzad31 <shahzad31comp@gmail.com>
(cherry picked from commit f59471b)
@shahzad31
Copy link
Contributor

POST FF Testing looks good !!

image

kibanamachine referenced this issue May 15, 2023
…#157531)

# Backport

This will backport the following commits from `main` to `8.8`:
- [[Synthetics] adjust run_from.id for private locations
(#156324)](#156324)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Dominique
Clarke","email":"dominique.clarke@elastic.co"},"sourceCommit":{"committedDate":"2023-05-12T18:30:53Z","message":"[Synthetics]
adjust run_from.id for private locations (#156324)\n\n##
Summary\r\n\r\nResolves
https://github.com/elastic/kibana/issues/156320\r\n\r\nAdjust the value
of the `run_from.id` field.\r\n\r\nBefore\r\nBoth the `run_from.id` and
the `run_from.name` were the same value.\r\n\r\nAfter\r\n<img
width=\"543\" alt=\"Screen Shot 2023-05-01 at 7 55 24
PM\"\r\nsrc=\"https://user-images.githubusercontent.com/11356435/235551964-bb9c419d-2ada-4a39-bd08-ce6f5021747b.png\">\r\n\r\n###
Testing\r\n1. Check out this PR from
integrations\r\nhttps://github.com/elastic/integrations/pull/6047\r\n2.
In the integrations repo `cd packages/synthetics`\r\n3. Run
`elastic-package clean` then `elastic-package build` (You may\r\nneed to
upgrade elastic package if you're significantly behind)\r\n4. In your
`kibana.dev.yml` file add
`xpack.fleet.registryUrl:\r\nhttps://localhost:8080`\r\n5. Start kibana
with\r\n`NODE_EXTRA_CA_CERTS=$HOME/.elastic-package/profiles/default/certs/kibana/ca-cert.pem\r\nyarn
start --no-base-path`\r\n6. Create a private location\r\n7. Create a
monitor assigned to that private location\r\n8. Inspect the agent policy
for that private location, then find the\r\nintegration policy for that
monitor. Ensure the `run_from.id` is the id\r\nof the location, and the
`run_from.name` is the name of the location.\r\n\r\n(If you run into
problems setting up your local kibana connected to\r\nelastic-package
registry,
see\r\nhttps://github.com/elastic/security-team/blob/main/docs/cloud-security-posture-team/kibana/local-setup-using-elastic-package.mdx)\r\n\r\n---------\r\n\r\nCo-authored-by:
shahzad31
<shahzad31comp@gmail.com>","sha":"f59471bcdc8d8fa156e7997749efe7d252457d77","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","Team:uptime","release_note:skip","Team:Fleet","v8.8.0","v8.9.0"],"number":156324,"url":"https://github.com/elastic/kibana/pull/156324","mergeCommit":{"message":"[Synthetics]
adjust run_from.id for private locations (#156324)\n\n##
Summary\r\n\r\nResolves
https://github.com/elastic/kibana/issues/156320\r\n\r\nAdjust the value
of the `run_from.id` field.\r\n\r\nBefore\r\nBoth the `run_from.id` and
the `run_from.name` were the same value.\r\n\r\nAfter\r\n<img
width=\"543\" alt=\"Screen Shot 2023-05-01 at 7 55 24
PM\"\r\nsrc=\"https://user-images.githubusercontent.com/11356435/235551964-bb9c419d-2ada-4a39-bd08-ce6f5021747b.png\">\r\n\r\n###
Testing\r\n1. Check out this PR from
integrations\r\nhttps://github.com/elastic/integrations/pull/6047\r\n2.
In the integrations repo `cd packages/synthetics`\r\n3. Run
`elastic-package clean` then `elastic-package build` (You may\r\nneed to
upgrade elastic package if you're significantly behind)\r\n4. In your
`kibana.dev.yml` file add
`xpack.fleet.registryUrl:\r\nhttps://localhost:8080`\r\n5. Start kibana
with\r\n`NODE_EXTRA_CA_CERTS=$HOME/.elastic-package/profiles/default/certs/kibana/ca-cert.pem\r\nyarn
start --no-base-path`\r\n6. Create a private location\r\n7. Create a
monitor assigned to that private location\r\n8. Inspect the agent policy
for that private location, then find the\r\nintegration policy for that
monitor. Ensure the `run_from.id` is the id\r\nof the location, and the
`run_from.name` is the name of the location.\r\n\r\n(If you run into
problems setting up your local kibana connected to\r\nelastic-package
registry,
see\r\nhttps://github.com/elastic/security-team/blob/main/docs/cloud-security-posture-team/kibana/local-setup-using-elastic-package.mdx)\r\n\r\n---------\r\n\r\nCo-authored-by:
shahzad31
<shahzad31comp@gmail.com>","sha":"f59471bcdc8d8fa156e7997749efe7d252457d77"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/156324","number":156324,"mergeCommit":{"message":"[Synthetics]
adjust run_from.id for private locations (#156324)\n\n##
Summary\r\n\r\nResolves
https://github.com/elastic/kibana/issues/156320\r\n\r\nAdjust the value
of the `run_from.id` field.\r\n\r\nBefore\r\nBoth the `run_from.id` and
the `run_from.name` were the same value.\r\n\r\nAfter\r\n<img
width=\"543\" alt=\"Screen Shot 2023-05-01 at 7 55 24
PM\"\r\nsrc=\"https://user-images.githubusercontent.com/11356435/235551964-bb9c419d-2ada-4a39-bd08-ce6f5021747b.png\">\r\n\r\n###
Testing\r\n1. Check out this PR from
integrations\r\nhttps://github.com/elastic/integrations/pull/6047\r\n2.
In the integrations repo `cd packages/synthetics`\r\n3. Run
`elastic-package clean` then `elastic-package build` (You may\r\nneed to
upgrade elastic package if you're significantly behind)\r\n4. In your
`kibana.dev.yml` file add
`xpack.fleet.registryUrl:\r\nhttps://localhost:8080`\r\n5. Start kibana
with\r\n`NODE_EXTRA_CA_CERTS=$HOME/.elastic-package/profiles/default/certs/kibana/ca-cert.pem\r\nyarn
start --no-base-path`\r\n6. Create a private location\r\n7. Create a
monitor assigned to that private location\r\n8. Inspect the agent policy
for that private location, then find the\r\nintegration policy for that
monitor. Ensure the `run_from.id` is the id\r\nof the location, and the
`run_from.name` is the name of the location.\r\n\r\n(If you run into
problems setting up your local kibana connected to\r\nelastic-package
registry,
see\r\nhttps://github.com/elastic/security-team/blob/main/docs/cloud-security-posture-team/kibana/local-setup-using-elastic-package.mdx)\r\n\r\n---------\r\n\r\nCo-authored-by:
shahzad31
<shahzad31comp@gmail.com>","sha":"f59471bcdc8d8fa156e7997749efe7d252457d77"}}]}]
BACKPORT-->

Co-authored-by: Dominique Clarke <dominique.clarke@elastic.co>
Co-authored-by: Shahzad <shahzad31comp@gmail.com>
jasonrhodes pushed a commit that referenced this issue May 17, 2023
## Summary

Resolves #156320

Adjust the value of the `run_from.id` field.

Before
Both the `run_from.id` and the `run_from.name` were the same value.

After
<img width="543" alt="Screen Shot 2023-05-01 at 7 55 24 PM"
src="https://user-images.githubusercontent.com/11356435/235551964-bb9c419d-2ada-4a39-bd08-ce6f5021747b.png">

### Testing
1. Check out this PR from integrations
elastic/integrations#6047
2. In the integrations repo `cd packages/synthetics`
3. Run `elastic-package clean` then `elastic-package build` (You may
need to upgrade elastic package if you're significantly behind)
4. In your `kibana.dev.yml` file add `xpack.fleet.registryUrl:
https://localhost:8080`
5. Start kibana with
`NODE_EXTRA_CA_CERTS=$HOME/.elastic-package/profiles/default/certs/kibana/ca-cert.pem
yarn start --no-base-path`
6. Create a private location
7. Create a monitor assigned to that private location
8. Inspect the agent policy for that private location, then find the
integration policy for that monitor. Ensure the `run_from.id` is the id
of the location, and the `run_from.name` is the name of the location.

(If you run into problems setting up your local kibana connected to
elastic-package registry, see
https://github.com/elastic/security-team/blob/main/docs/cloud-security-posture-team/kibana/local-setup-using-elastic-package.mdx)

---------

Co-authored-by: shahzad31 <shahzad31comp@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v8.8.0
Projects
None yet
3 participants