Azure / Azure/azure-cli-extensions

[Monitor] log-analytics query workspace failing with 'PathNotFoundError', blocking queries

Open
#3,914 3 comments 0 reactions 1 assignee Claimed by @kairu-ms View on GitHub
Monitor
Dominant language
Python
Stars
454
Forks
1.7k
Avg merge
2d 19h
Merged PRs (30d)
64

Description

- If the issue is to do with Azure CLI 2.0 in-particular, create an issue here at [Azure/azure-cli](https://github.com/Azure/azure-cli/issues)

### Extension name (the extension in question)
log-analytics

### Description of issue (in as much detail as possible)
I'm trying to use the workspace query feature. This morning it appears to be broken on all my machines, and maybe it is something on the server?

I try to:

`az monitor log-analytics query -w workerappslogs --analytics-query "AzureActivity | summarize count() by bin(timestamp, 1h)" -t P3DT12H --debug`

And receive this error:

`az_command_data_logger: PathNotFoundError: The requested path does not exist`

With `--debug` I see this specific error which looks like something coming back unexpected from server side:

`msrest.exceptions: (PathNotFoundError) The requested path does not exist
cli.azure.cli.core.util: azure.cli.core.util.handle_exception is called with an exception:
cli.azure.cli.core.util: Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 657, in execute
raise ex
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 720, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 691, in _run_job
result = cmd_copy(params)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
File "/home/pyadmin/.azure/cliextensions/log-analytics/azext_loganalytics/custom.py", line 14, in execute_query
return client.query(workspace, QueryBody(query=analytics_query, timespan=timespan, workspaces=workspaces))
File "/home/pyadmin/.azure/cliextensions/log-analytics/azext_loganalytics/vendored_sdks/loganalytics/log_analytics_data_client.py", line 120, in query`

-----

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.