git config --global \
url."https://${user}:${personal_access_token}@privategitlab.com".insteadOf \
"https://privategitlab.com"
| * Shows a message while asserting like: | |
| ok: [host] => { | |
| "msg": "disk usage 4.2B of total 20.0GB (21.0%) (should exceed limit 90.0%)" | |
| } | |
| * Note this only looks at first mount point on current node | |
| * Fails if disk is near-full | |
| * Last step pushes to a push-based monitoring service, which will alert us if it doesn't get there after some time | |
| * Need to setup a variable `disk_limit`, which is the max acceptable usage ratio, e.g. set it to 0.8 if you want to keep disks within 80% of max size |
This is not an exhaustive list of all interfaces in Go's standard library.
I only list those I think are important.
Interfaces defined in frequently used packages (like io, fmt) are included.
Interfaces that have significant importance are also included.
All of the following information is based on go version go1.8.3 darwin/amd64.
- Make sure you have
balance sourcein haproxy. - Backend
serversection in haproxy config should have all your k8s nodes. sessionAffinityin k8s is irrelevant.- Exposed k8s service need to have
nodePortset and this annotation:
kubectl annotate service myService service.beta.kubernetes.io/external-traffic=OnlyLocal
This will cause internal k8s loadbalancer on nodeⁿ to route traffic only to pod on nodeⁿ. From Haproxy point of view it will look like nodeⁿ:nodePort === pod on nodeⁿ:port thus disabling k8s LB completly.
Cal Newport, 2016 [purchase it at half-price books]
- Deep Work is valuable
- Deep Work is rare
- Deep Work is meaningful
This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.
http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL
- With Docker 1.8.0 shipped new log-driver for GELF via UDP, this means that the logs from Docker Container(s) can be shipped directly to the ELK stack for further analysis.
- This tutorial will illustrate how to use the GELF log-driver with Docker engine.
- Step 1: Setup ELK Stack:
docker run -d --name es elasticsearchdocker run -d --name logstash --link es:elasticsearch logstash -v /tmp/logstash.conf:/config-dir/logstash.conf logstash logstash -f /config-dir/logstash.conf- Note the config for Logstash can be found at this link
docker run --link es:elasticsearch -d kibana
- Once the ELK stack is up now let's fire up our nginx container which ships its logs to ELK stack.
LOGSTASH_ADDRESS=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' logstash)- `docker run -d --net=host --log-driver=gelf --log-opt gelf-address=u