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

Runtime error while running #97

Open
sourabhtk37 opened this issue Jan 12, 2021 · 1 comment
Open

Runtime error while running #97

sourabhtk37 opened this issue Jan 12, 2021 · 1 comment

Comments

@sourabhtk37
Copy link

Hello,

I am facing issues while trying to run the exporter, I am wondering If I have missed some necessary pre-requisites or configuration changes:

$ ./azure_metrics_exporter --config.file="azure.yml"
2021/01/12 04:53:14 Using managed identity
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x827dd5]

goroutine 1 [running]:
main.(*AzureClient).getAccessToken(0xc0000662c0, 0x0, 0x0)
	/home/tsourab/go/src/github.com/RobustPerception/azure_metrics_exporter/azure.go:224 +0x355
main.main()
	/home/tsourab/go/src/github.com/RobustPerception/azure_metrics_exporter/main.go:321 +0xdf

azure.yml

---
active_directory_authority_url: "https://login.microsoftonline.com/"
resource_manager_url: "https://management.azure.com/"
credentials:
  subscription_id: "<subscription ID here>" 

resource_groups:
  - resource_group: "tsourab-metric"
    resource_types:
      - "Microsoft.Compute/virtualMachines"
    resource_name_include_re:
      - "metrics"
    metrics:
      - name: "CPU Credits Consumed"

OS: Fedora 33
Kernel: 5.8.15-301.fc33.x86_64
Go version: go version go1.15.6 linux/amd64

@brian-brazil
Copy link
Member

That doesn't look possible, NewAzureClient can never return nil.

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

2 participants