Reputation: 33
I would like to automate the creation of my Grafana dashboards. For some resources, we use AWS Cloudwatch as the datasource. We use custom namespaces to provide additional metrics.
I know how to provision datasources, but the problem with Cloudwatch is that there is no possibility to store custom namespaces info in .yaml file.
Maybe someone here has some workaround for that? With AWS CLI it is easy to get the list of Namespaces, but how to provide this data into Grafana configuration?
Upvotes: 0
Views: 2001
Reputation: 696
You can follow this link https://grafana.com/docs/grafana/v6.5/features/datasources/cloudwatch/ for the configurations.
Kindly use customMetricsNameSpace which will help you identify to pull the custom metrics data.
- name: CloudWatch_Test
type: cloudwatch
jsonData:
authType: keys
defaultRegion: us-east-1
customMetricsNamespaces: <>
secureJsonData:
accessKey: <>
secretKey: <>
editable: true #If you would like to edit your data post configuration.
Hopefully this helps you.
Upvotes: 0
Reputation: 874
Try to use customMetricsNamespaces
in jsonData
block.
- name: cloudwatch
type: cloudwatch
jsonData:
authType: credentials
defaultRegion: eu-west-1
customMetricsNamespaces: ns1/ns1,ns2/ns2
isDefault: true
editable: true
Upvotes: 0