PMM2 provides us with a complete monitoring solution for our servers, but there are times when this information needs to be accessed by an external team. Grafana solves this problem through organizations, so we can have specific dashboards per organization.
We are going to use a tool called wizzy as it makes it much easier for us to make copies of dashboards and then load them. It is a tool written in NodeJs so we install npm, in my case under FreeBSD:
npm install -g wizzy
We create a directory where we will store the dashboards and all the information obtained from Grafana:
cd pmm2/
We initialize the Git repository and configure the connection to the Grafana server:
wizzy init
wizzy set grafana url http://grafana.alfaexploit.com/graph
wizzy set grafana username admin
wizzy set grafana password PASSWORD
wizzy status
We show the current organizations:
Output:
[
{
"id": 1,
"name": "Main Org."
}
]
We make sure we are in the main org:
{
"message": "Active organization changed"
}
β Org switched to 1 successfully.
We download the configured datasources:
β Total datasources imported: 3
β Datasources import successful.
If we only want one:
We consult the datasources we have downloaded:
Output:
ββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β Datasource Name β Datasource Type β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β ClickHouse β vertamedia-clickhouse-datasβ¦ β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β PostgreSQL β postgres β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β Prometheus β prometheus β
ββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββ
β Total datasources: 3
β Showed datasources summary successfully.
We list the available dashboards:
Output:
ββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β Title β Slug β ID / UID β Type β folderTitle β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β Insight β insight β 3 / QxVaaQuWk β dash-folder β β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β MongoDB β mongodb β 2 / mxVaawXWz β dash-folder β β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β MySQL β mysql β 5 / vBV-aQXZz β dash-folder β β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β OS β os β 7 / QL4a-wXWk β dash-folder β β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β PMM β pmm β 6 / kY4a-QXWz β dash-folder β β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β PostgreSQL β postgresql β 1 / G14aawuZk β dash-folder β β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β Query Analytics β query-analytics β 4 / A-V-awXZk β dash-folder β β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β Advanced Data Exploration β advanced-data-exploration β 71 / 1oz9QMHmk β dash-db β Insight β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β CPU Utilization Details β cpu-utilization-details β 87 / node-cpu β dash-db β OS β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β Disk Details β disk-details β 111 / node-disk β dash-db β OS β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β Home Dashboard β home-dashboard β 66 / pmm-home β dash-db β Insight β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β Memory Details β memory-details β 103 / node-memory β dash-db β OS β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β MongoDB Cluster Summary β mongodb-cluster-summary β 95 / mongodb-cluster-summary β dash-db β MongoDB β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β MongoDB InMemory Details β mongodb-inmemory-details β 85 / mongodb-inmemory β dash-db β MongoDB β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β MongoDB Instance Summary β mongodb-instance-summary β 84 / mongodb-instance-summaβ¦ β dash-db β MongoDB β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β MongoDB Instances Compare β mongodb-instances-compare β 109 / mongodb-instance-compβ¦ β dash-db β MongoDB β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β MongoDB Instances Overview β mongodb-instances-overview β 106 / mongodb-instance-overβ¦ β dash-db β MongoDB β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β MongoDB MMAPv1 Details β mongodb-mmapv1-details β 72 / mongodb-mmapv1 β dash-db β MongoDB β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β MongoDB ReplSet Summary β mongodb-replset-summary β 91 / mongodb-replicaset-sumβ¦ β dash-db β MongoDB β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β MongoDB RocksDB Details β mongodb-rocksdb-details β 90 / mongodb-rocksdb β dash-db β MongoDB β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β MongoDB WiredTiger Details β mongodb-wiredtiger-details β 80 / mongodb-wiredtiger β dash-db β MongoDB β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β MySQL Amazon Aurora Details β mysql-amazon-aurora-details β 70 / mysql-amazonaurora β dash-db β MySQL β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β MySQL Command/Handler Countβ¦ β mysql-command-handler-countβ¦ β 68 / mysql-commandhandler-cβ¦ β dash-db β MySQL β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β MySQL InnoDB Compression Deβ¦ β mysql-innodb-compression-deβ¦ β 67 / mysql-innodb-compressiβ¦ β dash-db β MySQL β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β MySQL InnoDB Details β mysql-innodb-details β 94 / mysql-innodb β dash-db β MySQL β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β MySQL Instance Summary β mysql-instance-summary β 77 / mysql-instance-summary β dash-db β MySQL β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β MySQL Instances Compare β mysql-instances-compare β 108 / mysql-instance-compare β dash-db β MySQL β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β MySQL Instances Overview β mysql-instances-overview β 105 / mysql-instance-overviβ¦ β dash-db β MySQL β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β MySQL MyISAM/Aria Details β mysql-myisam-aria-details β 89 / mysql-myisamaria β dash-db β MySQL β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β MySQL MyRocks Details β mysql-myrocks-details β 75 / mysql-myrocks β dash-db β MySQL β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β MySQL Performance Schema Deβ¦ β mysql-performance-schema-deβ¦ β 82 / mysql-performance-scheβ¦ β dash-db β MySQL β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β MySQL Query Response Time Dβ¦ β mysql-query-response-time-dβ¦ β 76 / mysql-queryresponsetime β dash-db β MySQL β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β MySQL Replication Summary β mysql-replication-summary β 98 / mysql-replicaset-summaβ¦ β dash-db β MySQL β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β MySQL Table Details β mysql-table-details β 96 / mysql-table β dash-db β MySQL β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β MySQL TokuDB Details β mysql-tokudb-details β 93 / mysql-tokudb β dash-db β MySQL β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β MySQL User Details β mysql-user-details β 86 / mysql-user β dash-db β MySQL β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β MySQL Wait Event Analyses Dβ¦ β mysql-wait-event-analyses-dβ¦ β 83 / mysql-waitevents-analyβ¦ β dash-db β MySQL β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β Network Details β network-details β 99 / node-network β dash-db β OS β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β Node Summary β node-summary β 88 / node-instance-summary β dash-db β OS β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β Node Temperature Details β node-temperature-details β 112 / node-temp β dash-db β OS β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β Nodes Compare β nodes-compare β 100 / node-instance-compare β dash-db β OS β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β Nodes Overview β nodes-overview β 102 / node-instance-overview β dash-db β OS β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β NUMA Details β numa-details β 97 / node-memory-numa β dash-db β OS β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β PMM Add Instance β pmm-add-instance β 65 / pmm-add-instance β dash-db β PMM β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β PMM Inventory β pmm-inventory β 63 / pmm-inventory β dash-db β PMM β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β PMM Query Analytics β pmm-query-analytics β 62 / pmm-qan β dash-db β Query Analytics β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β PMM Settings β pmm-settings β 64 / pmm-settings β dash-db β PMM β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β PostgreSQL Instance Summary β postgresql-instance-summary β 101 / postgresql-instance-sβ¦ β dash-db β PostgreSQL β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β PostgreSQL Instances Compare β postgresql-instances-compare β 110 / postgresql-instance-cβ¦ β dash-db β PostgreSQL β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β PostgreSQL Instances Overviβ¦ β postgresql-instances-overviβ¦ β 107 / postgresql-instance-oβ¦ β dash-db β PostgreSQL β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β Processes Details β processes-details β 104 / node-cpu-process β dash-db β OS β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β Prometheus β prometheus β 81 / prometheus β dash-db β Insight β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β Prometheus Exporter Status β prometheus-exporter-status β 69 / prometheus-status β dash-db β Insight β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β Prometheus Exporters Overviβ¦ β prometheus-exporters-overviβ¦ β 79 / prometheus-overview β dash-db β Insight β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β ProxySQL Instance Summary β proxysql-instance-summary β 78 / proxysql-instance-summβ¦ β dash-db β MySQL β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β PXC/Galera Cluster Summary β pxc-galera-cluster-summary β 92 / pxc-cluster-summary β dash-db β MySQL β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β PXC/Galera Node Summary β pxc-galera-node-summary β 73 / pxc-node-summary β dash-db β MySQL β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββ€
β PXC/Galera Nodes Compare β pxc-galera-nodes-compare β 74 / pxc-nodes-compare β dash-db β MySQL β
ββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββ
β Total dashboards: 58
β Displayed dashboards list successfully.
We download the dashboards locally:
Importing 51 dashboards:
β Dashboard advanced-data-exploration imported successfully.
β Dashboard cpu-utilization-details imported successfully.
β Dashboard disk-details imported successfully.
β Dashboard home-dashboard imported successfully.
β Dashboard memory-details imported successfully.
β Dashboard mongodb-cluster-summary imported successfully.
β Dashboard mongodb-inmemory-details imported successfully.
β Dashboard mongodb-instance-summary imported successfully.
β Dashboard mongodb-instances-compare imported successfully.
β Dashboard mongodb-instances-overview imported successfully.
β Dashboard mongodb-mmapv1-details imported successfully.
β Dashboard mongodb-replset-summary imported successfully.
β Dashboard mongodb-rocksdb-details imported successfully.
β Dashboard mongodb-wiredtiger-details imported successfully.
β Dashboard mysql-amazon-aurora-details imported successfully.
β Dashboard mysql-command-handler-counters-compare imported successfully.
β Dashboard mysql-innodb-compression-details imported successfully.
β Dashboard mysql-innodb-details imported successfully.
β Dashboard mysql-instance-summary imported successfully.
β Dashboard mysql-instances-compare imported successfully.
β Dashboard mysql-instances-overview imported successfully.
β Dashboard mysql-myisam-aria-details imported successfully.
β Dashboard mysql-myrocks-details imported successfully.
β Dashboard mysql-performance-schema-details imported successfully.
β Dashboard mysql-query-response-time-details imported successfully.
β Dashboard mysql-replication-summary imported successfully.
β Dashboard mysql-table-details imported successfully.
β Dashboard mysql-tokudb-details imported successfully.
β Dashboard mysql-user-details imported successfully.
β Dashboard mysql-wait-event-analyses-details imported successfully.
β Dashboard network-details imported successfully.
β Dashboard node-summary imported successfully.
β Dashboard node-temperature-details imported successfully.
β Dashboard nodes-compare imported successfully.
β Dashboard nodes-overview imported successfully.
β Dashboard numa-details imported successfully.
β Dashboard pmm-add-instance imported successfully.
β Dashboard pmm-inventory imported successfully.
β Dashboard pmm-query-analytics imported successfully.
β Dashboard pmm-settings imported successfully.
β Dashboard postgresql-instance-summary imported successfully.
β Dashboard postgresql-instances-compare imported successfully.
β Dashboard postgresql-instances-overview imported successfully.
β Dashboard processes-details imported successfully.
β Dashboard prometheus imported successfully.
β Dashboard prometheus-exporter-status imported successfully.
β Dashboard prometheus-exporters-overview imported successfully.
β Dashboard proxysql-instance-summary imported successfully.
β Dashboard pxc-galera-cluster-summary imported successfully.
β Dashboard pxc-galera-node-summary imported successfully.
β Dashboard pxc-galera-nodes-compare imported successfully.
β 51 dashboards imported successfully.
If we only want one:
We create a new organization:
Output:
{
"message": "Organization created",
"orgId": 14
}
β Created Grafana org alfaexploit successfully.
We show the organizations again:
Output:
[
{
"id": 1,
"name": "Main Org."
},
{
"id": 14,
"name": "alfaexploit"
}
]
We switch organizations to upload the datasources/dashboards:
Output:
{
"message": "Active organization changed"
}
β Org switched to 14 successfully.
We add the datasource:
Datasource does not exists in Grafana.
Trying to create a new datasource.
Output:
{
"datasource": {
"id": 11,
"orgId": 14,
"name": "Prometheus",
"type": "prometheus",
"typeLogoUrl": "",
"access": "proxy",
"url": "http://127.0.0.1:9090/prometheus/",
"password": "",
"user": "",
"database": "",
"basicAuth": false,
"basicAuthUser": "",
"basicAuthPassword": "",
"withCredentials": false,
"isDefault": true,
"jsonData": {
"httpMethod": "POST",
"keepCookies": [],
"timeInterval": "1s"
},
"secureJsonFields": {},
"version": 1,
"readOnly": false
},
"id": 11,
"message": "Datasource added",
"name": "Prometheus"
}
β Datasource Prometheus export successful.
In my case, I am only interested in a few dashboards, before loading them, we remove the links from the query analytics and others since we do not want anyone to have access:
for DASH in OS/cpu-utilization-details OS/memory-details OS/disk-details MySQL/mysql-instance-summary MongoDB/mongodb-instance-summary; do
jq 'del(.links)' dashboards/$DASH.json > /tmp/grafana.json
mv /tmp/grafana.json dashboards/$DASH.json
done
We will have to modify the queries of the dashboards so that only the servers we want to be visible in that organization appear in the drop-downs. Depending on the dashboard, we will have to modify it in one way or another. In my case, I only want the servers called kr0mtest* to be visible:
"label_values({__name__=~\"node_boot_time_seconds|rdsosmetrics_timestamp\"}, node_name)"
"label_values({__name__=~\"node_boot_time_seconds|rdsosmetrics_timestamp\", node_name=~\"kr0mtest.*\"}, node_name)"
"label_values(up{node_type=~\"generic|remote_rds|container|remote\"}, node_name)"
"label_values(up{node_type=~\"generic|remote_rds|container|remote\", node_name=~\"kr0mtest.*\"}, node_name)"
"label_values({__name__=~\"node_disk_reads_completed_total|aws_rds_disk_queue_depth_average|rdsosmetrics_diskIO_readLatency\"}, node_name)")
"label_values({__name__=~\"node_disk_reads_completed_total|aws_rds_disk_queue_depth_average|rdsosmetrics_diskIO_readLatency\", node_name=~\"kr0mtest.*\"}, node_name)"
"label_values(mysql_up{node_name=~\"$node_name\"}, node_name)"
"label_values(mysql_up{node_name=~\"$node_name\", node_name=~\"kr0mtest.*\"}, node_name)"
"label_values(mongodb_up{node_name=~\"$node_name\"}, node_name)"
"label_values(mongodb_up{node_name=~\"$node_name\", node_name=~\"kr0mtest.*\"}, node_name)"
We upload the dashboards:
wizzy export dashboard OS/cpu-utilization-details
wizzy export dashboard OS/memory-details
wizzy export dashboard OS/disk-details
wizzy export dashboard MySQL/mysql-instance-summary
wizzy export dashboard MongoDB/mongodb-instance-summary
Wizzy does not allow user management, so we will create them manually. We could use the API, but since we are going to create few users, I don’t consider it necessary to generate an API key:
Server Admin -> Users
New user
We fill in the data:
We click on the user:
We assign the new organization as a viewer and remove the main org:
If we log in with the user, we can see that they only have access to the metrics of the kr0mtest* servers and cannot edit the dashboards: