Skip to content

Instantly share code, notes, and snippets.

@adam-hert
adam-hert / log_files.yml
Created May 4, 2017 18:55
example log_files.yaml to send apache logs to Papertrail
files:
- /var/log/apache2/*
destination:
host: logs5.papertrailapp.com
port: 16531
protocol: tls
@adam-hert
adam-hert / Dockerfile
Last active March 31, 2017 17:37
Use Traceview's libcurl in Debian 8
FROM debian:jessie
RUN apt-get update && apt-get -y install wget curl && \
wget https://files.appneta.com/install_appneta.sh && \
sh ./install_appneta.sh _site_key
RUN apt-get install -y --force-yes libcurl3=7.38.0-4+deb8u4+traceview2
CMD ["/usr/bin/some_binary"]
@adam-hert
adam-hert / session.php
Created March 30, 2017 22:31
Custom layer for php session cache
<?php
//custom function to measure session performance with Traceview
function trace_session_start(){
oboe_log_entry('session_cache');
session_start();
$servers = ini_get("session.save_path");
if(isset($_COOKIE)){
$KVOp = 'set';
}
else{
@adam-hert
adam-hert / README.md
Last active March 29, 2017 23:01
Report POST parameters in Traceview
@adam-hert
adam-hert / README.md
Created March 17, 2017 16:54
Change App Entry point

Usage:

sh multi_host_app_config.sh app_name your_site_key entry_layer

This script first deletes the app if it exists, only run this if you need to change the entry point. You will lose historical data in the app. This script assumes you have a file called hosts.txt which has one hostname per line.

You can find your site key here -> https://org_name.tv.solarwinds.com/organization

@adam-hert
adam-hert / oboe.conf
Created March 16, 2017 15:38
Traceview configuration for httpd24
# -------------- start traceview config snippet -------------
# Uncomment the appropriate line to load webserver instrumentation module
# In addition, make sure mod_oboe is loaded before mod_proxy and mod_rewrite
# LoadModule oboe_module PREFIX/mod_oboe.so
LoadModule oboe_module PREFIX/mod_oboe-apache24.so
# uncomment the line that matches your rum module
# LoadModule oboe_ps_module PREFIX/mod_oboe_ps.so
LoadModule oboe_ps_module PREFIX/mod_oboe_ps_ap24.so
@adam-hert
adam-hert / hello.php
Created February 27, 2017 23:30
Simple example to show relationship of layers -> latency: Traceview
<?php
use function oboe_log_entry as enter_layer;
use function oboe_log_exit as leave_layer;
//create layer that lasts 50 milliseconds
enter_layer('net-http');
usleep(50*1000);
leave_layer('net-http');
//create layer
@adam-hert
adam-hert / Trace_annotations.sh
Created February 6, 2017 16:23
Create an annotation using the API
curl -X POST "https://api.tv.solarwinds.com/api-v2/log_message" \
-d "key=YOUR_SITE_KEY" \
-d "message=Test" \
-d "appname=Default"
@adam-hert
adam-hert / javaagent.json
Created December 23, 2016 01:35
Config showing an override of the hostname used by Traceview's javaagent
{
"agent.hostnameOverride":"Custom_host_1",
"agent.logging":"info",
"agent.tracingMode":"always",
"agent.traceAjax":false,
"agent.jdbcInstAll":false,
"agent.jdbcInstParams":true,
"agent.jdbcSanitize":0,
"monitor.jmx.interval":30000,
curl https://api.tv.solarwinds.com/api-v2/assign_app \
-d key=<site key> \
-d hostname=$(hostname) \
-d appname=java_test \
-d layer=tomcat \
-d create=True