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
#include <iomanip> | |
#include <iostream> | |
#include <sstream> | |
#include <string> | |
#include <vector> | |
#include <random> | |
using namespace std; |
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
fn gcd(mut a:isize, mut b:isize) -> usize { | |
let mut t; | |
while a != 0 { | |
t = a; | |
a = b % a; | |
b = t; | |
} | |
b.abs() as usize | |
} |
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
/* | |
layout of config file | |
{ | |
"host":"localhost", | |
"port": 5432, | |
"user": "postgres", | |
"password": "123123", | |
"database": "example_db" | |
} |
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
{ | |
"actions": { | |
"email_admin": { | |
"throttle_period": "0h15m0s", | |
"email": { | |
"to": "alarm@localhost", | |
"from": "sentinl@localhost", | |
"subject": "Alarm", | |
"priority": "high", | |
"body": "Found {{payload.hits.total}} Events" |
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
/* | |
Time fractions: | |
1000 ms/sec | |
60 sec/min | |
60 min/hour | |
24 hour/day | |
*/ | |
let getFlatUTCArray = function (base_value, time_fractions) { | |
time_data = [base_value]; | |
for (i = 0; i < time_fractions.length; i++) { |
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
const elasticsearch = require('elasticsearch'); | |
const bcrypt = require('bcrypt'); | |
const login = 'admin'; | |
const password = 'admin'; | |
const config = { | |
host: [ | |
{ | |
host: 'localhost', |
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
juli 23 09:02:36 dlhavlan18 kibana[28701]: {"type":"error","@timestamp":"2018-07-23T07:02:36Z","tags":["fatal"],"pid":28701,"level":"fatal","error":{"message":"child \"sentinl\" fails because [child \"settings\" fails because [child \"authentication\" fails because [\"imersonate\" is not allowed]]]","name":"ValidationError","stack":"ValidationError: child \"sentinl\" fails because [child \"settings\" fails because [child \"authentication\" fails because [\"imersonate\" is not allowed]]]\n at Object.exports.process (/usr/share/kibana/node_modules/joi/lib/errors.js:181:19)\n at _validateWithOptions (/usr/share/kibana/node_modules/joi/lib/any.js:651:31)\n at root.validate (/usr/share/kibana/node_modules/joi/lib/index.js:121:23)\n at Config._commit (/usr/share/kibana/src/server/config/config.js:119:35)\n at Config.set (/usr/share/kibana/src/server/config/config.js:89:10)\n at Config.extendSchema (/usr/share/kibana/src/server/config/config.js:62:10)\n at /usr/share/kibana/src/plugin_discovery/ |
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
2018-08-03T07:39:35.495Z INFO instanc | |
/beat.go:492 Home path: [/usr/share/filebeat] Config path: [/usr/share/filebeat] Data path: [/usr/share/filebeat/data] Logs path: [/usr/share/filebeat/logs] | |
2018-08-03T07:39:35.496Z DEBUG [beat] instance/beat.go:519 Beat metadata path: /usr/share/filebeat/data/meta.json | |
2018-08-03T07:39:35.513Z INFO instance/beat.go:499 Beat UUID: 2e22082a-ac77-4c04-a56a-05dcd32b8266 | |
2018-08-03T07:39:35.514Z INFO [beat] instance/beat.go:716 Beat info {"system_info": {"beat": {"path": {"config": "/usr/share/filebeat", "data": "/usr/share/filebeat/data", "home": "/usr/share/filebeat", "logs": "/usr/share/filebeat/logs"}, "type": "filebeat", "uuid": "2e22082a-ac77-4c04-a56a-05dcd32b8266"}}} | |
2018-08-03T07:39:35.514Z INFO [beat] instance/beat.go:725 Build info {"system_info": {"build": {"commit": "45a9a9e1561b6c540e94211ebe03d18abcacae55", "libbeat": "6.3.2", "time": "2018-07-20T04:18:19.000Z", "version": "6.3.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
--- | |
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: filebeat-config | |
namespace: kube-system | |
labels: | |
k8s-app: filebeat | |
data: | |
filebeat.yml: |- |
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
2018-09-18T07:15:44.521Z INFO instance/beat.go:492 Home path: [/usr/share/filebeat] Config path: [/usr/share/filebeat] Data path: [/usr/share/filebeat/data] Logs path: [/usr/share/filebeat/logs] | |
2018-09-18T07:15:44.528Z INFO instance/beat.go:499 Beat UUID: ab1c2849-bc71-4f6b-b5ff-823a49fd63bf | |
2018-09-18T07:15:44.533Z INFO [beat] instance/beat.go:716 Beat info {"system_info": {"beat": {"path": {"config": "/usr/share/filebeat", "data": "/usr/share/filebeat/data", "home": "/usr/share/filebeat", "logs": "/usr/share/filebeat/logs"}, "type": "filebeat", "uuid": "ab1c2849-bc71-4f6b-b5ff-823a49fd63bf"}}} | |
2018-09-18T07:15:44.533Z INFO [beat] instance/beat.go:725 Build info {"system_info": {"build": {"commit": "45a9a9e1561b6c540e94211ebe03d18abcacae55", "libbeat": "6.3.2", "time": "2018-07-20T04:18:19.000Z", "version": "6.3.2"}}} | |
2018-09-18T07:15:44.533Z INFO [beat] instance/beat.go:728 Go runtime info {"system_info": {"go": {"os":"linux","arch":"amd64","max_procs":2,"version":"go1.9.4"}}} | |
2018-09-18T07:15:44.535Z INFO |
OlderNewer