Skip to content

Instantly share code, notes, and snippets.

Burhan Deniz Abdi V3ckt0r

Block or report user

Report or block V3ckt0r

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
View flux-deployment.yaml
---
apiVersion: v1
kind: Namespace
metadata:
name: flux
---
apiVersion: extensions/v1beta1 #apps/v1
kind: Deployment
metadata:
name: flux
@V3ckt0r
V3ckt0r / metrics.txt
Created Feb 21, 2018
Kubernetes 1.8 prometheus metrics
View metrics.txt
# HELP APIServiceOpenAPIAggregationControllerQueue1_adds Total number of adds handled by workqueue: APIServiceOpenAPIAggregationControllerQueue1
# TYPE APIServiceOpenAPIAggregationControllerQueue1_adds counter
APIServiceOpenAPIAggregationControllerQueue1_adds 0
# HELP APIServiceOpenAPIAggregationControllerQueue1_depth Current depth of workqueue: APIServiceOpenAPIAggregationControllerQueue1
# TYPE APIServiceOpenAPIAggregationControllerQueue1_depth gauge
APIServiceOpenAPIAggregationControllerQueue1_depth 0
# HELP APIServiceOpenAPIAggregationControllerQueue1_queue_latency How long an item stays in workqueueAPIServiceOpenAPIAggregationControllerQueue1 before being requested.
# TYPE APIServiceOpenAPIAggregationControllerQueue1_queue_latency summary
APIServiceOpenAPIAggregationControllerQueue1_queue_latency{quantile="0.5"} NaN
APIServiceOpenAPIAggregationControllerQueue1_queue_latency{quantile="0.9"} NaN
View script.js
import http from "k6/http";
import { sleep } from "k6";
export let options = {
vus: 10,
duration: "30s"
};
export default function() {
http.get("http://test.loadimpact.com");
@V3ckt0r
V3ckt0r / example
Last active Nov 15, 2017
Negroni with Prometheus
View example
====server.go file====
func NewHandler() http.Handler {
mux := http.NewServeMux()
mux.Handle("/v1/", v1.NewHandler())
mux.Handle("/ping", HandlePing())
mux.Handle("/", HandlePing())
mux.Handle("/metrics", prometheus.HandlePrometheusMetrics())
return mux
}
@V3ckt0r
V3ckt0r / serviced-proxy-log
Created Nov 8, 2017
Gap in requests between 15:44 and 15:56
View serviced-proxy-log
132.185.161.101 - - [08/Nov/2017:15:44:02 +0000] "POST /zport/dmd/Events/evconsole_router HTTP/2.0" 200 13682 "https://zenoss-a.tools.bbc.co.uk/zport/dmd/Events/evconsole" "tag=nginx" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:49.0) Gecko/20100101 Firefox/49.0" "-"
132.185.160.121 - - [08/Nov/2017:15:44:05 +0000] "POST /zport/dmd/Events/evconsole_router HTTP/2.0" 200 13990 "https://zenoss-a.tools.bbc.co.uk/zport/dmd/Events/evconsole" "tag=nginx" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:56.0) Gecko/20100101 Firefox/56.0" "-"
132.185.161.120 - - [08/Nov/2017:15:44:05 +0000] "POST /zport/dmd/jobs_router HTTP/2.0" 200 1280 "https://zenoss-a.tools.bbc.co.uk/zport/dmd/itinfrastructure" "tag=nginx" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:56.0) Gecko/20100101 Firefox/56.0" "-"
132.185.161.101 - - [08/Nov/2017:15:44:07 +0000] "POST /zport/dmd/Events/evconsole_router HTTP/2.0" 200 13682 "https://zenoss-a.tools.bbc.co.uk/zport/dmd/Events/evconsole" "tag=nginx" "Mozilla/5.0 (Macintosh; Intel Mac
@V3ckt0r
V3ckt0r / gist:a3cad7b13bef89d6b6b7150c25fd93ed
Created Oct 13, 2017
net_data prometheus metric names
View gist:a3cad7b13bef89d6b6b7150c25fd93ed
# COMMENT netdata "pal0113.back.stage.cwwtf.local" to prometheus "172.23.66.241", source "average", last seen 8 seconds ago, time range 1507892792 to 1507892800
# COMMENT homogeneus chart "disk_qops.vg01_data", context "disk.qops", family "/data", units "operations"
# COMMENT netdata_disk_qops_operations_average: dimension "operations", value is operations, gauge, dt 1507892790 to 1507892797 inclusive
netdata_disk_qops_operations_average{chart="disk_qops.vg01_data",family="/data",dimension="operations"} 0.0000000 1507892797000
# COMMENT homogeneus chart "disk_qops.sdb", context "disk.qops", family "sdb", units "operations"
# COMMENT netdata_disk_qops_operations_average: dimension "operations", value is operations, gauge, dt 1507892790 to 1507892797 inclusive
netdata_disk_qops_operations_average{chart="disk_qops.sdb",family="sdb",dimension="operations"} 0.0000000 1507892797000
View boto3_intro.md

boto3 quick hands-on

This documentation aims at being a quick-straight-to-the-point-hands-on AWS resources manipulation with [boto3][0].

First of all, you'll need to install [boto3][0]. Installing it along with [awscli][1] is probably a good idea as

  • [awscli][1] is boto-based
  • [awscli][1] usage is really close to boto's
@V3ckt0r
V3ckt0r / webserver.json
Created Jun 25, 2016
Serviced service template
View webserver.json
{
"ID": "",
"Name": "Python-Web-Server",
"Description": "Python Web Server",
"Services": [
{
"Name": "Python Web Server",
"Command": "",
"Description": "Python Web Server",
"Tags": null,
You can’t perform that action at this time.