Skip to content

Instantly share code, notes, and snippets.

View mathieue's full-sized avatar

Mathieu Elie mathieue

View GitHub Profile
@mathieue
mathieue / index.html
Created September 24, 2014 12:48
d3.js force layout experiments
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.node {
fill: #000;
}
</style>
input {
tcp {
port => 242
}
file {
type => "syslog"
path => [ "/var/log/*.log", "/var/log/messages", "/var/log/syslog" ]
start_position => "beginning"
}
curl -X POST 'http://localhost:9200/cours/note' -d '{"nom": "Eric","ville":"Paris","latlon": "48.864716,2.349014","discipline":"Mathematiques","note":12}'
curl -X POST 'http://localhost:9200/cours/note' -d '{"nom": "Martin","ville":"Paris","latlon": "48.864716,2.349014","discipline":"Mathematiques","note":13}'
curl -X POST 'http://localhost:9200/cours/note' -d '{"nom": "Patrick","ville":"Paris","latlon": "48.864716,2.349014","discipline":"Mathematiques","note":9}'
curl -X POST 'http://localhost:9200/cours/note' -d '{"nom": "Sebastien","ville":"Paris","latlon": "48.864716,2.349014","discipline":"Mathematiques","note":12}'
curl -X POST 'http://localhost:9200/cours/note' -d '{"nom": "Stephane","ville":"Bordeaux","latlon": "44.836151,-0.580816","discipline":"Mathematiques","note":11}'
curl -X POST 'http://localhost:9200/cours/note' -d '{"nom": "Francois","ville":"Bordeaux","latlon": "44.836151,-0.580816","discipline":"Mathematiques","note":18}'
curl -X POST 'http://localhost:9200/cours/note' -d '{"nom": "S
TP SECU
Dans le fichier de configuration elasticsearch.yml
xpack.security.enabled: true
Relancer elasticsearch.
Se connecter a kibana: est-il accessible ?
Se connecter a elasticsearch sur le port 9200: est-il accessible ?
@mathieue
mathieue / playlist-converter-node.js
Last active January 14, 2019 14:04
Export a playlist to any service calling Playlist Converter Api with nodejs.
console.log("runing playlist converter api demo....");
var name = "Super Playlist";
var tracks = [];
tracks.push("Shape of You Ed Sheeran");
tracks.push("One Dance Drake");
let tracksJoined = tracks.join("\n");
@mathieue
mathieue / UpdateLogstashLogging.ps1
Created November 27, 2023 14:48
UpdateLogstashLogging.ps1
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Content-Type", "application/json")
$body = '{ "logger.logstash.inputs.jdbc" : "ERROR" }'
$url = 'http://localhost:9600/_node/logging?pretty'
$response = Invoke-RestMethod -Uri $url -Method 'PUT' -Headers $headers -Body $body
output.file:
path: "chemin/vers/le/dossier/de/sortie"
filename: winlogbeat
rotate_every_kb: 10000
number_of_files: 7
codec.json:
pretty: false
output.file:
path: "chemin/vers/le/dossier/de/sortie"