Skip to content

Instantly share code, notes, and snippets.

If Echo runs out of available system or data space, the following actions should be taken into considerations.
# System is out of space
- Isolate the loaded folder on disk via `du -h`
- Usually the folder at `/var/lib/docker` will be packed
# Data disk running out of space
- This is usually do to a failure with `echo-data-retention`
- Check the logs for retention via `docker-compose logs -f --tail 200 retention`
@itayw
itayw / release-notes.sh
Created November 28, 2017 07:05
Generate release notes
#! /bin/bash
set -e
set -x
IFS='.' read -a myarray <<< "$CIRCLE_TAG"
CIRCLE_TAG_MAJOR=${myarray[0]}
CIRCLE_TAG_MINOR=${myarray[0]}.${myarray[1]}
echo Major $CIRCLE_TAG_MAJOR
(context, next) => {
async function checkAsset(id) {
let Asset;
try {
Asset = await context.Assets.get('Host', id);
} catch (ex) {
//we're missing an asset, let's add one
Asset = {
id: id,
title: id
[2017-10-18T07:24:49,993][INFO ][o.e.n.Node ] [] initializing ...
[2017-10-18T07:24:50,052][INFO ][o.e.n.Node ] node name [G-fWA-X] derived from node ID [G-fWA-X9SqGhX1N-MjuO7g]; set [node.name] to override
[2017-10-18T07:24:50,053][INFO ][o.e.n.Node ] version[5.5.0], pid[1], build[260387d/2017-06-30T23:16:05.735Z], OS[Linux/4.4.0-79-generic/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_131/25.131-b12]
[2017-10-18T07:24:50,823][INFO ][l.j.s.ShieldPlugin ] Echo Shield plugin starting on cluster echo_elasticsearch.
[2017-10-18T07:24:50,824][INFO ][l.j.s.ShieldPlugin ] Node [G-fWA-X] is a transportClient: false/tribeNode: false/tribeNodeClient: false
[2017-10-18T07:24:57,369][INFO ][l.j.s.ShieldPlugin ] Shield handling request for /_search
@itayw
itayw / jq nice
Created September 14, 2017 09:59
pretty print json logs
docker logs -f --tail 200 echo_ui_1 | jq -R 'fromjson?' -c
(context, next) => {
context.Assets.insert('joola', 'or', {
name: 'Or is part of Joola',
number: 1,
bool: true,
date: new Date()
})
.then(() => {
return context.Assets.list('joola')
.then((results) => {
@itayw
itayw / gist:acefa92ea2e4114d286a9b4d70f01450
Created June 7, 2017 08:37
update kibana index-pattern to not expandable
POST /.kibana/index-pattern/echo-raw-*/_update
{
"doc": {
"notExpandable": true
}
}
- Create Service Account
- Add Service Account to IAM
- For each project that needs monitoring: Grant the user with Project Viewer, Pub/Sub Editor, Logs Configuration Writer
- Enable API - Google Cloud Resource Manager
- Add serviceAccount:[email protected] permission to Pub/Sub publisher
@itayw
itayw / nginx.conf
Created May 9, 2017 05:38
allow API over HTTP
server {
listen 80;
location /api/ {
proxy_pass http://ui/api/;
proxy_http_version 1.1;
proxy_set_header Proxy-Connection "Keep-Alive";
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
dd if=/dev/zero of=/tmp/output conv=fdatasync bs=384k count=1k; rm -f /tmp/output