Skip to content

Instantly share code, notes, and snippets.

@canimus
Created October 7, 2015 17:16
Show Gist options
  • Save canimus/a35e92cde46df52865db to your computer and use it in GitHub Desktop.
Save canimus/a35e92cde46df52865db to your computer and use it in GitHub Desktop.
curl -G http://localhost:8086/query --data-urlencode "q=CREATE DATABASE racwa"
curl -i -XPOST 'http://localhost:8086/write?db=racwa' --data-binary @influx.line
curl -G 'http://localhost:8086/query?pretty=true' --data-urlencode "db=racwa" --data-urlencode "q=SELECT value FROM cache_on WHERE name='/'"
cat test.tsv | awk -F"\t" '{print "cache_on,client=racwa,region=ap-southwest-2 response="$1",latency="$2",status="$4",name=\""$5"\",code="$6",msg=\""$7"\",user=\""$8"\",bytes="$10",group="$11",active="$12",host=\""$13"\" "$3"000000"}' > influx.line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment