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

Creating missing metric descriptor #42

Closed
vsaggu opened this issue Jan 6, 2021 · 3 comments
Closed

Creating missing metric descriptor #42

vsaggu opened this issue Jan 6, 2021 · 3 comments
Assignees

Comments

@vsaggu
Copy link

vsaggu commented Jan 6, 2021

Even after giving the project.editor role, getting permission error....

  • commented few lines in run_docker.py
    site = web.TCPSite(runner, '0.0.0.0', 8080) loop.run_until_complete(site.start())

Manually executed on pod - python run_docker.py

Starting execution for project(s): ['xxx']
Selected services: k8s_container,k8s_node,gce_instance,k8s_cluster
Trying to use default service account
Successfully obtained access token
Starting processing...
Finished fetching data in 1.666172742843628
Ingest response: {'linesOk': 486, 'linesInvalid': 0, 'error': None}
Finished uploading metric ingest lines to Dynatrace in 0.6894481182098389 s
Fetched and pushed GCP data in 2.3575189113616943 s
Processed 486 lines
Pushing self monitoring time series to GCP Monitor...
Creating missing metric descriptor for 'custom.googleapis.com/dynatrace/connectivity'
Failed to create descriptor for 'custom.googleapis.com/dynatrace/connectivity' due to '{'error': {'code': 403, 'message': 'Permission monitoring.metricDescriptors.create denied (or the resource may not exist).', 'status': 'PERMISSION_DENIED'}}'
Creating missing metric descriptor for 'custom.googleapis.com/dynatrace/ingest_lines'
Failed to create descriptor for 'custom.googleapis.com/dynatrace/ingest_lines' due to '{'error': {'code': 403, 'message': 'Permission monitoring.metricDescriptors.create denied (or the resource may not exist).', 'status': 'PERMISSION_DENIED'}}'
Creating missing metric descriptor for 'custom.googleapis.com/dynatrace/request_count'
Failed to create descriptor for 'custom.googleapis.com/dynatrace/request_count' due to '{'error': {'code': 403, 'message': 'Permission monitoring.metricDescriptors.create denied (or the resource may not exist).', 'status': 'PERMISSION_DENIED'}}'
Creating missing metric descriptor for 'custom.googleapis.com/dynatrace/phase_execution_time'
Failed to create descriptor for 'custom.googleapis.com/dynatrace/phase_execution_time' due to '{'error': {'code': 403, 'message': 'Permission monitoring.metricDescriptors.create denied (or the resource may not exist).', 'status': 'PERMISSION_DENIED'}}'
Failed to push self monitoring time series, error is: 403 => {'error': {'code': 403, 'message': 'Permission monitoring.timeSeries.create denied (or the resource may not exist).', 'status': 'PERMISSION_DENIED'}}
Execution took 4.200105667114258

WHEN NOT COMMENTED LINES in run_docker.py, we get below error

Monitoring disabled. Check your project(s) settings.
Traceback (most recent call last):
File "run_docker.py", line 99, in
loop.run_until_complete(site.start())
File "/usr/local/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_runner.py", line 100, in start
self._server = await loop.create_server( # type: ignore
File "/usr/local/lib/python3.8/asyncio/base_events.py", line 1463, in create_server
raise OSError(err.errno, 'error while attempting '
OSError: [Errno 98] error while attempting to bind on address ('0.0.0.0', 8080): address already in use
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f8264864610>

@vsaggu
Copy link
Author

vsaggu commented Jan 14, 2021

Not able to fix the Permission error as mentioned below even after I gave Project Editor permission to service account.

Failed to create descriptor for 'custom.googleapis.com/dynatrace/connectivity' due to '{'error': {'code': 403, 'message': 'Permission monitoring.metricDescriptors.create denied (or the resource may not exist).', 'status': 'PERMISSION_DENIED'}}'
Creating missing metric descriptor for 'custom.googleapis.com/dynatrace/ingest_lines'

@Dawid-Kaszubski
Copy link
Contributor

Dawid-Kaszubski commented Jan 18, 2021

Hello @vsaggu,
The monitoring.metricDescriptors.delete permission is crucial for this API request, so please check in IAM if the container has this permission set.

Also, please check if the container VPC firewall rules do not block outbound traffic to the https://monitoring.googleapis.com/v3/projects/* endpoints.

Edit:
One more question. How workload identity is configured on the Kubernetes cluster?

@mmajcher mmajcher self-assigned this Mar 17, 2021
@mmajcher
Copy link
Contributor

Closing due to missing input from issue author. Please contact us if issue persists.

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

No branches or pull requests

3 participants