Skip to content

Instantly share code, notes, and snippets.

View fenneh's full-sized avatar
🔥
Hi

fen fenneh

🔥
Hi
View GitHub Profile
{
"order": 1,
"index_patterns": [
"apm-7.2.0*"
],
"settings": {
"index": {
"codec": "best_compression",
"mapping": {
"total_fields": {
@fenneh
fenneh / elastic-template.json
Last active October 16, 2020 17:18
elastic-template
{
"_doc": {
"_meta": {
"beat": "apm",
"version": "7.2.0"
},
"_source": {
"enabled": true
},
"dynamic_templates": [
@fenneh
fenneh / Logstash-log4net-README.md
Created February 14, 2018 14:22 — forked from junxy/Logstash-log4net-README.md
Logstash 2.1.x config for log4net logs.
<!- .... ->
<log4net>    
    <appender name="RollingLogFileAppenderLogstash" type="log4net.Appender.RollingFileAppender">
      <encoding value="utf-8" />
      <!--该目录必需有 IIS用户 写权限-->
      <file value="X:/var/log/[app_name]/logfile.log" />
      <appendToFile value="true" />
      <rollingStyle value="Date" />
      <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
duLuEgqijsj1LusQOnrPQu4tkjLgfsf1PqQiRIsvPOEfLQsrMfLQsClji7sQs1VusQKHHeogszzuINHennkvUMsITjvX3KiACiv4CkjzDsKsmpjsj5EsvkTpLKkCqkjlKs5HsqnrjuUOsQ2isvFKsvXiLQKtQewPeP4LsvkMPej3ucStP0pPKAOsihLsvP0sLq1tvnvbxLsv2QePuFvjPySkjvkoRssvVLsvPYCPuvDxkvLQ2l5VsLbdQomvwms6XGmzrDzuBwi(SqnAjQtRy1sKQxlry2u1TvQDd8BkgUuCCkvL0YL0ZrmDORlY2vI(UskJxQQZlKwpsLEVssLs3xjPs1(bLfnf0DkiuNOBP3TR3PuFRN1ZkOhxnRPxQ1PpO336irimQwkPqpQ1rIqyuT0wHcDheol5qDIJ5AbMmR2crJcDc7JuKzaOEXxyF6vqVmpXLr12df6EJlRGo68maTOG(o5XrbHc1rNNbOc67KhhfekupprImqjpgvb9DYJJccfQxnEwb9DYJJccfQ3SSbDEgGkOVtECuqOq9ioiCmaf03jpokiuOE1bXkOVtECuqOq9eH7G8ocrufQx54XacrBy9CuGBpqXvtQrN734azolB6twpyHcyWlem4bZMkm4MiWGFxnMRoIUlNhCmaNVdRtCmxjkiupv96LrSHuAz11QR1CXMEFmRUkTJgPeuWRQqRUrppKspbGWzjR78EDqAhQtCmxjQLM(Atgll6xHs6Gokjf90JfARYUsUkkStrkKDuiuhsb1stbDK7J0O3aWp0LvRf70Dq4SKd1joMRfyYSAlenk0Dq4yaef0jORIkOVzcXfZ66BMqCXChgTH1VvRE9SPdkrqZwu1ZMUntiUywufQpGbvqpB6Gse0SfvHc1rUpAHEda1TccAYmaDEyWlQYKjZaOO6oWSD4yakOtqxfvqVPYeg1j(jZ1jUmkupYagszf0BQmHrDIFYmvdIMTqH6yDIJ5Qc6Kg27xK1Tqjnk7Hs9CQ6WXa0Ttpr4osd79T
@fenneh
fenneh / consumer.sh
Created June 7, 2017 16:28 — forked from dongjinleekr/consumer.sh
Kafka benchmark commands
## Consumer Throughput: Single consumer thread, no compression
## Consumer Throughput: 3 consumer thread, no compression
bin/kafka-consumer-perf-test.sh --topic benchmark-3-3-none \
--zookeeper kafka-zk-1:2181,kafka-zk-2:2181,kafka-zk-3:2181 \
--messages 15000000 \
--threads 1
@fenneh
fenneh / benchmark-commands.txt
Created June 7, 2017 15:59 — forked from jkreps/benchmark-commands.txt
Kafka Benchmark Commands
Producer
Setup
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test-rep-one --partitions 6 --replication-factor 1
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test --partitions 6 --replication-factor 3
Single thread, no replication
bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test7 50000000 100 -1 acks=1 bootstrap.servers=esv4-hcl198.grid.linkedin.com:9092 buffer.memory=67108864 batch.size=8196
@fenneh
fenneh / Log-EphemeralStats.ps1
Created October 27, 2016 10:40
Log-EphemeralStats.ps1
<#
.SYNOPSIS
Runs in an infinite loop getting the TCP ephemeral port and listening port statistics for each local IP address and outputs the data to a text file log.
.DESCRIPTION
Runs in an infinite loop getting the TCP ephemeral port and listening port statistics for each local IP address and outputs the data to a text file log. The script writes the ephemeral port stats every 60 seconds by default. To get data from remote computers, this script requires PsExec.exe (SysInternals) to be in the same directory as this script. WARNING: Credentials passed into PSExec are sent over the network in clear text! Prevent this by logging in interactively with a domain account that has administrator rights on the target computers and not specifying credentials to this script. PsExec is a Sysinternals tool owned by Microsoft Corporation. PsExec can be downloaded for free at http://live.sysinternals.com/psexec.exe.
.Parameter CollectionInterval
This must be an integer in seconds. This is how often you
@fenneh
fenneh / gist:d818e38ad71d8a1e8d37
Created January 7, 2016 15:10 — forked from athieriot/gist:5532748
Hipchat with IRSSI

If you are adventurous, here the process to have Hipchat working in your favourite IRC client:

@fenneh
fenneh / Update-StepTemplatesOnDeploymentProcesses.ps1
Last active August 27, 2015 15:32 — forked from Dalmirog-zz/Update-StepTemplatesOnDeploymentProcesses.ps1
Update-StepTemplatesOnDeploymentProcesses (nice name, i know)
<#
.Synopsis
Updates the Step Templates used on Deployment Processes to the latest versions
.DESCRIPTION
Step templates can be updated from the library on Octopus, but that doesnt mean that the Deployment processes using that template will start using the latest version right away. Normally, the user would have to update the step template on each deployment process manually. This script takes care of that.
.EXAMPLE
Update-StepTemplatesOnDeploymentProcesses -ActionTemplateID "ActionTemplates-3" -OctopusURI "http://localhost" -APIKey "API-RLMWLZBPMX5DRPLCRNZETFS4HA"
.EXAMPLE
Update-StepTemplatesOnDeploymentProcesses -AllActionTemplates -OctopusURI "http://Octopusdeploy.MyCompany.com" -APIKey "API-TSET42BPMX5DRPLCRNZETFS4HA"
.LINK
#
# Assumptions
#
# 1. If you have a Octopus release deployed, say 1.0.0.73, there is a git
# tag set for that commit in GitHub that is "v1.0.0.73".
#
# 2. You have TeamCity label each successful build in GitHub with the format
# "v{build number}. Sidenote: it appears that TeamCity only labels the
# default branch, but not feature branches.
#