Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marc SimpsonChallenge2Update #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 66 additions & 65 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,213 +1,214 @@
# Name

write-your-name
Marc Simpson

# How many points have you earned?

0/100
90/100

(Make your own calculation and replace the number 0 with the points you think you've earned.)

# Show and tell (10 points)

[title-of-the-article](http://link-to-an-interesting-article-about-a-cool-use-of-arduino)
[Build a Wireless Home Security System With an Arduino](http://lifehacker.com/build-a-wireless-home-security-system-with-an-arduino-1619435213)

# Checkpoints

## Checkpoint 1 (5 points)

![image](image.png?raw=true)
![image](http://i.imgur.com/y8HCvxi.png)

## Checkpoint 2 (5 points)

![image](image.png?raw=true)
![image](http://i.imgur.com/TUGSXhi.png)

## Checkpoint 3 (5 points)

![image](image.png?raw=true)
![image](http://i.imgur.com/8xU3BOM.png)

## Checkpoint 4 (5 points)

![image](image.png?raw=true)
![image](http://i.imgur.com/0gssNYC.png)

## Study Questions (3 points x 4 = 12 points)

### Q1. (3 points)

fill-in-your-answer
Different servers so that traffic is managed a lot better.

### Q2. (3 points)

fill-in-your-answer
Entering in 200 would help eliminate the warning and error signs in your code.

### Q3. (3 points)

fill-in-your-answer
It helps connect multiple queries together to help input into different applications significantly easier.

### Q4. (3 points)

fill-in-your-answer
With the amount of data that could possibly be collected, the database would never end and it would almost be impossible to find what you are looking for. So using logs would be the easiest way to look at the data collected in real time.

# Challenges

## Challenge 1-a (2 points)
```
sourcetype=access_* [fill-in-the-rest]
sourcetype=access_* | stats count
```
![image](image.png?raw=true)
![image](http://i.imgur.com/brh5TRT.png)

## Challenge 1-b (2 points)
```
sourcetype=access_* [fill-in-the-rest]
sourcetype=access_* | stats count AS "Events"
```
![image](image.png?raw=true)
![image](http://i.imgur.com/WWJbtwK.png)

## Challenge 1-c (2 points)
```
sourcetype=access_* [fill-in-the-rest]
sourcetype=access_* | stats count AS "Events", c(eval(action="purchase")) AS "Purchases"
```
![image](image.png?raw=true)
![image](http://i.imgur.com/eKKLoVn.png)

## Challenge 1-d (2 points)
```
sourcetype=access_* [fill-in-the-rest]
sourcetype=access_* | stats count AS "Events", c(eval(action="purchase")) AS "Purchases", c(eval(action="addtocart")) AS "Add to Cart",c(eval(action="remove")) AS "Remove"
```
![image](image.png?raw=true)
![image](http://i.imgur.com/7VIrXRA.png)

## Challenge 1-e (2 points)
```
sourcetype=access_* [fill-in-the-rest]
sourcetype=access_* | stats max(bytes)
```
![image](image.png?raw=true)
![image](http://i.imgur.com/e9lEbUm.png)

## Challenge 1-f (2 points)
```
sourcetype=access_* [fill-in-the-rest]
sourcetype=access_* | stats max(bytes)
```
![image](image.png?raw=true)
![image](http://i.imgur.com/UaAdNcA.png)

## Challenge 1-g (2 points)
```
sourcetype=access_* [fill-in-the-rest]
sourcetype=access_* | stats max(bytes) AS "MAX"
```
![image](image.png?raw=true)
![image](http://i.imgur.com/KtTj6ph.png)

## Challenge 1-h (2 points)
```
sourcetype=access_* [fill-in-the-rest]
sourcetype=access_* | stats max(bytes) AS "MAX", min(bytes) AS "MIN", avg(bytes) AS "AVG"
```
![image](image.png?raw=true)
![image](http://i.imgur.com/tGIltRL.png)

## Challenge 1-i (2 points)
```
sourcetype=access_* [fill-in-the-rest]
sourcetype=access_* | stats distinct_count(productId), values(productId) as "UniqueProducts"
```
![image](image.png?raw=true)
![image](http://i.imgur.com/IywrdxM.png)


## Challenge 2-a (2 points)
```
sourcetype=access_* [fill-in-the-rest]
sourcetype=access_* productId cart.do | top clientip
```
![image](image.png?raw=true)
![image](http://i.imgur.com/HQ1ICyc.png)

## Challenge 2-b (2 points)
```
sourcetype=access_* [fill-in-the-rest]
sourcetype=access_* productId cart.do | top date_wday limit=3
```
![image](image.png?raw=true)
![image](http://i.imgur.com/gQdt62N.png)

## Challenge 2-c (2 points)
```
sourcetype=access_* [fill-in-the-rest]
sourcetype=access_* productId cart.do | top productId
```
![image](image.png?raw=true)
![image](http://i.imgur.com/MPb46mC.png)


## Challenge 2-d (2 points)
```
sourcetype=access_* [fill-in-the-rest]
sourcetype=access_* productId cart.do date_wday=friday | top productId
```
![image](image.png?raw=true)
![image](http://i.imgur.com/JaPKD3j.png)

## Challenge 2-e (2 points)
```
sourcetype=access_* [fill-in-the-rest]
sourcetype=access_* productId cart.do date_wday=friday action=purchase| top productId
```
![image](image.png?raw=true)
![image](http://i.imgur.com/CK2UZCr.png)

## Challenge 2-f (2 points)
```
sourcetype=access_* [fill-in-the-rest]
sourcetype=access_* productId cart.do action=purchase| top productId limit=1
```
![image](image.png?raw=true)
![image](http://i.imgur.com/lc4w52M.png)

## Challenge 2-g (2 points)
```
sourcetype=access_* [fill-in-the-rest]
sourcetype=access_* productId=* | timechart count(action) BY dates
```
![image](image.png?raw=true)
![image](http://i.imgur.com/t078mqb.png)

## Challenge 3-a (2 points)
```
sourcetype=access_* [fill-in-the-rest]
sourcetype=access_* productId=* | timechart count(action) BY dates
```
![image](image.png?raw=true)
![image](http://i.imgur.com/mjZE1OO.png)

## Challenge 3-b (2 points)
```
sourcetype=access_* [fill-in-the-rest]
sourcetype=access_* productId=* | timechart distinct_count(clientip) by days
```
![image](image.png?raw=true)
![image](http://i.imgur.com/WFGKgwY.png)

## Challenge 3-c (2 points)
```
sourcetype=access_* [fill-in-the-rest]
sourcetype=access_* productId=* | timechart distinct_count(clientip) span=hours
```
![image](image.png?raw=true)
![image](http://i.imgur.com/59GioRC.png)

## Challenge 3-d (2 points)
```
sourcetype=access_* [fill-in-the-rest]
sourcetype=access_* productId=* | timechart c(action) by host
```
![image](image.png?raw=true)
![image](http://i.imgur.com/HldeQGX.png)

## Challenge 3-e (2 points)
```
sourcetype=access_* [fill-in-the-rest]
sourcetype=access_* productId=* | timechart count(action) by productId
```
![image](image.png?raw=true)
![image](http://i.imgur.com/iCCPIVS.png)

## Challenge 3-f (2 points)
```
sourcetype=access_* [fill-in-the-rest]
sourcetype=access_* | timechart count(action) by productId useother=f usenull=f limit=16
```
![image](image.png?raw=true)
![image](http://i.imgur.com/Qc1GpoB.png)

## Challenge 3-g (2 points)
```
sourcetype=access_* [fill-in-the-rest]
sourcetype=access_* productId=* | timechart count(action) by clientip
```
![image](image.png?raw=true)
![image](http://i.imgur.com/0soIWO4.png)

## Challenge 3-h (2 points)
```
sourcetype=access_* [fill-in-the-rest]
sourcetype=access_* productId=* | timechart count(action) by clientip useother=f limit=10
```
![image](image.png?raw=true)
![image](http://i.imgur.com/eYEIb2S.png)

## Challenge 3-i (2 points)
```
sourcetype=access_* [fill-in-the-rest]
sourcetype=access_* productId=* | timechart sum(bytes) span=hours
```
![image](image.png?raw=true)
![image](http://i.imgur.com/o39Bncs.png)

## Challenge 4-a (4 points)
```
sourcetype=access_* [fill-in-the-rest]
sourcetype=access_* | rex "(?<mymethod>GET)" | table mymethod, method, _raw | rex "(?<mymethod>POST)" | table mymethod, method, _raw
```
![image](image.png?raw=true)
![image](http://i.imgur.com/WIy69Gf.png)

## Challenge 4-b (4 points)
```
sourcetype=access_* [fill-in-the-rest]
sourcetype=access_* action | rex "(GET|POST) /cart.do\?action=(?<myaction>(purchase|addtocart|remove|view|remove|purchase|changequantity))" | table myaction, action, _raw

![image](http://i.imgur.com/OOhFtOh.png)