Skip to content

Instantly share code, notes, and snippets.

This file has been truncated, but you can view the full file.
# ========
# captured on: Fri Aug 29 21:35:50 2014
# hostname : ip-10-81-171-47
# os release : 3.2.0-67-virtual
# perf version : 3.2.60
# arch : x86_64
# nrcpus online : 16
# nrcpus avail : 16
# cpudesc : Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
# cpuid : GenuineIntel,6,62,4
@alq666
alq666 / kworker
Created August 29, 2014 21:40
Perf tracing of kworker
This file has been truncated, but you can view the full file.
# ========
# captured on: Fri Aug 29 21:35:50 2014
# hostname : ip-10-81-171-47
# os release : 3.2.0-67-virtual
# perf version : 3.2.60
# arch : x86_64
# nrcpus online : 16
# nrcpus avail : 16
# cpudesc : Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
# cpuid : GenuineIntel,6,62,4
@alq666
alq666 / ck.awk
Created August 28, 2014 21:08
Parse PG checkpoint log entries
BEGIN {
print "tstamp,buffers,pct_buffer,added,removed,recycled,write,sync,total,synced,longest,average"
}
# 2014-06-27 03:17:15.366 UTC "checkpoint complete: wrote 21504 buffers (1.4%); 0 transaction log file(s) added 0 removed 0 recycled; write=8.298 s sync=2.225 s total=10.544 s; sync files=247 longest=0.174 s average=0.009 s"
{
split($19, w, /=/);
split($21, s, /=/);
split($23, t, /=/);
split($26, f, /=/);
split($27, l, /=/);
@alq666
alq666 / dog-splunk.sh
Created May 2, 2014 19:32
Datadog & Splunk minimal integration
#!/bin/bash
source /Users/alq/Code/workspace/bin/activate
dog event post "Found $SPLUNK_ARG_1 events in splunk" "Matching $SPLUNK_ARG_2 based on $SPLUNK_ARG_5:, from report $SPLUNK_ARG_4. More details at $SPLUNK_ARG_6."
{
"board_bgtype": "board_graph",
"board_title": "High-level Screenboard with Datadog",
"height": 143,
"id": 2938,
"template_variables": [
{
"default": "*",
"name": "scope"
}
@alq666
alq666 / gist:9927492
Last active August 29, 2015 13:58
Top function summary
Shortcut num_series (= N) method asc / desc
----------------------------------------------------------
topN 5, 10, 15, 20 mean desc
topN_max 5, 10, 15, 20 max desc
topN_min 5, 10, 15, 20 min desc
topN_last 5, 10, 15, 20 last desc
topN_area 5, 10, 15, 20 area desc
topN_norm 5, 10, 15, 20 norm desc
bottomN 5, 10, 15, 20 mean asc
bottomN_max 5, 10, 15, 20 max asc
{
"board_bgtype": "board_graph",
"board_title": "Elasticsearch Screenboard",
"height": 160,
"id": 3,
"template_variables": [
{
"default": "*",
"name": "scope"
}
@alq666
alq666 / markers.json
Created March 5, 2014 16:25
Example of markers
{
"events": [],
"requests": [
{
"q": "avg:system.load.norm.1{blah} by {host}",
"stacked": false
},
{
"q": "avg:system.load.norm.1{blah} by {host}",
"stacked": false

my comments in bold

@datadoghq - Overall well done! Here's some feedback:

Signup/User process

  • when someone invites you to their datadog/team, you get an email but because you are already registered you can't join their team. Especially annoying for freelancers that work for multiple customers but don't have an email account at the customer site
  • disable a user is scary (will this delete it, can I re-create it?); a warning or ? next to it would help for fast understanding
  • if the user you invite does not have it's gmail activated yet (google for apps), when the email is added it's send out (but doesn't reach it of course). There is no way of re-sending the invite from the admin side
  • the forcing of registering at least one agent/integration is really annoying. if you signup through an ipad or the person signing up (like billing) does not have any way to go past that screen. So you wonder , am I registered or not? In our case the person installed the mac agent from it's laptop to get it going. N
@alq666
alq666 / dog.r
Created January 17, 2014 04:14
Query Datadog from R
query_to_df <- function(api_key, application_key, query, from_t, to_t) {
res <- getForm('https://app.datadoghq.com/api/v1/query', api_key=api_key, application_key=application_key, from=from_t, to=to_t, query=query)
parsed <- fromJSON(res)
series <- parsed[['series']]
timeseries <- series[[1]]
pointlist <- timeseries[['pointlist']]
timestamps <- to_epoch(sapply(pointlist, '[', 1))
values <- sapply(pointlist, '[', 2)
return(data.frame(timestamps, values))
}