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

Failure: nifcloud-debugcli nas get-metric-statistics (invalid literal for int() with base 10) #67

Closed
ddeeff opened this issue Aug 24, 2021 · 1 comment · Fixed by nifcloud/nifcloud-sdk-go#22 or #68

Comments

@ddeeff
Copy link

ddeeff commented Aug 24, 2021

Issue type

  • Bug report

Summary

  • nifcloud-debugcli でnasのget-metric-statisticsを実行するとエラーになる
  • 恐らく想定している型(Integer)と返ってきている型(Double)が異なると思われる

Step to reproduce

$ nifcloud-debugcli nas get-metric-statistics --start-time 2021-08-24T16:25:00Z --dimensions Name=NASInstanceIdentifier,Value=jpe12maeda03 --metric-name FreeStorageSpace

invalid literal for int() with base 10: '1038077673472.0'

Expected behavior

  • 指定したNASの残り容量が返ってくる

Details

  • get-metric-statistics に関しては以下の定義がマッチしてないように見える
  • "shape": "Integer" -> "shape": "Double" にしたら動作するようになった
    • 自分のケースでしか見ていないので、もしかしたら他のメトリックを指定するとIntergerが返ってくるのかもしれないが未確認
$ nifcloud-debugcli nas get-metric-statistics --start-time 2021-08-24T16:25:00Z --dimensions Name=NASInstanceIdentifier,Value=jpe12maeda03 --metric-name FreeStorageSpace
{
    "Datapoints": [
        {
            "SampleCount": 1,
            "Sum": 1033608298496.0,
            "TargetName": "jpe12maeda03",
            "Timestamp": "2021-08-24T16:25:52+09:00"
        }
    ],
    "Label": "FreeStorageSpace"
}
@fuku2014
Copy link
Member

Fixed by release v0.12.0 🎉

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