Logging as Event Streams
Paul Querna
June 27, 2012
Paul Querna
June 27, 2012
syslog, supplement it.logging.error('Something is wrong');
emit('log', {level: 'error', msg: 'Something is wrong'});
There is no difference here.
10.42.0.1 - - [10/Oct/2000:13:55:36 -0700]
"GET /apache_pb.gif HTTP/1.0" 200 2326
grep works.
{
"timestamp": 1324830675.076,
"status": "404",
"short_message": "File does not exist: /var/www/no-such-file",
"host": "ord1.product.api0",
"facility": "httpd",
"errno": "ENOENT",
"remote_host": "50.57.61.4",
"remote_port": "40100",
"path": "/var/www/no-such-file",
"uri": "/no-such-file",
"level": 4,
"headers": {
"user-agent": "BadAgent/1.0",
"connection": "close",
"accept": "*/*"
},
"method": "GET",
"unique_id": ".rh-g2Tm.h-ord1.product.api0.r-axAIO3bO.c-9210.ts-1324830675.v-24e946e"
}
my ($client, $identuser, $authuser, $date, $time, $tz, $method,
$url, $protocol, $status, $bytes) =
/^(\S+) (\S+) (\S+) \[([^:]+):(\d+:\d+:\d+) ([^\]]+)\] "(\S+) (.*?) (\S+)"
(\S+) (\S+)$/;
$msg = JSON->decode($json_text);
[Wed Jun 27 00:00:17.242251 2012] [allowmethods:error]
[pid 70941:tid 4446611456] [client 203.0.113.3:4172]
AH01623: client method denied by server configuration:
'PROPFIND' to /x1/www/ooo-site.apache.org/content/3
.rh-el1U.h-ord1-maas-prod-api0. r-tvTCwfS3.c-33110.ts-1340775011499.v-c76a8c29
localhost
"values": [
{
"id": "541615e0-bee4-11e1-a3c9-69984867fc3c",
"timestamp": 1340642367038,
"method": "POST",
"url": "/v1.0/626873/entities/entMvVW47r/test-check",
"app": "checks",
"query": {},
"txnId": ".rh-TL0q.h-ord1-maas-prod-api0.r-8NQS2mx5.c-280514.ts-1340642366874.v-1a7152ba29615a722a2713bef4d4fe2b5c6ee7ae",
"payload": "{\"target_hostname\":\"www.example.com\",\"type\":\"remote.http\",\"details\":{},\"monitoring_zones_poll\":[\"mzord\",\"mzdfw\",\"mzlon\"]}",
"account_id": "626873",
"headers": {
"host": "monitoring.api.rackspacecloud.com",
"accept-encoding": "gzip,deflate",
"content-type": "application/json; charset=UTF-8",
"accept": "application/json",
"user-agent": "libcloud/0.10.1 (Rackspace Monitoring)",
"content-length": "140"
},
"statusCode": 400
},