1 | #Sherlock
|
2 | > You see, but you do not observe - **Sherlock Holmes**
|
3 |
|
4 | ============
|
5 |
|
6 | Simple tool to visualize reports from logs using Node.js and D3
|
7 |
|
8 |
|
9 | ###Running tests:
|
10 | vagrant up
|
11 | vagrant ssh
|
12 | sudo passwd root
|
13 | #set passowrd: 5tgbnhy6
|
14 |
|
15 |
|
16 |
|
17 | ###DSL:
|
18 | ####Callbacks:
|
19 | ```javascript
|
20 | investigate('#Sherlock SAAS QPS simple investigation', function(){
|
21 | ask(questions, function(answers){
|
22 | var options = {
|
23 | servers: answers.servers,
|
24 | commands: answers.commands
|
25 | }
|
26 | verify(options, function(conclusion){
|
27 |
|
28 | });
|
29 | });
|
30 | });
|
31 |
|
32 | investigate('#Sherlock SAAS QPS enhanced investigation', function(){
|
33 | ask(questions, function(answers){
|
34 | var questionOptions={
|
35 | type: "checkbox",
|
36 | name: "servers",
|
37 | message: "Select servers",
|
38 | choices : function() {
|
39 | return answwers.servers;
|
40 | }
|
41 | }
|
42 | var complementaryQuestion=new Question(questionOptions);
|
43 | ask(complementaryQuestion, function(){
|
44 | var options = {
|
45 | servers: answers.servers,
|
46 | commands: answers.commands
|
47 | }
|
48 | verify(options, function(conclusion){
|
49 |
|
50 | });
|
51 | });
|
52 | });
|
53 | });
|
54 | ```
|
55 | ####Events:
|
56 | ```javascript
|
57 | case('#Sherlock SAAS QPS simple investigation with events', function(){
|
58 | var question = new Question(questions);
|
59 | question.on('answered', function(answers){
|
60 | var options = {
|
61 | servers: answers.servers,
|
62 | commands: answers.commands
|
63 | }
|
64 |
|
65 | var investigation = new Investigation(options);
|
66 | investigation.on('conclusion', function(conclusion){
|
67 |
|
68 | });
|
69 | investigation.investigate();
|
70 | });
|
71 | question.ask();
|
72 | });
|
73 | ```
|
74 |
|
75 |
|
76 | ###Questions
|