Skip to content

Instantly share code, notes, and snippets.

View cmendesce's full-sized avatar

Carlos Mendes cmendesce

View GitHub Profile
@cmendesce
cmendesce / alert.rules
Last active June 28, 2018 08:48
Monitoring Stack
# Alert for high error rate in the Sock Shop.
ALERT HighErrorRate
IF rate(request_duration_seconds_count{status_code="500"}[1m]) > .1
FOR 1m
LABELS { severity = "email" }
ANNOTATIONS {
summary = "High HTTP 500 error rates",
description = "Rate of HTTP 500 errors per 1 minutes: {{ $value }}",
}
global:
scrape_interval: 5s
scrape_timeout: 5s
evaluation_interval: 5s
alerting:
scrape_configs:
- job_name: 'node'
version: '3'
services:
front-end:
image: weaveworksdemos/front-end
ports:
- '80:8079'
environment:
- reschedule=on-node-failure
depends_on:
@cmendesce
cmendesce / docker-stack.yml
Created September 2, 2017 10:44
topology_1
version: '3'
services:
front-end:
image: weaveworksdemos/front-end
ports:
- '80:8079'
environment:
- reschedule=on-node-failure
networks:
version: "3"
services:
cadvisor:
image: google/cadvisor:${CADVISOR_VERSION:-v0.25.0}
networks:
- monitoring
ports:
- "8080:8080"
volumes:
version: "3.3"
networks:
backend:
monitoring:
driver: overlay
attachable: true
volumes:
prometheus: { }
var services = ['carts', 'carts-db', 'catalogue', 'shipping', 'orders', 'catalogue-db', 'front-end'];
var types = ['no_sql_database', 'sql_database', 'app', 'queue', 'background'];
var instance_types = ['T2', 'M4', 'C5'];
var neutral = ['t2.medium', 't2.large'];
function process(scenario, services, workload) {
foreach (var service on services) { // browser for each service and :
service_type = getServiceType(service); // 1 get type of service
recommended_instance = getRecommendedInstance(type); // 2 select the recommended instance
deploy(service, recommended_instance); // 3 deploy that service
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.define "znn" do |znn|
znn.vm.box = "ubuntu/xenial64"
znn.vm.hostname = "znn"
znn.vm.provision "shell", inline: "sudo apt update -y"
znn.vm.provision "shell", inline: "sudo apt install -y build-essential cmake libncurses5-dev imagemagick libxml2-dev zlib1g-dev xml2 bc psmisc wget git htop"
################################################################################
# Purpose: Common configuration file for the Rainbow infrastructure.
# Properties are loaded by class org.sa.rainbow.Rainbow .
# Target: ZNews case study system with Probes, Gauges, and Effectors implemented
# (rainbow.target = znews1-d)
# Framework-defined special properties:
# rainbow.path - the canonical path to the target configuration location
#
# History: see non-target-specific copy
################################################################################
{
"width": 1920,
"height": 533,
"tp": "187.18.171.101",
"pageview": "https://www.rico.com.vc/login?url=/dashboard/renda-fixa/",
"data": "2018-04-30 23:58:46",
"action": "mediamanager",
"usubidainter": false,
"kopidpip": false,
"sgotasdkaoq": false,