SQL | NoSQL |
---|---|
When your access patterns aren't defined | When your access pattern is defined. |
When you want to perform flexible queries. If your access patterns arent define you won't know what queries to perform. | When your primary key is known. |
When you want to perform relational queries. | When your data model fits (graphs) |
When you want to enforce field constraints, this allows you to keep your data consistent. | High efficiency Scaling |
When you want to use a documented access language (SQL) is generally universal across all the Relational Database Engines. | When you need high performance and low latency. |
Data use Schemes | Schema-less |
Relations! | No (very few) Relations |
Data is distributed across multiple tables | Data is typically merged and nested in a few collections |
This file contains hidden or 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
input{ | |
exec{ | |
command => "date" | |
interval => "1" | |
} | |
} | |
output{ | |
elasticsearch{ | |
hosts => ["$YOUR_AXIOM_URL:443/api/v1/datasets/<dataset>/elastic"] | |
# api_key can be your ingest or personal token |
This file contains hidden or 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
# Before running this code, make sure you have Python 3 and above Installed on your machine. | |
# Run the file using python3 pythongenerator.py | |
# Creating a password generator in Python | |
# string library to generate the password | |
import string | |
# generate secure and random passwords | |
import random |
This file contains hidden or 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
env: | |
- name: AXIOM_HOST | |
value: http://cloud.axiom.co // replace with your self-host url if needed | |
- name: AXIOM_DATASET_NAME | |
value: aks-logs | |
- name: AXIOM_INGEST_TOKEN | |
value: xait-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
This file contains hidden or 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
# Disable index lifecycle management (ILM) | |
setup.ilm.enabled: false | |
heartbeat.monitors: | |
- type: icmp | |
schedule: '*/5 * * * * * *' | |
hosts: ["myhost"] | |
id: my-icmp-service | |
name: My ICMP Service | |
- type: tcp |
This file contains hidden or 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
# Disable index lifecycle management (ILM) | |
setup.ilm.enabled: false | |
# network device to capture traffic from | |
packetbeat.interfaces.device: en0 | |
# Configure the maximum size of the packets to capture | |
packetbeat.interfaces.snaplen: 44937833987 | |
# Configure Sniffing & traffic capturing options | |
packetbeat.interfaces.type: pcap | |
# Configure the maximum size of the shared memory buffer to use | |
packetbeat.interfaces.buffer_size_mb: 400 |
This file contains hidden or 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
def square_numbers(nums): | |
result = [] | |
for i in nums: | |
result.append(i*i) | |
return result | |
my_nums = square_numbers([1,2,3,4,5]) | |
# my_nums = [x * x for x in [1,2,3,4,5]] |
This file contains hidden or 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
def square_numbers(nums): | |
for i in nums: | |
yield(i*i) | |
my_nums = square_numbers([1, 2, 3, 4, 5]) | |
print my_nums |
This file contains hidden or 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
def square_numbers(nums): | |
for i in nums: | |
yield(i*i) | |
my_nums = square_numbers([1, 2, 3, 4, 5]) | |
print next(my_nums) |
This file contains hidden or 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
def square_numbers(nums): | |
for i in nums: | |
yield(i*i) | |
my_nums = square_numbers([1, 2, 3, 4, 5]) | |
print next(my_nums) | |
print next(my_nums) | |
print next(my_nums) | |
print next(my_nums) |