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

[Bug] I can not get metrics from store server #2600

Open
1 task done
shirleyStorage opened this issue Jul 24, 2024 · 1 comment
Open
1 task done

[Bug] I can not get metrics from store server #2600

shirleyStorage opened this issue Jul 24, 2024 · 1 comment
Labels
bug Something isn't working store Store module

Comments

@shirleyStorage
Copy link
Contributor

shirleyStorage commented Jul 24, 2024

Bug Type (问题类型)

rest-api (结果不合预期)

Before submit

  • 我已经确认现有的 IssuesFAQ 中没有相同 / 重复问题 (I have confirmed and searched that there are no similar problems in the historical issue and documents)

Environment (环境信息)

  • Server Version: master branch
  • Backend: Server deployed by Guide doc
  • OS: Mac
  • Data Size: Less than 10 vertices

Expected & Actual behavior (期望与实际表现)

If I call
curl "http://localhost:8520/metrics"
It just return {}.
No metrics are returned.

But call

curl "http://localhost:8520/metrics/drive"

It can return {"/":{"usable_space":89916,"total_space":471482,"free_space":89916,"size_unit":"MB"}}%

Vertex/Edge example (问题点 / 边数据举例)

No response

Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)

No response

@shirleyStorage shirleyStorage added the bug Something isn't working label Jul 24, 2024
@dosubot dosubot bot added the store Store module label Jul 24, 2024
Copy link

dosubot bot commented Jul 24, 2024

The reason you are receiving an empty JSON object when calling the /metrics endpoint is that the index() method mapped to this endpoint returns an empty HashMap:

@GetMapping
public Map<String, String> index() {
    return new HashMap<>();
}

This method is designed to return an empty map, which translates to an empty JSON object in the response. In contrast, the /metrics/drive endpoint calls the drive() method, which returns the actual drive metrics data:

@GetMapping("drive")
public Map<String, Map<String, Object>> drive() {
    return this.driveMetrics.metrics();
}

This method returns the metrics collected by the DriveMetrics class, which is why you see data when calling /metrics/drive [1].

To continue talking to Dosu, mention @dosu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working store Store module
Projects
Status: In progress
Development

No branches or pull requests

1 participant