This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CRATE-DATA Node | |
# Dockerfile | |
# VERSION 1.0 | |
# use the debian base image provided by dotCloud | |
FROM debian | |
MAINTAINER Stefan Thies, s.thies@bigdata-analyst.de | |
# make sure the package repository is up to date | |
RUN apt-get update -y | |
RUN apt-get install apt-utils -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SET ENV for INSTALLATION PARAMETERS | |
# Set your generated API Key from SPM Application web UI https://apps.sematext.com/users-web/register.do | |
# stop Crate before | |
export SPM_API_KEY="4feb144c-4da8-4081-XXXX-XXXX" | |
# adapt to your CRATE install dir and port | |
export CRATE_HOME="~/crate-0.44.6" | |
export CRATE_PORT="4200" | |
# SPM AGENT INSTALLATION | |
echo "deb http://pub-repo.sematext.com/debian sematext main" >> /etc/apt/sources.list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node -r './spm-agent-nodejs' cluster-test.js | |
2015-03-27T21:22:28.475Z - info: config setting: ./spmlogs/spm.master.-STEFAN-.log | |
2015-03-27T21:22:28.486Z - info: {"_":[],"logger":{"dir":"./spmlogs","level":"debug","console":"true","maxfiles":"2","maxsize":"524288","filename":"spm","useLogstashFormat":false,"silent":false},"dbDir":"./spmdb","spmSenderBulkInsertUrl":"https://spm-receiver.sematext.com:443/receiver/v1/_bulk","maxRetransmitBatchSize":100,"transmitInterval":60000,"collectionInterval":30000,"recoverInterval":240000,"maxDataPoints":99,"agentsToLoad":[],"maxDbSize":25165824,"tokens":{"spm":"STEFAN"},"rcFlat":{"_":[],"logger.dir":"./spmlogs","logger.level":"debug","logger.console":"true","logger.maxfiles":"2","logger.maxsize":"524288","logger.filename":"spm","logger.useLogstashFormat":false,"logger.silent":false,"dbDir":"./spmdb","spmSenderBulkInsertUrl":"https://spm-receiver.sematext.com:443/receiver/v1/_bulk","maxRetransmitBatchSize":100,"transmitInterval":60000,"collectionInterval":30000,"recoverInt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker pull bobrik/kibana4 | |
export LOGSENE_TOKEN=$1 | |
export KIBANA_INDEX=${LOGSENE_TOKEN}_kibana | |
export KIBANA_ES_URL=https://logsene-receiver.sematext.com:443 | |
curl -XPOST ${KIBANA_ES_URL}/${LOGSENE_TOKEN}_kibana | |
docker run -d -p $2:5601 -e KIBANA_ES_URL=\"$KIBANA_ES_URL\" -e KIBANA_INDEX=\"$KIBANA_INDEX\" bobrik/kibana4 | |
echo Please use following index pattern in Kibana 4: [${LOGSENE_TOKEN}_]YYYY-MM-DD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo $2 | htpasswd -i ./src/.htpasswd $1 $2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// app.js generates login/logout events | |
var app = require('./app.js') | |
var os = require('os') | |
// create SPM client | |
var SPM = require('spm-metrics-js') | |
var spmClient = new SPM(process.env.SPM_TOKEN, 20000) | |
// Create a metrics object to count users | |
var userCounterMetric = spmClient.getCustomMetric({ | |
// name of the metric | |
name: 'concurrentUser', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Hapi = require('hapi'); | |
// set before process.env.SPM_TOKEN | process.env.spmagent_tokens__spm | |
// see http://blog.sematext.com/2015/03/30/nodejs-iojs-monitoring/ | |
var agent = require ('spm-agent-nodejs') | |
// Create a server with a host and port | |
var server = new Hapi.Server(); | |
server.connection({ | |
host: 'localhost', | |
port: 8000 | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// How to monitor Restify API's using SPM for Node.js | |
// https://www.npmjs.com/package/spm-agent-nodejs | |
// http://blog.sematext.com/2015/03/30/nodejs-iojs-monitoring/ | |
// note: set env variable: "SPM_TOKEN=YOURTOKEN" | |
var spmAgent = require('spm-agent-nodejs') // that's all, when process.env.SPM_TOKEN is already set. | |
var restify = require('restify') | |
var server = restify.createServer({ | |
name: 'myapp', | |
version: '1.0.0' | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MacBook-Pro-2:crate-0.47.7 stefan$ bin/plugin -u http://dl.bintray.com/mfussenegger/maven/crate-autocomplete.jar -i mfussenegger/crate-autocomplete | |
-> Installing mfussenegger/crate-autocomplete... | |
Trying http://dl.bintray.com/mfussenegger/maven/crate-autocomplete.jar... | |
Downloading ........DONE | |
Installed mfussenegger/crate-autocomplete into /Users/stefan/test/crate-0.47.7/plugins/crate-autocomplete | |
MacBook-Pro-2:crate-0.47.7 stefan$ bin/crate -d | |
-- wait a bit --- | |
curl -XPOST localhost:4200/_sql_complete -d '{"stmt": "select n"}' | |
{"error":"InvalidIndexNameException[[_sql_complete] Invalid index name [_sql_complete], must not start with '_']","status":400} | |
----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Logs begin at Thu 2015-06-18 12:56:53 , end at Fri 2015-06-19 07:00:09 . -- | |
Jun 19 06:50:00 localhost systemd-journal[148]: Runtime journal is using 4.0M (max allowed 24.6M, trying to leave 37.0M free of 242.9M available → current limit 24.6M). | |
Jun 19 06:50:00 localhost systemd-journal[148]: Runtime journal is using 4.0M (max allowed 24.6M, trying to leave 37.0M free of 242.9M available → current limit 24.6M). | |
Jun 19 06:50:00 localhost kernel: Initializing cgroup subsys cpuset | |
Jun 19 06:50:00 localhost kernel: Initializing cgroup subsys cpu | |
Jun 19 06:50:00 localhost kernel: Initializing cgroup subsys cpuacct | |
Jun 19 06:50:00 localhost kernel: Linux version 4.0.3 (buildbot@ip-10-204-3-57) (gcc version 4.8.4 (Gentoo Hardened 4.8.4 p1.5, pie-0.6.1) ) #2 SMP Thu May 14 00:34:07 UTC 2015 | |
Jun 19 06:50:00 localhost kernel: Command line: BOOT_IMAGE=/coreos/vmlinuz-a console=ttyS0,115200n8 console=tty0 root=LABEL=ROOT mount.usr=PARTUUID=7130c94a-213a-4e5a-8e26-6cce9662f132 | |
Jun 19 06:50:00 localhost kernel: e820: BIO |
OlderNewer