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

feat: dashboards would work with grafana 10.x.x #2713

Merged
merged 3 commits into from
Feb 28, 2024
Merged

feat: dashboards would work with grafana 10.x.x #2713

merged 3 commits into from
Feb 28, 2024

Conversation

Hardikl
Copy link
Contributor

@Hardikl Hardikl commented Feb 26, 2024

Task to be completed with this PR

  • Changed default prometheus datasource name to prometheus
    • Docker
    • NABox
    • Ansible
  • Update documentation
  • Test the existence of datasource in Grafana
  • forceImport CLI option implementation to force import

Grafana test cases covered.
1. No datasource in grafana
a. normal cli -> fail

harvest % ./bin/harvest grafana import
using API token from config
A Prometheus-typed datasource named "prometheus" does not exist in Grafana.                                                                        

b. normal cli with force -> pass dashboards empty and not populating data as absense of datasource

harvest % ./bin/harvest grafana import --force
using API token from config
connected to Grafana server (version: 10.3.1)
created Grafana folder [Harvest-24.02.2615-cDOT] - OK
created Grafana folder [Harvest-24.02.2615-7mode] - OK
created Grafana folder [Harvest-24.02.2615-StorageGrid] - OK
preparing to import dashboards...
OK - imported Harvest-24.02.2615-cDOT / [aggregate.json]
OK - imported Harvest-24.02.2615-cDOT / [cdot.json]
OK - imported Harvest-24.02.2615-cDOT / [changelogMonitor.json]
OK - imported Harvest-24.02.2615-cDOT / [cluster.json]
OK - imported Harvest-24.02.2615-cDOT / [compliance.json]
OK - imported Harvest-24.02.2615-cDOT / [data_protection_snapshot.json]
OK - imported Harvest-24.02.2615-cDOT / [datacenter.json]
OK - imported Harvest-24.02.2615-cDOT / [disk.json]
OK - imported Harvest-24.02.2615-cDOT / [external_service_op.json]
OK - imported Harvest-24.02.2615-cDOT / [flexcache.json]
OK - imported Harvest-24.02.2615-cDOT / [flexgroup.json]
OK - imported Harvest-24.02.2615-cDOT / [fsa.json]
OK - imported Harvest-24.02.2615-cDOT / [headroom.json]
OK - imported Harvest-24.02.2615-cDOT / [health.json]
OK - imported Harvest-24.02.2615-cDOT / [lun.json]
OK - imported Harvest-24.02.2615-cDOT / [mcc_cluster.json]
OK - imported Harvest-24.02.2615-cDOT / [metadata.json]
OK - imported Harvest-24.02.2615-cDOT / [namespace.json]
OK - imported Harvest-24.02.2615-cDOT / [network.json]
OK - imported Harvest-24.02.2615-cDOT / [nfs4storePool.json]
OK - imported Harvest-24.02.2615-cDOT / [nfs_clients.json]
OK - imported Harvest-24.02.2615-cDOT / [node.json]
OK - imported Harvest-24.02.2615-cDOT / [power.json]
OK - imported Harvest-24.02.2615-cDOT / [qtree.json]
OK - imported Harvest-24.02.2615-cDOT / [quotaReport.json]
OK - imported Harvest-24.02.2615-cDOT / [s3ObjectStorage.json]
OK - imported Harvest-24.02.2615-cDOT / [security.json]
OK - imported Harvest-24.02.2615-cDOT / [shelf.json]
OK - imported Harvest-24.02.2615-cDOT / [smb.json]
OK - imported Harvest-24.02.2615-cDOT / [snapmirror.json]
OK - imported Harvest-24.02.2615-cDOT / [svm.json]
OK - imported Harvest-24.02.2615-cDOT / [volume.json]
OK - imported Harvest-24.02.2615-cDOT / [workload.json]
Imported 33 dashboards to [Harvest-24.02.2615-cDOT] from [grafana/dashboards/cmode]
OK - imported Harvest-24.02.2615-7mode / [aggregate7.json]
OK - imported Harvest-24.02.2615-7mode / [cluster7.json]
OK - imported Harvest-24.02.2615-7mode / [disk7.json]
OK - imported Harvest-24.02.2615-7mode / [lun7.json]
OK - imported Harvest-24.02.2615-7mode / [network7.json]
OK - imported Harvest-24.02.2615-7mode / [node7.json]
OK - imported Harvest-24.02.2615-7mode / [shelf7.json]
OK - imported Harvest-24.02.2615-7mode / [volume7.json]
Imported 8 dashboards to [Harvest-24.02.2615-7mode] from [grafana/dashboards/7mode]
OK - imported Harvest-24.02.2615-StorageGrid / [fabricpool.json]
OK - imported Harvest-24.02.2615-StorageGrid / [overview.json]
OK - imported Harvest-24.02.2615-StorageGrid / [tenant.json]
Imported 3 dashboards to [Harvest-24.02.2615-StorageGrid] from [grafana/dashboards/storagegrid]

c. normal cli with datasource -> fail

harvest % ./bin/harvest grafana import --datasource prometheus
using API token from config
A Prometheus-typed datasource named "prometheus" does not exist in Grafana.                                                                        harvest % ./bin/harvest grafana import --datasource Prometheus
using API token from config
A Prometheus-typed datasource named "prometheus" does not exist in Grafana.                                                                          harvest % ./bin/harvest grafana import --datasource updatedName
using API token from config
A Prometheus-typed datasource named "prometheus" does not exist in Grafana.                                                                         

2. default datasource in grafana(prometheus)

image

a. normal cli -> pass, working in grafana

harvest % ./bin/harvest grafana import                         
using API token from config
connected to Grafana server (version: 10.3.1)
created Grafana folder [Harvest-24.02.2615-cDOT] - OK
created Grafana folder [Harvest-24.02.2615-7mode] - OK
created Grafana folder [Harvest-24.02.2615-StorageGrid] - OK
preparing to import dashboards...
OK - imported Harvest-24.02.2615-cDOT / [aggregate.json]
OK - imported Harvest-24.02.2615-cDOT / [cdot.json]
OK - imported Harvest-24.02.2615-cDOT / [changelogMonitor.json]
OK - imported Harvest-24.02.2615-cDOT / [cluster.json]
OK - imported Harvest-24.02.2615-cDOT / [compliance.json]
OK - imported Harvest-24.02.2615-cDOT / [data_protection_snapshot.json]
OK - imported Harvest-24.02.2615-cDOT / [datacenter.json]
OK - imported Harvest-24.02.2615-cDOT / [disk.json]
OK - imported Harvest-24.02.2615-cDOT / [external_service_op.json]
OK - imported Harvest-24.02.2615-cDOT / [flexcache.json]
OK - imported Harvest-24.02.2615-cDOT / [flexgroup.json]
OK - imported Harvest-24.02.2615-cDOT / [fsa.json]
OK - imported Harvest-24.02.2615-cDOT / [headroom.json]
OK - imported Harvest-24.02.2615-cDOT / [health.json]
OK - imported Harvest-24.02.2615-cDOT / [lun.json]
OK - imported Harvest-24.02.2615-cDOT / [mcc_cluster.json]
OK - imported Harvest-24.02.2615-cDOT / [metadata.json]
OK - imported Harvest-24.02.2615-cDOT / [namespace.json]
OK - imported Harvest-24.02.2615-cDOT / [network.json]
OK - imported Harvest-24.02.2615-cDOT / [nfs4storePool.json]
OK - imported Harvest-24.02.2615-cDOT / [nfs_clients.json]
OK - imported Harvest-24.02.2615-cDOT / [node.json]
OK - imported Harvest-24.02.2615-cDOT / [power.json]
OK - imported Harvest-24.02.2615-cDOT / [qtree.json]
OK - imported Harvest-24.02.2615-cDOT / [quotaReport.json]
OK - imported Harvest-24.02.2615-cDOT / [s3ObjectStorage.json]
OK - imported Harvest-24.02.2615-cDOT / [security.json]
OK - imported Harvest-24.02.2615-cDOT / [shelf.json]
OK - imported Harvest-24.02.2615-cDOT / [smb.json]
OK - imported Harvest-24.02.2615-cDOT / [snapmirror.json]
OK - imported Harvest-24.02.2615-cDOT / [svm.json]
OK - imported Harvest-24.02.2615-cDOT / [volume.json]
OK - imported Harvest-24.02.2615-cDOT / [workload.json]
Imported 33 dashboards to [Harvest-24.02.2615-cDOT] from [grafana/dashboards/cmode]
OK - imported Harvest-24.02.2615-7mode / [aggregate7.json]
OK - imported Harvest-24.02.2615-7mode / [cluster7.json]
OK - imported Harvest-24.02.2615-7mode / [disk7.json]
OK - imported Harvest-24.02.2615-7mode / [lun7.json]
OK - imported Harvest-24.02.2615-7mode / [network7.json]
OK - imported Harvest-24.02.2615-7mode / [node7.json]
OK - imported Harvest-24.02.2615-7mode / [shelf7.json]
OK - imported Harvest-24.02.2615-7mode / [volume7.json]
Imported 8 dashboards to [Harvest-24.02.2615-7mode] from [grafana/dashboards/7mode]
OK - imported Harvest-24.02.2615-StorageGrid / [fabricpool.json]
OK - imported Harvest-24.02.2615-StorageGrid / [overview.json]
OK - imported Harvest-24.02.2615-StorageGrid / [tenant.json]
Imported 3 dashboards to [Harvest-24.02.2615-StorageGrid] from [grafana/dashboards/storagegrid]

b. normal cli with other datasource -> fail

harvest % ./bin/harvest grafana import --datasource updatedName
using API token from config
A Prometheus-typed datasource named "updatedName" does not exist in Grafana.                                                             ```

c. normal cli with other datasource Prometheus (caps)-> pass, working in grafana

harvest % ./bin/harvest grafana import --datasource Prometheus
using API token from config
connected to Grafana server (version: 10.3.1)
created Grafana folder [Harvest-24.02.2815-cDOT] - OK
created Grafana folder [Harvest-24.02.2815-7mode] - OK
created Grafana folder [Harvest-24.02.2815-StorageGrid] - OK
preparing to import dashboards...
OK - imported Harvest-24.02.2815-7mode / [aggregate7.json]
OK - imported Harvest-24.02.2815-7mode / [cluster7.json]
OK - imported Harvest-24.02.2815-7mode / [disk7.json]
OK - imported Harvest-24.02.2815-7mode / [lun7.json]
OK - imported Harvest-24.02.2815-7mode / [network7.json]
OK - imported Harvest-24.02.2815-7mode / [node7.json]
OK - imported Harvest-24.02.2815-7mode / [shelf7.json]
OK - imported Harvest-24.02.2815-7mode / [volume7.json]
Imported 8 dashboards to [Harvest-24.02.2815-7mode] from [grafana/dashboards/7mode]
OK - imported Harvest-24.02.2815-StorageGrid / [fabricpool.json]
OK - imported Harvest-24.02.2815-StorageGrid / [overview.json]
OK - imported Harvest-24.02.2815-StorageGrid / [tenant.json]
Imported 3 dashboards to [Harvest-24.02.2815-StorageGrid] from [grafana/dashboards/storagegrid]
OK - imported Harvest-24.02.2815-cDOT / [aggregate.json]
OK - imported Harvest-24.02.2815-cDOT / [cdot.json]
OK - imported Harvest-24.02.2815-cDOT / [changelogMonitor.json]
OK - imported Harvest-24.02.2815-cDOT / [cluster.json]
OK - imported Harvest-24.02.2815-cDOT / [compliance.json]
OK - imported Harvest-24.02.2815-cDOT / [data_protection_snapshot.json]
OK - imported Harvest-24.02.2815-cDOT / [datacenter.json]
OK - imported Harvest-24.02.2815-cDOT / [disk.json]
OK - imported Harvest-24.02.2815-cDOT / [external_service_op.json]
OK - imported Harvest-24.02.2815-cDOT / [flexcache.json]
OK - imported Harvest-24.02.2815-cDOT / [flexgroup.json]
OK - imported Harvest-24.02.2815-cDOT / [fsa.json]
OK - imported Harvest-24.02.2815-cDOT / [headroom.json]
OK - imported Harvest-24.02.2815-cDOT / [health.json]
OK - imported Harvest-24.02.2815-cDOT / [lun.json]
OK - imported Harvest-24.02.2815-cDOT / [mcc_cluster.json]
OK - imported Harvest-24.02.2815-cDOT / [metadata.json]
OK - imported Harvest-24.02.2815-cDOT / [namespace.json]
OK - imported Harvest-24.02.2815-cDOT / [network.json]
OK - imported Harvest-24.02.2815-cDOT / [nfs4storePool.json]
OK - imported Harvest-24.02.2815-cDOT / [nfs_clients.json]
OK - imported Harvest-24.02.2815-cDOT / [node.json]
OK - imported Harvest-24.02.2815-cDOT / [power.json]
OK - imported Harvest-24.02.2815-cDOT / [qtree.json]
OK - imported Harvest-24.02.2815-cDOT / [quotaReport.json]
OK - imported Harvest-24.02.2815-cDOT / [s3ObjectStorage.json]
OK - imported Harvest-24.02.2815-cDOT / [security.json]
OK - imported Harvest-24.02.2815-cDOT / [shelf.json]
OK - imported Harvest-24.02.2815-cDOT / [smb.json]
OK - imported Harvest-24.02.2815-cDOT / [snapmirror.json]
OK - imported Harvest-24.02.2815-cDOT / [svm.json]
OK - imported Harvest-24.02.2815-cDOT / [volume.json]
OK - imported Harvest-24.02.2815-cDOT / [workload.json]
Imported 33 dashboards to [Harvest-24.02.2815-cDOT] from [grafana/dashboards/cmode]                                                                 

3. other datasource in grafana

image

a. normal cli -> fail

harvest % ./bin/harvest grafana import                         
using API token from config
A Prometheus-typed datasource named "prometheus" does not exist in Grafana. 

b. normal cli with force -> pass but dashboard breaks as no matching datasource

image
harvest % ./bin/harvest grafana import --force
using API token from config
connected to Grafana server (version: 10.3.1)
created Grafana folder [Harvest-24.02.2615-7mode] - OK
created Grafana folder [Harvest-24.02.2615-StorageGrid] - OK
created Grafana folder [Harvest-24.02.2615-cDOT] - OK
preparing to import dashboards...
OK - imported Harvest-24.02.2615-7mode / [aggregate7.json]
OK - imported Harvest-24.02.2615-7mode / [cluster7.json]
OK - imported Harvest-24.02.2615-7mode / [disk7.json]
OK - imported Harvest-24.02.2615-7mode / [lun7.json]
OK - imported Harvest-24.02.2615-7mode / [network7.json]
OK - imported Harvest-24.02.2615-7mode / [node7.json]
OK - imported Harvest-24.02.2615-7mode / [shelf7.json]
OK - imported Harvest-24.02.2615-7mode / [volume7.json]
Imported 8 dashboards to [Harvest-24.02.2615-7mode] from [grafana/dashboards/7mode]
OK - imported Harvest-24.02.2615-StorageGrid / [fabricpool.json]
OK - imported Harvest-24.02.2615-StorageGrid / [overview.json]
OK - imported Harvest-24.02.2615-StorageGrid / [tenant.json]
Imported 3 dashboards to [Harvest-24.02.2615-StorageGrid] from [grafana/dashboards/storagegrid]
OK - imported Harvest-24.02.2615-cDOT / [aggregate.json]
OK - imported Harvest-24.02.2615-cDOT / [cdot.json]
OK - imported Harvest-24.02.2615-cDOT / [changelogMonitor.json]
OK - imported Harvest-24.02.2615-cDOT / [cluster.json]
OK - imported Harvest-24.02.2615-cDOT / [compliance.json]
OK - imported Harvest-24.02.2615-cDOT / [data_protection_snapshot.json]
OK - imported Harvest-24.02.2615-cDOT / [datacenter.json]
OK - imported Harvest-24.02.2615-cDOT / [disk.json]
OK - imported Harvest-24.02.2615-cDOT / [external_service_op.json]
OK - imported Harvest-24.02.2615-cDOT / [flexcache.json]
OK - imported Harvest-24.02.2615-cDOT / [flexgroup.json]
OK - imported Harvest-24.02.2615-cDOT / [fsa.json]
OK - imported Harvest-24.02.2615-cDOT / [headroom.json]
OK - imported Harvest-24.02.2615-cDOT / [health.json]
OK - imported Harvest-24.02.2615-cDOT / [lun.json]
OK - imported Harvest-24.02.2615-cDOT / [mcc_cluster.json]
OK - imported Harvest-24.02.2615-cDOT / [metadata.json]
OK - imported Harvest-24.02.2615-cDOT / [namespace.json]
OK - imported Harvest-24.02.2615-cDOT / [network.json]
OK - imported Harvest-24.02.2615-cDOT / [nfs4storePool.json]
OK - imported Harvest-24.02.2615-cDOT / [nfs_clients.json]
OK - imported Harvest-24.02.2615-cDOT / [node.json]
OK - imported Harvest-24.02.2615-cDOT / [power.json]
OK - imported Harvest-24.02.2615-cDOT / [qtree.json]
OK - imported Harvest-24.02.2615-cDOT / [quotaReport.json]
OK - imported Harvest-24.02.2615-cDOT / [s3ObjectStorage.json]
OK - imported Harvest-24.02.2615-cDOT / [security.json]
OK - imported Harvest-24.02.2615-cDOT / [shelf.json]
OK - imported Harvest-24.02.2615-cDOT / [smb.json]
OK - imported Harvest-24.02.2615-cDOT / [snapmirror.json]
OK - imported Harvest-24.02.2615-cDOT / [svm.json]
OK - imported Harvest-24.02.2615-cDOT / [volume.json]
OK - imported Harvest-24.02.2615-cDOT / [workload.json]
Imported 33 dashboards to [Harvest-24.02.2615-cDOT] from [grafana/dashboards/cmode]

c. normal cli with other datasource -> fail

harvest % ./bin/harvest grafana import --datasource NewDatasource
using API token from config
A Prometheus-typed datasource named "NewDatasource" does not exist in Grafana.                                                                        

d. normal cli with proper datasource with previous dashboards existed -> pass, but fail for overwrite as expected.

harvest % ./bin/harvest grafana import --datasource NetProm      
using API token from config
connected to Grafana server (version: 10.3.1)
folder [Harvest-24.02.2615-cDOT] exists in Grafana - OK
folder [Harvest-24.02.2615-7mode] exists in Grafana - OK
folder [Harvest-24.02.2615-StorageGrid] exists in Grafana - OK
preparing to import dashboards...
error importing [aggregate7.json] to folder [Harvest-24.02.2615-7mode] - the server replied with [412 Precondition Failed]
That means you are trying to overwrite an existing dashboard.

If you want to overwrite, run with the --overwrite flag or choose a different Grafana folder with the --serverfolder flag.
NOTE: If the dashboard already exists, --overwrite will import the changes and increment the dashboard version number.

Server response follows:
    message => A dashboard with the same name in the folder already exists
    status => name-exists

error importing [fabricpool.json] to folder [Harvest-24.02.2615-StorageGrid] - the server replied with [412 Precondition Failed]
That means you are trying to overwrite an existing dashboard.

If you want to overwrite, run with the --overwrite flag or choose a different Grafana folder with the --serverfolder flag.
NOTE: If the dashboard already exists, --overwrite will import the changes and increment the dashboard version number.

Server response follows:
    status => name-exists
    message => A dashboard with the same name in the folder already exists

error importing [aggregate.json] to folder [Harvest-24.02.2615-cDOT] - the server replied with [412 Precondition Failed]
That means you are trying to overwrite an existing dashboard.

If you want to overwrite, run with the --overwrite flag or choose a different Grafana folder with the --serverfolder flag.
NOTE: If the dashboard already exists, --overwrite will import the changes and increment the dashboard version number.

Server response follows:
    message => A dashboard with the same name in the folder already exists
    status => name-exists

e. deleted previous dashboards, normal cli with proper datasource -> pass, dashboards working as expected.

harvest % ./bin/harvest grafana import --datasource NetProm
using API token from config
connected to Grafana server (version: 10.3.1)
created Grafana folder [Harvest-24.02.2615-StorageGrid] - OK
created Grafana folder [Harvest-24.02.2615-cDOT] - OK
created Grafana folder [Harvest-24.02.2615-7mode] - OK
preparing to import dashboards...
OK - imported Harvest-24.02.2615-StorageGrid / [fabricpool.json]
OK - imported Harvest-24.02.2615-StorageGrid / [overview.json]
OK - imported Harvest-24.02.2615-StorageGrid / [tenant.json]
Imported 3 dashboards to [Harvest-24.02.2615-StorageGrid] from [grafana/dashboards/storagegrid]
OK - imported Harvest-24.02.2615-cDOT / [aggregate.json]
OK - imported Harvest-24.02.2615-cDOT / [cdot.json]
OK - imported Harvest-24.02.2615-cDOT / [changelogMonitor.json]
OK - imported Harvest-24.02.2615-cDOT / [cluster.json]
OK - imported Harvest-24.02.2615-cDOT / [compliance.json]
OK - imported Harvest-24.02.2615-cDOT / [data_protection_snapshot.json]
OK - imported Harvest-24.02.2615-cDOT / [datacenter.json]
OK - imported Harvest-24.02.2615-cDOT / [disk.json]
OK - imported Harvest-24.02.2615-cDOT / [external_service_op.json]
OK - imported Harvest-24.02.2615-cDOT / [flexcache.json]
OK - imported Harvest-24.02.2615-cDOT / [flexgroup.json]
OK - imported Harvest-24.02.2615-cDOT / [fsa.json]
OK - imported Harvest-24.02.2615-cDOT / [headroom.json]
OK - imported Harvest-24.02.2615-cDOT / [health.json]
OK - imported Harvest-24.02.2615-cDOT / [lun.json]
OK - imported Harvest-24.02.2615-cDOT / [mcc_cluster.json]
OK - imported Harvest-24.02.2615-cDOT / [metadata.json]
OK - imported Harvest-24.02.2615-cDOT / [namespace.json]
OK - imported Harvest-24.02.2615-cDOT / [network.json]
OK - imported Harvest-24.02.2615-cDOT / [nfs4storePool.json]
OK - imported Harvest-24.02.2615-cDOT / [nfs_clients.json]
OK - imported Harvest-24.02.2615-cDOT / [node.json]
OK - imported Harvest-24.02.2615-cDOT / [power.json]
OK - imported Harvest-24.02.2615-cDOT / [qtree.json]
OK - imported Harvest-24.02.2615-cDOT / [quotaReport.json]
OK - imported Harvest-24.02.2615-cDOT / [s3ObjectStorage.json]
OK - imported Harvest-24.02.2615-cDOT / [security.json]
OK - imported Harvest-24.02.2615-cDOT / [shelf.json]
OK - imported Harvest-24.02.2615-cDOT / [smb.json]
OK - imported Harvest-24.02.2615-cDOT / [snapmirror.json]
OK - imported Harvest-24.02.2615-cDOT / [svm.json]
OK - imported Harvest-24.02.2615-cDOT / [volume.json]
OK - imported Harvest-24.02.2615-cDOT / [workload.json]
Imported 33 dashboards to [Harvest-24.02.2615-cDOT] from [grafana/dashboards/cmode]
OK - imported Harvest-24.02.2615-7mode / [aggregate7.json]
OK - imported Harvest-24.02.2615-7mode / [cluster7.json]
OK - imported Harvest-24.02.2615-7mode / [disk7.json]
OK - imported Harvest-24.02.2615-7mode / [lun7.json]
OK - imported Harvest-24.02.2615-7mode / [network7.json]
OK - imported Harvest-24.02.2615-7mode / [node7.json]
OK - imported Harvest-24.02.2615-7mode / [shelf7.json]
OK - imported Harvest-24.02.2615-7mode / [volume7.json]
Imported 8 dashboards to [Harvest-24.02.2615-7mode] from [grafana/dashboards/7mode]

4 legacy datasource name(Prometheus) exist in grafana

image

a. normal cli -> pass, working as expected in grafana

harvest % ./bin/harvest grafana import                          
using API token from config
connected to Grafana server (version: 10.3.1)
created Grafana folder [Harvest-24.02.2815-cDOT] - OK
created Grafana folder [Harvest-24.02.2815-7mode] - OK
created Grafana folder [Harvest-24.02.2815-StorageGrid] - OK
preparing to import dashboards...
OK - imported Harvest-24.02.2815-StorageGrid / [fabricpool.json]
OK - imported Harvest-24.02.2815-StorageGrid / [overview.json]
OK - imported Harvest-24.02.2815-StorageGrid / [tenant.json]
Imported 3 dashboards to [Harvest-24.02.2815-StorageGrid] from [grafana/dashboards/storagegrid]
OK - imported Harvest-24.02.2815-cDOT / [aggregate.json]
OK - imported Harvest-24.02.2815-cDOT / [cdot.json]
OK - imported Harvest-24.02.2815-cDOT / [changelogMonitor.json]
OK - imported Harvest-24.02.2815-cDOT / [cluster.json]
OK - imported Harvest-24.02.2815-cDOT / [compliance.json]
OK - imported Harvest-24.02.2815-cDOT / [data_protection_snapshot.json]
OK - imported Harvest-24.02.2815-cDOT / [datacenter.json]
OK - imported Harvest-24.02.2815-cDOT / [disk.json]
OK - imported Harvest-24.02.2815-cDOT / [external_service_op.json]
OK - imported Harvest-24.02.2815-cDOT / [flexcache.json]
OK - imported Harvest-24.02.2815-cDOT / [flexgroup.json]
OK - imported Harvest-24.02.2815-cDOT / [fsa.json]
OK - imported Harvest-24.02.2815-cDOT / [headroom.json]
OK - imported Harvest-24.02.2815-cDOT / [health.json]
OK - imported Harvest-24.02.2815-cDOT / [lun.json]
OK - imported Harvest-24.02.2815-cDOT / [mcc_cluster.json]
OK - imported Harvest-24.02.2815-cDOT / [metadata.json]
OK - imported Harvest-24.02.2815-cDOT / [namespace.json]
OK - imported Harvest-24.02.2815-cDOT / [network.json]
OK - imported Harvest-24.02.2815-cDOT / [nfs4storePool.json]
OK - imported Harvest-24.02.2815-cDOT / [nfs_clients.json]
OK - imported Harvest-24.02.2815-cDOT / [node.json]
OK - imported Harvest-24.02.2815-cDOT / [power.json]
OK - imported Harvest-24.02.2815-cDOT / [qtree.json]
OK - imported Harvest-24.02.2815-cDOT / [quotaReport.json]
OK - imported Harvest-24.02.2815-cDOT / [s3ObjectStorage.json]
OK - imported Harvest-24.02.2815-cDOT / [security.json]
OK - imported Harvest-24.02.2815-cDOT / [shelf.json]
OK - imported Harvest-24.02.2815-cDOT / [smb.json]
OK - imported Harvest-24.02.2815-cDOT / [snapmirror.json]
OK - imported Harvest-24.02.2815-cDOT / [svm.json]
OK - imported Harvest-24.02.2815-cDOT / [volume.json]
OK - imported Harvest-24.02.2815-cDOT / [workload.json]
Imported 33 dashboards to [Harvest-24.02.2815-cDOT] from [grafana/dashboards/cmode]
OK - imported Harvest-24.02.2815-7mode / [aggregate7.json]
OK - imported Harvest-24.02.2815-7mode / [cluster7.json]
OK - imported Harvest-24.02.2815-7mode / [disk7.json]
OK - imported Harvest-24.02.2815-7mode / [lun7.json]
OK - imported Harvest-24.02.2815-7mode / [network7.json]
OK - imported Harvest-24.02.2815-7mode / [node7.json]
OK - imported Harvest-24.02.2815-7mode / [shelf7.json]
OK - imported Harvest-24.02.2815-7mode / [volume7.json]
Imported 8 dashboards to [Harvest-24.02.2815-7mode] from [grafana/dashboards/7mode]

b. normal cli with datasource as Prometheus -> pass, working as expected

harvest % ./bin/harvest grafana import --datasource Prometheus  
using API token from config
connected to Grafana server (version: 10.3.1)
created Grafana folder [Harvest-24.02.2815-cDOT] - OK
created Grafana folder [Harvest-24.02.2815-7mode] - OK
created Grafana folder [Harvest-24.02.2815-StorageGrid] - OK
preparing to import dashboards...
OK - imported Harvest-24.02.2815-StorageGrid / [fabricpool.json]
OK - imported Harvest-24.02.2815-StorageGrid / [overview.json]
OK - imported Harvest-24.02.2815-StorageGrid / [tenant.json]
Imported 3 dashboards to [Harvest-24.02.2815-StorageGrid] from [grafana/dashboards/storagegrid]
OK - imported Harvest-24.02.2815-cDOT / [aggregate.json]
OK - imported Harvest-24.02.2815-cDOT / [cdot.json]
OK - imported Harvest-24.02.2815-cDOT / [changelogMonitor.json]
OK - imported Harvest-24.02.2815-cDOT / [cluster.json]
OK - imported Harvest-24.02.2815-cDOT / [compliance.json]
OK - imported Harvest-24.02.2815-cDOT / [data_protection_snapshot.json]
OK - imported Harvest-24.02.2815-cDOT / [datacenter.json]
OK - imported Harvest-24.02.2815-cDOT / [disk.json]
OK - imported Harvest-24.02.2815-cDOT / [external_service_op.json]
OK - imported Harvest-24.02.2815-cDOT / [flexcache.json]
OK - imported Harvest-24.02.2815-cDOT / [flexgroup.json]
OK - imported Harvest-24.02.2815-cDOT / [fsa.json]
OK - imported Harvest-24.02.2815-cDOT / [headroom.json]
OK - imported Harvest-24.02.2815-cDOT / [health.json]
OK - imported Harvest-24.02.2815-cDOT / [lun.json]
OK - imported Harvest-24.02.2815-cDOT / [mcc_cluster.json]
OK - imported Harvest-24.02.2815-cDOT / [metadata.json]
OK - imported Harvest-24.02.2815-cDOT / [namespace.json]
OK - imported Harvest-24.02.2815-cDOT / [network.json]
OK - imported Harvest-24.02.2815-cDOT / [nfs4storePool.json]
OK - imported Harvest-24.02.2815-cDOT / [nfs_clients.json]
OK - imported Harvest-24.02.2815-cDOT / [node.json]
OK - imported Harvest-24.02.2815-cDOT / [power.json]
OK - imported Harvest-24.02.2815-cDOT / [qtree.json]
OK - imported Harvest-24.02.2815-cDOT / [quotaReport.json]
OK - imported Harvest-24.02.2815-cDOT / [s3ObjectStorage.json]
OK - imported Harvest-24.02.2815-cDOT / [security.json]
OK - imported Harvest-24.02.2815-cDOT / [shelf.json]
OK - imported Harvest-24.02.2815-cDOT / [smb.json]
OK - imported Harvest-24.02.2815-cDOT / [snapmirror.json]
OK - imported Harvest-24.02.2815-cDOT / [svm.json]
OK - imported Harvest-24.02.2815-cDOT / [volume.json]
OK - imported Harvest-24.02.2815-cDOT / [workload.json]
Imported 33 dashboards to [Harvest-24.02.2815-cDOT] from [grafana/dashboards/cmode]
OK - imported Harvest-24.02.2815-7mode / [aggregate7.json]
OK - imported Harvest-24.02.2815-7mode / [cluster7.json]
OK - imported Harvest-24.02.2815-7mode / [disk7.json]
OK - imported Harvest-24.02.2815-7mode / [lun7.json]
OK - imported Harvest-24.02.2815-7mode / [network7.json]
OK - imported Harvest-24.02.2815-7mode / [node7.json]
OK - imported Harvest-24.02.2815-7mode / [shelf7.json]
OK - imported Harvest-24.02.2815-7mode / [volume7.json]
Imported 8 dashboards to [Harvest-24.02.2815-7mode] from [grafana/dashboards/7mode]

@cla-bot cla-bot bot added the cla-signed label Feb 26, 2024
@Hardikl Hardikl linked an issue Feb 26, 2024 that may be closed by this pull request
Hardikl and others added 2 commits February 26, 2024 21:18
* feat: dashboards would work with grafana 10.x.x

* feat: added that specific test-case

---------

Co-authored-by: hardikl <hardikl@netapp.com>
@Hardikl
Copy link
Contributor Author

Hardikl commented Feb 28, 2024

default prometheus type datasource name in NABox and Ansible is Prometheus, but with this PR changes, it will work as-is and no impact even if we don't plan to change them.

@Hardikl Hardikl merged commit 254bd6f into main Feb 28, 2024
11 checks passed
@Hardikl Hardikl deleted the hl_grafana_10 branch February 28, 2024 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure that Harvest dashboards work with Grafana 10.X
3 participants