Skip to content

Instantly share code, notes, and snippets.

View freddielunchbird's full-sized avatar

Johan Andersson freddielunchbird

View GitHub Profile
@freddielunchbird
freddielunchbird / gist:a74d916b0b9d92ed327552caebfefd67
Created May 16, 2019 14:12
create >1 postgres + postgres_exporter
sudo pg_createcluster -p 5433 --start 11 CLUSTER
vagrant@n6:~$ sudo pg_lsclusters
Ver Cluster Port Status Owner Data directory Log file
11 CLUSTER 5433 online postgres /var/lib/postgresql/11/CLUSTER /var/log/postgresql/postgresql-11-CLUSTER.log
11 main 5432 online postgres /var/lib/postgresql/11/main log/postgresql-%Y-%m-%d_%H%M%S.log
sudo vi /etc/postgresql/11/CLUSTER/pg_hba.conf
diff --git a/app/webroot/js/mvc/controller/nodes/HAProxy.js b/app/webroot/js/mvc/controller/nodes/HAProxy.js
index 59a767b..e90050b 100644
--- a/app/webroot/js/mvc/controller/nodes/HAProxy.js
+++ b/app/webroot/js/mvc/controller/nodes/HAProxy.js
@@ -22,7 +22,8 @@ Ext.define('CmonApp.controller.nodes.HAProxy', {
command: 'haproxy',
job_data: {
action: action,
- haproxy_address: view.node.node.hostname,
+ hostname: view.node.node.hostname,
#include "common/mysql_helper.js"
function main()
{
var hosts = cluster::mySqlNodes();
var advisorMap = {};
for (idx = 0; idx < hosts.size(); ++idx)
{
Reading symbols from /ssd/home/johan/Documents/clustercontrol-enterprise-master/src/cmon...done.
Reading symbols from /lib/x86_64-linux-gnu/libssl.so.1.0.0...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libssl.so.1.0.0
Reading symbols from /lib/x86_64-linux-gnu/libcrypto.so.1.0.0...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
Reading symbols from /usr/lib/x86_64-linux-gnu/libssh.so.4...Reading symbols from /usr/lib/debug/.build-id/2a/ecde8aa4916c07c31fa30acdfb050214701a38.debug...done.
done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libssh.so.4
Reading symbols from /usr/lib/x86_64-linux-gnu/libssh_threads.so.4...Reading symbols from /usr/lib/debug/.build-id/14/c6a509cd99dcbb4b89e4b754fd3c4b88603ae8.debug...done.
done.
diff --git a/tests/common/s9sunittest.cpp b/tests/common/s9sunittest.cpp
index 4992074..3a98031 100644
--- a/tests/common/s9sunittest.cpp
+++ b/tests/common/s9sunittest.cpp
@@ -11,6 +11,11 @@
#include <string.h>
#include <getopt.h>
#include <math.h>
+#include <locale.h>
+
johan@johan-HP-Z620-Workstation:~/Documents/clustercontrol-enterprise-master$ mysql -uproxytest -pproxytest -h10.10.10.14 -P6033 -e "select @@server_id"
mysql: [Warning] Using a password on the command line interface can be insecure.
+-------------+
| @@server_id |
+-------------+
| 4 |
+-------------+
johan@johan-HP-Z620-Workstation:~/Documents/clustercontrol-enterprise-master$ mysql -uproxytest -pproxytest -h10.10.10.14 -P6033 -e "select @@server_id"
mysql: [Warning] Using a password on the command line interface can be insecure.
+-------------+
{
"result": [{
"data_nodes": [{
"compression": "0",
"hostgroup_id": "20",
"hostname": "10.10.10.13",
"max_connections": "100",
"max_latency_ms": "0",
"max_replication_lag": "10",
"port": "3306",
{
"result": [{
"errorMessage": "",
"proxysql": {
"hostname": "10.10.10.13",
"port": 6032
},
"query_rules": [{
"active": "1",
"apply": "1",
{
"result": [{
"errorMessage": "",
"host_groups": [{
"reader_hostgroup": "20",
"writer_hostgroup": "10"
}],
"proxysql": {
"hostname": "10.10.10.13",
"port": 6032
@freddielunchbird
freddielunchbird / gist:10571739497394b78c366c086b7cfbd9
Created May 11, 2016 07:55
Create cluster: one replica set (no config server, no mongos).
{
"operation": "createJob",
"job": {
"command": "create_cluster",
"job_data": {
"type": "mongodb",
"ssh_user": "csjpeter",
"ssh_keyfile": "/home/csjpeter/.ssh/id_rsa",
"api_id": 1,
"user_id": 1,