Skip to content

Instantly share code, notes, and snippets.

name: APM JMX Copy
charts:
- name: Response Time
type: line
streams:
- group_function: average
summary_function: average
tags:
- name: service
dynamic: true
@adam-hert
adam-hert / install.sh
Last active December 7, 2018 19:55
Install docker
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt-get update
apt-get install -y docker-ce=18.06.0~ce~3-0~ubuntu
apt-get update && apt-get install -y apt-transport-https curl
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
cat <<EOF > /etc/apt/sources.list.d/kubernetes.list
deb https://apt.kubernetes.io/ kubernetes-xenial main
EOF
apt-get update
@adam-hert
adam-hert / advanced_xml.php
Last active May 15, 2018 16:04
Adding XML to traces via info events
<?php
print('XML example');
$xml = '<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Dont forget me this weekend!</body>
</note>';
@adam-hert
adam-hert / README.md
Created April 18, 2018 14:06
AppOptics Elasticsearch

linux platforms:

task yaml file goes here -> /opt/appoptics/etc/tasks.d/task-elasticsearch.yaml Plugin yaml goes here -> /opt/appoptics/etc/plugins.d/elasticsearch.yaml

Can download plugin binary from here: https://github.com/intelsdi-x/snap-plugin-collector-elasticsearch/releases Put it in this location, with the same name -> /opt/appoptics/bin/snap-plugin-collector-elasticsearch

@adam-hert
adam-hert / collectd.conf
Last active December 19, 2017 21:05
Collectd.conf for AppOptics
Interval 60
Hostname steve
LoadPlugin syslog
LoadPlugin cpu
LoadPlugin disk
LoadPlugin load
LoadPlugin memory
LoadPlugin df
LoadPlugin write_http
@adam-hert
adam-hert / custom_layer.php
Created December 15, 2017 20:46
Custom Layer using AppOptics
<?php
appoptics_log_entry('Oracle_SQL');
usleep(50*1000);
appoptics_log_exit('Oracle_SQL');
print("hello");
?>
@adam-hert
adam-hert / README.md
Last active December 9, 2017 01:05
AppOptics Celery tracing

This gist depends on redis-server.

Start Celery: celery -A test_celery worker --loglevel=info

Then run the script manually to creata a task: python test_celery.py

@adam-hert
adam-hert / Installaation.txt
Last active August 28, 2017 21:57
Silent .NET Installation
C:\TraceView_Setup.exe /sp- /silent /LOADINF=silent_install.txt
C:\DotNetAgent_Setup.exe /silent /COMPONENTS=IIsOnly
@adam-hert
adam-hert / compile.sh
Last active September 29, 2017 19:23
Java partition + method profile
javac -cp *:. hello-trace.java
@adam-hert
adam-hert / tracing_celery.py
Created August 21, 2017 15:08
Tracing Celery Tasks
from celery.task import task
import oboe
from oboeware import loader
# load monkey-patched instrumentation for supported modules
loader.load_inst_modules()
# start traces on decorated method (sampling automatically
# controlled by smart tracing as normal web requests)
oboe.config['tracing_mode'] = 'always'