Skip to content

Instantly share code, notes, and snippets.

Fernando Ipar fipar

Block or report user

Report or block fipar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@fipar
fipar / cassandra-detail_rev2.json
Created Nov 4, 2018
cassandra-detail with deprecated count_scalar replaced by count(scalar(
View cassandra-detail_rev2.json
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "with node exporter and jmx exporter",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
@fipar
fipar / procs_using_swap.sh
Last active May 25, 2018
Get list of process names using swap in descending order (by swap usage). Assumes swap usage is printed in kb always, which I need to validate.
View procs_using_swap.sh
grep -r VmSwap /proc/[0-9][0-9]*/status 2>/dev/null|sort -k2 -nr | \
while read procentry meminkb; do
pid=$(echo $procentry|awk -F'/' '{print $3}')
echo "$(cat /proc/$pid/comm) ($pid): $meminkb"
done 2>/dev/null |more
View gist:c04d740ea3f5f087b44949961ee41b3c
# build.sh here is the build script shipped with gh-ost, but this should be usabe even if you just build via 'go build':
./build.sh 2>&1|grep 'cannot find'|awk '{print $5}'|tr -d '"' | xargs go get
@fipar
fipar / cassandra-pmm-docker-tests.sh
Last active Apr 23, 2018
Tests for the PMM external collectors plmce18 presentation
View cassandra-pmm-docker-tests.sh
#!/bin/bash
cleanup_started_containers()
{
local _containers="pmm-server pmm-data cassandra1 cassandra2 cassandra3"
for container in $_containers; do
docker kill $container &>/dev/null
docker rm $container &>/dev/null
done
docker network rm pmm-network
@fipar
fipar / sysbenc_cassandra.txt
Created Mar 15, 2018
Running sysbench against Cassandra
View sysbenc_cassandra.txt
telecaster:~ fipar$ docker run --name cassandra1 -d cassandra:latest
Unable to find image 'cassandra:latest' locally
latest: Pulling from library/cassandra
2a72cbf407d6: Pull complete
45339d0734a1: Pull complete
0881010f31a6: Pull complete
5331d043a453: Pull complete
c3eba8661eb9: Pull complete
9a8ad05c763b: Pull complete
e215e9518ddb: Pull complete
@fipar
fipar / agenda_tentativa_meetup_mysql_mvd_20171116.txt
Created Nov 15, 2017
Agenda tentativa para la meetup de Nov 16 en la UTU Buceo.
View agenda_tentativa_meetup_mysql_mvd_20171116.txt
9:55 - intro/bienvenida
10:10 - Diferentes paradigmas de persistencia (Marcos Albe)
11:00 - break
11:10 - Group Replication in Action (Francisco Bordenave, Argentina)
11:40 - JSON en MySQL (David Ducos, Argentina)
12:10 - almuerzo
13:10 - Running database services on DC/OS (Gabriel Ciciliani, Argentina)
13:40 - Benchmarks - Breve reseña y ejemplos prácticos (Martin Arrieta)
14:10 - CockroachDB: una base de datos para el apocalipsis zombie (Fernando Ipar)
14:40 - Break
@fipar
fipar / pmm-admin-add-mongodb-error
Created Mar 11, 2017
unknown flag in pmm-admin add mongodb when attempting to use example from the manual
View pmm-admin-add-mongodb-error
vagrant@mongodb-server:~$ sudo pmm-admin add mongodb --replset repl1 --cluster cluster1 --nodetype mongod
Error: unknown flag: --replset
Usage:
pmm-admin add mongodb [name] [flags]
Examples:
pmm-admin add mongodb
pmm-admin add mongodb --cluster bare-metal
Flags:
View gist:16b7d5f72396c87ac1fdded351d8d21c
root@galera1:/tmp# which innobackupex
/usr/bin/innobackupex
root@galera1:/tmp# file /usr/bin/innobackupex
/usr/bin/innobackupex: symbolic link to `xtrabackup'
root@galera1:/tmp# xtrabackup --help
xtrabackup version 2.3.6 based on MySQL server 5.6.24 Linux (x86_64) (revision id: 7686bfc)
Open source backup tool for InnoDB and XtraDB
Copyright (C) 2009-2015 Percona LLC and/or its affiliates.
Portions Copyright (C) 2000, 2011, MySQL AB & Innobase Oy. All Rights Reserved.
View pxc_centos7_bootstrap_node1.sh
yum -y install http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm
packages=""; for p in client-56 server-56; do packages="$packages Percona-XtraDB-Cluster-$p"; done; yum install $packages
systemctl start mysql@bootstrap.service
mysql -e 'show global status like "wsrep_cluster%"'
View example_my.cnf
[mysqld]
tmpdir = /tmp
# Threads
max_connections = 200
# networking
skip-name-resolve
You can’t perform that action at this time.