From 464cfc506ba438783adcf75d0b46633d4a346477 Mon Sep 17 00:00:00 2001 From: abregman Date: Thu, 26 Mar 2020 04:52:12 +0200 Subject: [PATCH] Add ELK and Linux questions --- README.md | 220 ++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 197 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index a68010c..c0de738 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ :information_source:  This repo contains questions and exercises on various technical topics, sometimes related to DevOps and SRE :) -:bar_chart:  There are currently **918** questions +:bar_chart:  There are currently **950** questions :warning:  You can use these for preparing for an interview but most of the questions and exercises don't represent an actual interview. Please read [Q&A](common-qa.md) for more details @@ -203,6 +203,10 @@ Stateful applications depend on the storage to save state and data, typically da Describe the workflow of setting up some type of web server (Apache, IIS, Tomcat, ...)
+
+How a web server works?
+
+
Explain "Open Source"
@@ -324,6 +328,13 @@ Note: cross-dependency is when you have two or more changes to separate projects Have you contributed to an open source project? Tell me about this experience
+
+Are you familiar with "The Cathedral and the Bazaar"? Explain each of the models
+ +* Cathedral - source code released when software is released +* Bazaar - source code is always available publicly +
+ ## Jenkins @@ -1202,6 +1213,7 @@ An open question. Answer based on your real experience. You can highlight one or * touch * man * nslookup or dig + * pwd * df
* ls - list files and directories. You can highlight common flags like -d, -a, -l, ... @@ -1213,9 +1225,20 @@ An open question. Answer based on your real experience. You can highlight one or * touch - update timestamps but common usage is to create files * man - reference manuals * nslookup or dig - query nameservers + * pwd - print working directory * df - provides info regarding file system disk space usage +
+What each of the following commands does? + + * cd ~ + * cd + * cd .. + * cd . + * cd -
+
+
Running the command df you get "command not found". What could be wrong and how to fix it?
@@ -1282,7 +1305,11 @@ Using the `chmod` command.
-Explain what is setgid, setuid and sticky bit
+Explain what is setgid and setuid
+
+ +
+What is the purpose of sticky bit?
@@ -1713,6 +1740,10 @@ You can use the commands top and free The ls executable is built for an incompatible architecture.
+
+What is escaping? What escape character is used for escaping?
+
+
How would you split a 50 lines file into 2 files of 25 lines each?
@@ -1801,16 +1832,22 @@ Technically, yes. Which port is used in each of the following protocols?: * SSH + * SMTP * HTTP * DNS * HTTPS
* SSH - 22 + * SMTP - 35 * HTTP - 80 * DNS - 53 * HTTPS - 443
+
+What is telnet and why is it a bad idea to use it in production? (or at all)
+
+
What is the routing table? How do you view it?
@@ -1868,6 +1905,14 @@ You can specify one or more of the following: How to know to which package a file on the system belongs to? Is it a problem if it doesn't belongs to a package?
+
+Where repositories are stored? (based on the distribution you are using)
+
+ +
+What is an archive? How do you create one in Linux?
+
+ ##### Applications and Services
@@ -1895,12 +1940,20 @@ Upstart: add Upstart init script at /etc/init/service.conf How to print the shared libraries required by a certain program? What is it useful for?
+
+What is CUPS?
+
+ ##### Users
How do you create users? Where user information is stored?
+
+How do you change/set the password of a user?
+
+
Do you know how to create a new user without using adduser/useradd command?
@@ -1925,7 +1978,7 @@ Re-install the OS IS NOT the right answer :) What is sudo? How do you set it up?
-#### Random and perhaps useless :) +#### Random
Give 5 commands which are two letters long
@@ -1933,6 +1986,25 @@ Re-install the OS IS NOT the right answer :) ls, wc, dd, df, du, ps, ip, cp, cd ...
+
+List three ways to print all the files in the current directory
+ +* ls +* find . +
+ +
+What is '|'? What is it used for?
+
+ +
+You define x=2 in /etc/bashrc and x=6 ~/.bashrc you then login to the system. What would be the value of x?
+
+ +
+Explain "environment variables"
+
+
What a double dash (--) mean?
@@ -1949,6 +2021,14 @@ It's used in commands to mark the end of commands options. One common example is What the awk command does? Have you used it? What for?
+
+What commands you can use for searching files and/or directories?
+ + * find + * whereis + * locate +
+ #### :star: Advanced @@ -2112,6 +2192,25 @@ MemFree - The amount of unused physical RAM in your system MemAvailable - The amount of available memory for new workloads (without pushing system to use swap) based on MemFree, Active(file), Inactive(file), and SReclaimable.
+#### Distribution + +
+What is a Linux distribution?
+
+ +
+What Linux distributions are you familiar with? List at least four?
+
+ +
+What are the components of a Linux distribution?
+ +* Kernel +* Utilities +* Services +* Software/Packages Management +
+ ## Operating System @@ -3061,6 +3160,14 @@ Statements are instructions executed by the interpreter like variable assignment What is Object Oriented Programming? Why is it important?
+
+What is a compiler?
+
+ +
+What is an interpreter?
+
+
Are you familiar with SOLID design principles?
@@ -5182,8 +5289,6 @@ as key-value pair, document-oriented, etc. /bin/bash is the most common shell used as default shell for user login of the linux system. The shell’s name is an acronym for Bourne-again shell. Bash can execute the vast majority of scripts and thus is widely used because it has more features, is well developed and better syntax. - -
@@ -5240,6 +5345,10 @@ If Python, then using pdb is very useful. Using the keyword read so for example read x will wait for user input and will store it in the variable x.
+
+What is globbing?
+
+
Explain conditionals and how do you use them
@@ -5850,7 +5959,7 @@ You can test by using a stored procedure, so the application must be sanitize th
-Describe how do you secure public repositories +Describe how do you secure public repositories
@@ -6039,13 +6148,40 @@ The Elastic Stack consists of: * Elastic Hadoop * APM Server -The most used projects are the Elasticserach, Logstash and Kibana. Also known as the ELK stack. +Elasticserach, Logstash and Kibana are also known as the ELK stack.
-Describe what happens from the moment the app logged some information until it's displayed to the user in a dashboard when the Elastic stack is used
+Explain what is Elasticsearch
-The process may vary based on the chosen architecture: +From the official [docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/documents-indices.html): + +"Elasticsearch is a distributed document store. Instead of storing information as rows of columnar data, Elasticsearch stores complex data structures that have been serialized as JSON documents" +
+ +
+What is Logstash?
+
+ +
+Explain what beats are
+ +Beats are lightweight data shippers. These data shippers installed on the client where the data resides. +Examples of beats: Filebeat, Metricbeat, Auditbeat. There are much more.
+
+ +
+What is Kibana?
+ +From the official docs: + +"Kibana is an open source analytics and visualization platform designed to work with Elasticsearch. You use Kibana to search, view, and interact with data stored in Elasticsearch indices. You can easily perform advanced data analysis and visualize your data in a variety of charts, tables, and maps." +
+ +
+Describe what happens from the moment an app logged some information until it's displayed to the user in a dashboard when the Elastic stack is used
+ +The process may vary based on the chosen architecture and the processing you may want to apply to the logs. One possible workflow is: 1. The data logged by the application is picked by filebeat and sent to logstash 2. Logstash process the log based on the defined filters. Once done, the output is sent to Elasticsearch @@ -6057,11 +6193,39 @@ The process may vary based on the chosen architecture: ##### Elasticsearch
-Explain what is Elasticsearch
+What is a data node?
-From the official [docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/documents-indices.html): +This is where data is stored and also where different processing takes place (e.g. when you search for a data). +
-"Elasticsearch is a distributed document store. Instead of storing information as rows of columnar data, Elasticsearch stores complex data structures that have been serialized as JSON documents" +
+What is a master node?
+ +Par of a master node responsibilites: + * Track the status of all the nodes in the cluster + * Verify replicas are working and the data is available from every data node. + * No hot nodes (no data node that works much harder than other nodes) + +While there can be multiple master nodes in reality only of them is the elected master node. +
+ +
+What is an ingest node?
+ +A node which responsible for parsing the data. In case you don't use logstash then this node can recieve data from beats and parse it, similarly to how it can be parsed in Logstash. +
+ +
+What is Coordinating node?
+ +A Coordinating node responsible for routing requests out and in to the cluser (data nodes). +
+ +
+How data is stored in elasticsearch?
+ +* Data is stored in an index +* The index is spread across the cluster using shards
@@ -6075,6 +6239,13 @@ The official docs also offer a great explanation (in general, it's really good d "An index can be thought of as an optimized collection of documents and each document is a collection of fields, which are the key-value pairs that contain your data"
+
+Explain Shards
+ +An index is split into shards and documents are hashed to a particular shard. Each shard may be on a different node in a cluster and each one of the shards is a self contained index.
+This allows Elasticsearch to scale to an entire cluster of servers. +
+
What is an Inverted Index?
@@ -6126,13 +6297,6 @@ From the official docs: * You can perform language-specific analysis
-
-Explain Shards
- -An index is split into shards and documents are hashed to a particular shard. Each shard may be on a different node in a cluster and each one of the shards is a self contained index.
-This allows Elasticsearch to scale to an entire cluster of servers. -
-
Explain Replicas
@@ -6231,11 +6395,9 @@ A logstash plugin which modifies information in one format and immerse it in ano ##### Kibana
-What is Kibana?
+What can you find under "Discover" in Kibana?
-From the official docs: - -"Kibana is an open source analytics and visualization platform designed to work with Elasticsearch. You use Kibana to search, view, and interact with data stored in Elasticsearch indices. You can easily perform advanced data analysis and visualize your data in a variety of charts, tables, and maps." +The raw data as it is stored in the index. You can search and filter it.
@@ -6244,6 +6406,12 @@ From the official docs: Total number of documents matching the search results. If not query used then simply the total number of documents.
+
+What can you find under "Visualize"?
+ +"Visualize" is where you can create visual representations for your data (pie charts, graphs, ...) +
+
What visualization types are supported/included in Kibana?
@@ -6424,6 +6592,12 @@ It's an architecture in which data is and retrieved from a single, non-shared, s ## General +
+What is a server?
+ +A computer which serves data from itself to the client. +
+
Define or Explain what is an API