You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: samples/speedystore/README.md
+12-10Lines changed: 12 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,8 @@ The diagram below, taken from the [SingleStore documentation](https://docs.singl
26
26
27
27
The SingleStore Toolbox is used to deploy, administer, and manage a SingleStore cluster. The `sdb-admin start-monitoring-kube` command is used to configure and start the monitoring. It has a number of flags to control its operations. See the [SingleStore documentation](https://docs.singlestore.com/db/v8.9/reference/singlestore-tools-reference/sdb-admin-commands/start-monitoring-kube/) for more information.
28
28
29
+
>**NOTE: The SingleStore Toolbox must be installed on a host that can access the SingleStore cluster pods using the internal cluster hostnames and IP addresses. This can be a jump box (bastion) host or, if necessary, one of the Kubernetes cluster nodes. In addition to the SingleStore Toolbox, you must be able to submit `kubectl` commands from this host.**
30
+
29
31
To configure and start the monitoring, including the metrics database, the following command will (eventually) be submitted:
As shown in the diagram above, the export process runs on the Master Aggregator. Therefore, you need to target the SingleStore Master node; i.e. the **node-sas-singlestore-cluster-master-0** node (pod) in a SAS SpeedyStore deployment. You will need to provide the fully-qualified host name or IP address for the exporter host. Andthe name needs to be resolvable by the host running the `sdb-admin` command. Since the fully-qualified host name may not be resolvable, we will use the IP address for the `exporter-host` parameter instead.
64
+
As shown in the diagram above, the export process runs on the Master Aggregator. Therefore, you need to target the SingleStore Master node; i.e. the **node-sas-singlestore-cluster-master-0** node (pod) in a SAS SpeedyStore deployment. You will need to provide the fully-qualified host name or IP address for the exporter host. And, as noted above, the IP address or host name needs to be resolvable by the host running the `sdb-admin` command. This example uses an IP address for the `exporter-host` parameter.
63
65
64
66
You can obtain the IP address for the Master node and stored it in the `CLUSTER_MASTER_IP` environment variable by submitting the following command:
65
67
@@ -96,25 +98,27 @@ Once completed, the exporter process, the pipeline and the metrics database have
96
98

97
99
98
100
### Create the "S2MonitorUser"
99
-
You need to create a specific user that Grafana can use to connect to the ***'metrics'*** database. While the permissions required by this user to pull metrics from the database are fairly limited, it can be helpful to grant additional permissions so this same user can be used to manage the metrics database, pipelines and the exporter process.
101
+
You need to create a specific user that Grafana can use to connect to the ***'metrics'*** database.
100
102
101
103
After logging into SingleStore with the admin user, you can submit `CREATE USER` and `GRANT` commands to create the user and grant the user the desired permissions.
102
104
103
105
For example, the following command creates a user called `S2MonitorUser` and sets its password:
104
106
105
107
`CREATE USER S2MonitorUser IDENTIFIED BY 'password123' REQUIRE NONE;`
106
108
107
-
Then you can grant the desired permissions by submitting the following commands:
109
+
The following command grants a minimal set of permissions that allows the newly created user to access the collected metrics and populate the Grafana dashboards:
108
110
109
-
`GRANT CLUSTER, SHOW METADATA, SELECT, PROCESS ON *.* to 'S2MonitorUser'@'%';`
111
+
`GRANT SELECT, SHOW VIEW ON metrics.* to 'S2MonitorUser'@'%';`
110
112
111
-
`GRANT SELECT, CREATE, INSERT, UPDATE, DELETE, EXECUTE, INDEX, ALTER, DROP, CREATE DATABASE, LOCK TABLES, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, CREATE PIPELINE, DROP PIPELINE, ALTER PIPELINE, START PIPELINE, SHOW PIPELINE ON metrics.* to 'S2MonitorUser'@'%';`
113
+
Alternatively, while the limited permissions above are sufficient to pull metrics from the database, it can be helpful to grant additional permissions so this same user can be used to manage the metrics database, pipelines and the exporter process.
112
114
113
-
Alternatively, you could GRANT the "monitoring user" minimal permissions, and create a second user ("monitoring administrator") to manage the metrics database, pipelines and the exporter process.
115
+
The following commands grant a broader set of permissions to allow the monitoring user to perform these administrator duties:
114
116
115
-
|**TO DO: Does the first GRANT statement only grant the _minimal_ permissions needed to pull metirics? And the 2nd grants the extended permissions needed to be an administrator?**
117
+
`GRANT CLUSTER, SHOW METADATA, SELECT, PROCESS ON *.* to 'S2MonitorUser'@'%';`
116
118
117
-
|**TO DO: Is the user name *S2MonitorUser*?**
119
+
`GRANT SELECT, CREATE, INSERT, UPDATE, DELETE, EXECUTE, INDEX, ALTER, DROP, CREATE DATABASE, LOCK TABLES, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, CREATE PIPELINE, DROP PIPELINE, ALTER PIPELINE, START PIPELINE, SHOW PIPELINE ON metrics.* to 'S2MonitorUser'@'%';`
120
+
121
+
You should consider your organization's specific needs before deciding whether to grant the more limited or broader set of permissions to this user.
118
122
119
123
### Configure the Grafana Datasource
120
124
Grafana datasources provide connection information allowing Grafana to access metric information in response to user queries and to populate dashboards.
|**TO DO**: Is the service-name always _name_of_singlestore_cluster_ + "-dll"
133
-
134
136
If the name of the SingleStore cluster is not ***sas-singlestore-cluster***, you will need to update that portion of the ***url*** field in the file as well.
135
137
136
138
Copy the file to some location, update the necessary information and save your changes. We suggest copying the file into your `$USER_DIR/monitoring` sub-directory, i.e. the same directory used for any other customizations related to the metric monitoring components you have made to your deployment of SAS Viya Monitoring. This will ensure all of the files related to this deployment of SAS Viya Monitoring are in one place.
0 commit comments