SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Downloaden Sie, um offline zu lesen
Central Log Storage.
ELK stack(a.k.a., Elasticsearch, Logstash, and Kibana)
1
List of Log Files. Central Log Storage.
2
Central Log Storage. Diagram.
3
FileBeat config file. YML standard
FileBeat config file. YML
4
vim /etc/filebeat/filebeat.yml
-
paths:
- ${API_APP_LOG_PATH}/file.log
encoding: plain
input_type: log
fields:
level: apico_backend
review: 1
fields_under_root: false
ignore_older: 0
document_type: api_backend_requests
scan_frequency: 2s
multiline:
pattern: ^[[:digit:]]{4}
negate: true
match: after
max_lines: 500
timeout: 2s
tail_files: false
### Logstash as output
logstash:
# The Logstash hosts
hosts: ["cls.apico.net:9999"]
# Number of workers per Logstash host.
worker: 2
# Optional TLS. By default is off.
tls: certificate_authorities:["/etc/ssl/certs/rootCA.crt"]
insecure: false
Using Environment Variblaes in Configuration
Logstash config source
Link environment-variables @see /etc/sysconfig/filebeat
Filebeat_using_env_vars
Environment Logstash config result
input {
tcp {
port => "${TCP_PORT}"
}
}
export TCP_PORT=12345 input {
tcp {
port => 12345
}
}
input {
tcp {
port => "${TCP_PORT}"
}
}
No TCP_PORT defined Raise a logstash configuration error
input {
tcp {
port => "${TCP_PORT:54321}"
}
}
No TCP_PORT defined input {
tcp {
port => 54321
}
}
filter {
mutate {
add_field => {
"my_path" => "${HOME}/file.log"
}
}
export HOME="/path" filter {
mutate {
add_field => {
"my_path" => "/path/file.log"
}
}
5
SSL Certificate Authority
Certificate Authority — в 5 OpenSSL команд
https://habrahabr.ru/post/192446/
Using TLS between Beats and Logstash
https://gist.github.com/andrewkroh/fdc7e5f3f0f0ed63a11c
Validate crt key:
[root@MSG-predprod lostash_pp]# pwd
/etc/ssl/certs/lostash_pp
[root@MSG-predprod lostash_pp]# curl -v --cacert rootCA.crt https://cls.apico.net:9999
* Rebuilt URL to: https://cls.apico.net:9999/
* Connected to cls.apico.net (172.31.13.49) port 9999 (#0)
* CAfile: rootCA.crt
* Server certificate:
* subject: E=kh.airat14@gmail.com,CN=cls.apico.net,OU=ITY,O=Default Company Ltd,L=Moscow,ST=Moscow,C=MT
* start date: Apr 19 11:59:50 2016 GMT
* expire date: Sep 05 11:59:50 2043 GMT
* common name: cls.apico.net
> GET / HTTP/1.1
> Host: cls.apico.net:9999
> Accept: */*
* Empty reply from server
[root@MSG-predprod lostash_pp]#
6
Security:SSL Certificate AUthority.
Beats Platform: Collect, Parse, and Ship
Don't stop the Beat
Packetbeat - the best way to understand the value of a network packet analytics system like
Packetbeat is to try it on your own traffic.
Topbeat - helps you monitor the availability of your website or service by providing system-wide
and per-process statistics along with a disk usage overview.
Filebeat - read data from log files
7
LogStash Input config file.
LogStash Input config file.
8
vim /etc/logstash/conf.d/logstash.conf
input {
beats { #plugins
port => 9999
host => "cls.apico.net"
ssl_certificate => "/etc/ssl/certs/rootCA.crt"
ssl_key => "/etc/pki/tls/private/rootCA.key"
}
rabbitmq {
exchange => "event-sms-in"
queue => "logstash-queue-pp"
}
}
filter {
...
}
output {
file{
path => "/logstash/%{+YYYY-MM-dd}-input.log"
}
rabbitmq {
exchange => "logstash-exchange"
key => "logstash-routing-key"
}
}
Get data from Rabbit.
Get data from RabbitMq (Logstash plugin)
https://www.elastic.co/guide/en/logstash/current/plugins-inputs-rabbitmq.html
9
Get data from RabbitMq.
RabbitMq configuration.
Output RabbitMq configuration.
10
Hostname IP cls.apico.net
127.0.0.1
Exchange logstash-exchange
Exchange_type direct
Routing Key logstash-routing-key
User user
LogStash Filter config file.
LogStash Filters. Filter for “log_status”.
WIKI: Добавление параметра message_sid в файла логирования для компонентов SmsController RadiusController.
Filter messages from log file by STATUS:
11
log file message
status
error warning info
log_status error warning info
LogStash Filter config file.
LogStash Filters. Filter for “account_sid”.
Filter API request by User Auth Status/Role:
12
user auth
status/role
User
unauthorized
User::
ROLE_SYSTEM
User::ROLE_ACCOUNT
account_sid unknown system acc01fe181e-741b-3693-88bb-3847abfb6e86
sac01fe181e-741b-3693-88bb-3847abfb6e55
LogStash Filter config file.
LogStash Filters. Filter for “message_sid”.
Filter SmsController RadiusController
SmsSender by message_sid:
13
Source Consoler_app: [MessageSid:msgXXX] SmsSender_app:"message_sid":"msgXXX"
message_sid msgXXX msgXXX
LogStash Filter config file.
LogStash Filters. Filter for “message_sid”.
Filter SmsController RadiusController
SmsSender by message_sid:
14
Source Consoler_app: [MessageSid:msgXXX] SmsSender_app:"message_sid":"msgXXX"
message_sid msgXXX msgXXX
LogStash List og plugins..
LogStash Plugins.
15
logstash-codec logstash-filter logstash-input logstash-output
collectd
dots
edn
edn_lines
es_bulk
fluent
graphite
json
json_lines
line
msgpack
multiline
netflow
oldlogstashjson
plain
rubydebug
anonymize
checksum
clone
csv date
dns drop
Fingerprint geoip
grok json
Kv metrics
multiline mutate
ruby
sleep
split
syslog_pri
throttle
urldecode
useragent
uuid
xm
beats
couchdb_changes
elasticsearch
eventlog
exec
file
ganglia
gelf generator
graphite
heartbeat
http http_poller
Imap irc
Jdbc kafka
log4j lumberjack
pipe
rabbitmq
redis s3
snmptrap sqs
stdin syslog
tcp twitter
udp unix
xmpp zeromq
cloudwatch csv
elasticsearch
email
exec
file ganglia
gelf graphite
hipchat
http irc
juggernaut
kafka
lumberjack
nagios
nagios_nsca
null opentsdb
pagerduty pipe
rabbitmq redis
s3 sns
sqs statsd
stdout tcp
udp xmpp
zeromq
logstash-patterns-core
Nginx Kibana: Authentication. Nginx-to-proxy
Nginx Restricting Access
Nginx Reverse Proxy
16
Nginx Kibana: Authentication. Nginx-to-proxy
Kibana. Discover. Search. ElasticSearch Query.
17
Kibana: The Main Components. Discover.
Kibana. Visualize. Visualization type.
18
Kibana: The Main Components. Visualize.
Kibana. Dashboard. EL Query + Visualization types
19
Kibana: The Main Components.
ElasticSearch Query DSL.
ES Query DSL
ES Query DSL (Webinar Video)
20
ElasticSearch Query DSL
Debug. Troubleshooting.
Filebeat:
1. filebeat -e -d "publish" -c /etc/filebeat/filebeat.yml -configtest
2. .(точка)(пробел) /etc/sysconfig/filebeat
3. filebeat -e -d "*" -c /etc/filebeat/filebeat.yml
Logstash:
1. /opt/logstash/bin/logstash --config /etc/logstash/conf.d/logstash.conf --configtest
2. /opt/logstash/bin/logstash --verbose --config /etc/logstash/conf.d/logstash.conf
21
Debug. Troubleshooting.
Inspiration manual.
1.Собираем и анализируем логи с помощью Lumberjack+Logstash+Elasticsearch+RabbitMQ
(The Guardian )
2. Wiki MTT.Innovations. АPICO.CentralLogStorage.
3. Import to CvS Excel . Read Comments
https://habrahabr.ru/post/236341/
4. Logstash alert.
The throttle filter is for throttling the number of events received.
https://www.elastic.co/guide/en/logstash/current/plugins-filters-throttle.html
Plugins outputs email
https://www.elastic.co/guide/en/logstash/current/plugins-outputs-email.html
22
Inspiration manual.
End. No just the beginning.
Elastic BackUp: Snapshot and restore.
Backing-up-your-cluster
File rotation linux BackUp & Restore(5).
Elasticsearch Monitoring Java
23
Just the beginning.

Weitere ähnliche Inhalte

Was ist angesagt?

Logstash + Elasticsearch + Kibana Presentation on Startit Tech Meetup
Logstash + Elasticsearch + Kibana Presentation on Startit Tech MeetupLogstash + Elasticsearch + Kibana Presentation on Startit Tech Meetup
Logstash + Elasticsearch + Kibana Presentation on Startit Tech Meetup
Startit
 

Was ist angesagt? (20)

LogStash in action
LogStash in actionLogStash in action
LogStash in action
 
Elk devops
Elk devopsElk devops
Elk devops
 
Logstash + Elasticsearch + Kibana Presentation on Startit Tech Meetup
Logstash + Elasticsearch + Kibana Presentation on Startit Tech MeetupLogstash + Elasticsearch + Kibana Presentation on Startit Tech Meetup
Logstash + Elasticsearch + Kibana Presentation on Startit Tech Meetup
 
Logstash family introduction
Logstash family introductionLogstash family introduction
Logstash family introduction
 
MySQL Slow Query log Monitoring using Beats & ELK
MySQL Slow Query log Monitoring using Beats & ELKMySQL Slow Query log Monitoring using Beats & ELK
MySQL Slow Query log Monitoring using Beats & ELK
 
Experiences in ELK with D3.js for Large Log Analysis and Visualization
Experiences in ELK with D3.js  for Large Log Analysis  and VisualizationExperiences in ELK with D3.js  for Large Log Analysis  and Visualization
Experiences in ELK with D3.js for Large Log Analysis and Visualization
 
Elastic - ELK, Logstash & Kibana
Elastic - ELK, Logstash & KibanaElastic - ELK, Logstash & Kibana
Elastic - ELK, Logstash & Kibana
 
Logstash
LogstashLogstash
Logstash
 
elk_stack_alexander_szalonnas
elk_stack_alexander_szalonnaselk_stack_alexander_szalonnas
elk_stack_alexander_szalonnas
 
Learn ELK in docker
Learn ELK in dockerLearn ELK in docker
Learn ELK in docker
 
Open Source Logging and Monitoring Tools
Open Source Logging and Monitoring ToolsOpen Source Logging and Monitoring Tools
Open Source Logging and Monitoring Tools
 
Introducing ELK
Introducing ELKIntroducing ELK
Introducing ELK
 
Journée DevOps : Des dashboards pour tous avec ElasticSearch, Logstash et Kibana
Journée DevOps : Des dashboards pour tous avec ElasticSearch, Logstash et KibanaJournée DevOps : Des dashboards pour tous avec ElasticSearch, Logstash et Kibana
Journée DevOps : Des dashboards pour tous avec ElasticSearch, Logstash et Kibana
 
Tuning Elasticsearch Indexing Pipeline for Logs
Tuning Elasticsearch Indexing Pipeline for LogsTuning Elasticsearch Indexing Pipeline for Logs
Tuning Elasticsearch Indexing Pipeline for Logs
 
ELK Ruminating on Logs (Zendcon 2016)
ELK Ruminating on Logs (Zendcon 2016)ELK Ruminating on Logs (Zendcon 2016)
ELK Ruminating on Logs (Zendcon 2016)
 
Toronto High Scalability meetup - Scaling ELK
Toronto High Scalability meetup - Scaling ELKToronto High Scalability meetup - Scaling ELK
Toronto High Scalability meetup - Scaling ELK
 
Logstash: Get to know your logs
Logstash: Get to know your logsLogstash: Get to know your logs
Logstash: Get to know your logs
 
Introduction to ELK
Introduction to ELKIntroduction to ELK
Introduction to ELK
 
Logs aggregation and analysis
Logs aggregation and analysisLogs aggregation and analysis
Logs aggregation and analysis
 
Docker Monitoring Webinar
Docker Monitoring  WebinarDocker Monitoring  Webinar
Docker Monitoring Webinar
 

Andere mochten auch

Logging with Elasticsearch, Logstash & Kibana
Logging with Elasticsearch, Logstash & KibanaLogging with Elasticsearch, Logstash & Kibana
Logging with Elasticsearch, Logstash & Kibana
Amazee Labs
 
Log analysis with the elk stack
Log analysis with the elk stackLog analysis with the elk stack
Log analysis with the elk stack
Vikrant Chauhan
 
Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...
Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...
Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...
Andrii Vozniuk
 
How ElasticSearch lives in my DevOps life
How ElasticSearch lives in my DevOps lifeHow ElasticSearch lives in my DevOps life
How ElasticSearch lives in my DevOps life
琛琳 饶
 

Andere mochten auch (20)

Logging with Elasticsearch, Logstash & Kibana
Logging with Elasticsearch, Logstash & KibanaLogging with Elasticsearch, Logstash & Kibana
Logging with Elasticsearch, Logstash & Kibana
 
Elk stack
Elk stackElk stack
Elk stack
 
ELK - Stack - Munich .net UG
ELK - Stack - Munich .net UGELK - Stack - Munich .net UG
ELK - Stack - Munich .net UG
 
The ELK Stack - Get to Know Logs
The ELK Stack - Get to Know LogsThe ELK Stack - Get to Know Logs
The ELK Stack - Get to Know Logs
 
Log analysis with the elk stack
Log analysis with the elk stackLog analysis with the elk stack
Log analysis with the elk stack
 
Elk ruminating on logs
Elk ruminating on logsElk ruminating on logs
Elk ruminating on logs
 
Centralized Logging System Using ELK Stack
Centralized Logging System Using ELK StackCentralized Logging System Using ELK Stack
Centralized Logging System Using ELK Stack
 
Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...
Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...
Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...
 
Lessons Learned in Deploying the ELK Stack (Elasticsearch, Logstash, and Kibana)
Lessons Learned in Deploying the ELK Stack (Elasticsearch, Logstash, and Kibana)Lessons Learned in Deploying the ELK Stack (Elasticsearch, Logstash, and Kibana)
Lessons Learned in Deploying the ELK Stack (Elasticsearch, Logstash, and Kibana)
 
ELK at LinkedIn - Kafka, scaling, lessons learned
ELK at LinkedIn - Kafka, scaling, lessons learnedELK at LinkedIn - Kafka, scaling, lessons learned
ELK at LinkedIn - Kafka, scaling, lessons learned
 
How ElasticSearch lives in my DevOps life
How ElasticSearch lives in my DevOps lifeHow ElasticSearch lives in my DevOps life
How ElasticSearch lives in my DevOps life
 
Using ELK-Stack (Elasticsearch, Logstash and Kibana) with BizTalk Server
Using ELK-Stack (Elasticsearch, Logstash and Kibana) with BizTalk ServerUsing ELK-Stack (Elasticsearch, Logstash and Kibana) with BizTalk Server
Using ELK-Stack (Elasticsearch, Logstash and Kibana) with BizTalk Server
 
Attack monitoring using ElasticSearch Logstash and Kibana
Attack monitoring using ElasticSearch Logstash and KibanaAttack monitoring using ElasticSearch Logstash and Kibana
Attack monitoring using ElasticSearch Logstash and Kibana
 
Developing highly scalable applications with Symfony and RabbitMQ
Developing highly scalable applications with  Symfony and RabbitMQDeveloping highly scalable applications with  Symfony and RabbitMQ
Developing highly scalable applications with Symfony and RabbitMQ
 
Using Elastic to Monitor Everything - Christoph Wurm, Elastic - DevOpsDays Te...
Using Elastic to Monitor Everything - Christoph Wurm, Elastic - DevOpsDays Te...Using Elastic to Monitor Everything - Christoph Wurm, Elastic - DevOpsDays Te...
Using Elastic to Monitor Everything - Christoph Wurm, Elastic - DevOpsDays Te...
 
Consolidez vos journaux et vos métriques avec Elastic Beats
Consolidez vos journaux et vos métriques avec Elastic BeatsConsolidez vos journaux et vos métriques avec Elastic Beats
Consolidez vos journaux et vos métriques avec Elastic Beats
 
Elk
Elk Elk
Elk
 
Zabbix monitoring in 5 pictures
Zabbix monitoring in 5 pictures  Zabbix monitoring in 5 pictures
Zabbix monitoring in 5 pictures
 
ELK: a log management framework
ELK: a log management frameworkELK: a log management framework
ELK: a log management framework
 
ElasticSearch AJUG 2013
ElasticSearch AJUG 2013ElasticSearch AJUG 2013
ElasticSearch AJUG 2013
 

Ähnlich wie Central LogFile Storage. ELK stack Elasticsearch, Logstash and Kibana.

Study2study#4 nginx conf_1_24
Study2study#4 nginx conf_1_24Study2study#4 nginx conf_1_24
Study2study#4 nginx conf_1_24
Naoya Nakazawa
 
SCaLE 2016 - syslog-ng: From Raw Data to Big Data
SCaLE 2016 - syslog-ng: From Raw Data to Big DataSCaLE 2016 - syslog-ng: From Raw Data to Big Data
SCaLE 2016 - syslog-ng: From Raw Data to Big Data
BalaBit
 
Monitoring with Syslog and EventMachine (RailswayConf 2012)
Monitoring  with  Syslog and EventMachine (RailswayConf 2012)Monitoring  with  Syslog and EventMachine (RailswayConf 2012)
Monitoring with Syslog and EventMachine (RailswayConf 2012)
Wooga
 

Ähnlich wie Central LogFile Storage. ELK stack Elasticsearch, Logstash and Kibana. (20)

Scaling your logging infrastructure using syslog-ng
Scaling your logging infrastructure using syslog-ngScaling your logging infrastructure using syslog-ng
Scaling your logging infrastructure using syslog-ng
 
Scaling Your Logging Infrastructure With Syslog-NG
Scaling Your Logging Infrastructure With Syslog-NGScaling Your Logging Infrastructure With Syslog-NG
Scaling Your Logging Infrastructure With Syslog-NG
 
Node.js API 서버 성능 개선기
Node.js API 서버 성능 개선기Node.js API 서버 성능 개선기
Node.js API 서버 성능 개선기
 
Monitoring with Syslog and EventMachine
Monitoring with Syslog and EventMachineMonitoring with Syslog and EventMachine
Monitoring with Syslog and EventMachine
 
(Fios#02) 2. elk 포렌식 분석
(Fios#02) 2. elk 포렌식 분석(Fios#02) 2. elk 포렌식 분석
(Fios#02) 2. elk 포렌식 분석
 
Application Logging in the 21st century - 2014.key
Application Logging in the 21st century - 2014.keyApplication Logging in the 21st century - 2014.key
Application Logging in the 21st century - 2014.key
 
Hack ASP.NET website
Hack ASP.NET websiteHack ASP.NET website
Hack ASP.NET website
 
Study2study#4 nginx conf_1_24
Study2study#4 nginx conf_1_24Study2study#4 nginx conf_1_24
Study2study#4 nginx conf_1_24
 
TO Hack an ASP .NET website?
TO Hack an ASP .NET website?  TO Hack an ASP .NET website?
TO Hack an ASP .NET website?
 
Security threat analysis points for enterprise with oss
Security threat analysis points for enterprise with ossSecurity threat analysis points for enterprise with oss
Security threat analysis points for enterprise with oss
 
Mt logging with_bam
Mt logging with_bamMt logging with_bam
Mt logging with_bam
 
SCaLE 2016 - syslog-ng: From Raw Data to Big Data
SCaLE 2016 - syslog-ng: From Raw Data to Big DataSCaLE 2016 - syslog-ng: From Raw Data to Big Data
SCaLE 2016 - syslog-ng: From Raw Data to Big Data
 
Building an ActionScript Game Server with over 15,000 Concurrent Connections
Building an ActionScript Game Server with over 15,000 Concurrent ConnectionsBuilding an ActionScript Game Server with over 15,000 Concurrent Connections
Building an ActionScript Game Server with over 15,000 Concurrent Connections
 
Monitoring with Syslog and EventMachine (RailswayConf 2012)
Monitoring  with  Syslog and EventMachine (RailswayConf 2012)Monitoring  with  Syslog and EventMachine (RailswayConf 2012)
Monitoring with Syslog and EventMachine (RailswayConf 2012)
 
MySQL Slow Query log Monitoring using Beats & ELK
MySQL Slow Query log Monitoring using Beats & ELKMySQL Slow Query log Monitoring using Beats & ELK
MySQL Slow Query log Monitoring using Beats & ELK
 
Hunting for APT in network logs workshop presentation
Hunting for APT in network logs workshop presentationHunting for APT in network logs workshop presentation
Hunting for APT in network logs workshop presentation
 
JDD 2016 - Tomasz Gagor, Pawel Torbus - A Needle In A Logstack
JDD 2016 - Tomasz Gagor, Pawel Torbus - A Needle In A LogstackJDD 2016 - Tomasz Gagor, Pawel Torbus - A Needle In A Logstack
JDD 2016 - Tomasz Gagor, Pawel Torbus - A Needle In A Logstack
 
2015. Libre Software Meeting - syslog-ng: from log collection to processing a...
2015. Libre Software Meeting - syslog-ng: from log collection to processing a...2015. Libre Software Meeting - syslog-ng: from log collection to processing a...
2015. Libre Software Meeting - syslog-ng: from log collection to processing a...
 
Developing Realtime Data Pipelines With Apache Kafka
Developing Realtime Data Pipelines With Apache KafkaDeveloping Realtime Data Pipelines With Apache Kafka
Developing Realtime Data Pipelines With Apache Kafka
 
Php logging
Php loggingPhp logging
Php logging
 

Kürzlich hochgeladen

AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Kürzlich hochgeladen (20)

Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 

Central LogFile Storage. ELK stack Elasticsearch, Logstash and Kibana.

  • 1. Central Log Storage. ELK stack(a.k.a., Elasticsearch, Logstash, and Kibana) 1
  • 2. List of Log Files. Central Log Storage. 2
  • 3. Central Log Storage. Diagram. 3
  • 4. FileBeat config file. YML standard FileBeat config file. YML 4 vim /etc/filebeat/filebeat.yml - paths: - ${API_APP_LOG_PATH}/file.log encoding: plain input_type: log fields: level: apico_backend review: 1 fields_under_root: false ignore_older: 0 document_type: api_backend_requests scan_frequency: 2s multiline: pattern: ^[[:digit:]]{4} negate: true match: after max_lines: 500 timeout: 2s tail_files: false ### Logstash as output logstash: # The Logstash hosts hosts: ["cls.apico.net:9999"] # Number of workers per Logstash host. worker: 2 # Optional TLS. By default is off. tls: certificate_authorities:["/etc/ssl/certs/rootCA.crt"] insecure: false
  • 5. Using Environment Variblaes in Configuration Logstash config source Link environment-variables @see /etc/sysconfig/filebeat Filebeat_using_env_vars Environment Logstash config result input { tcp { port => "${TCP_PORT}" } } export TCP_PORT=12345 input { tcp { port => 12345 } } input { tcp { port => "${TCP_PORT}" } } No TCP_PORT defined Raise a logstash configuration error input { tcp { port => "${TCP_PORT:54321}" } } No TCP_PORT defined input { tcp { port => 54321 } } filter { mutate { add_field => { "my_path" => "${HOME}/file.log" } } export HOME="/path" filter { mutate { add_field => { "my_path" => "/path/file.log" } } 5
  • 6. SSL Certificate Authority Certificate Authority — в 5 OpenSSL команд https://habrahabr.ru/post/192446/ Using TLS between Beats and Logstash https://gist.github.com/andrewkroh/fdc7e5f3f0f0ed63a11c Validate crt key: [root@MSG-predprod lostash_pp]# pwd /etc/ssl/certs/lostash_pp [root@MSG-predprod lostash_pp]# curl -v --cacert rootCA.crt https://cls.apico.net:9999 * Rebuilt URL to: https://cls.apico.net:9999/ * Connected to cls.apico.net (172.31.13.49) port 9999 (#0) * CAfile: rootCA.crt * Server certificate: * subject: E=kh.airat14@gmail.com,CN=cls.apico.net,OU=ITY,O=Default Company Ltd,L=Moscow,ST=Moscow,C=MT * start date: Apr 19 11:59:50 2016 GMT * expire date: Sep 05 11:59:50 2043 GMT * common name: cls.apico.net > GET / HTTP/1.1 > Host: cls.apico.net:9999 > Accept: */* * Empty reply from server [root@MSG-predprod lostash_pp]# 6 Security:SSL Certificate AUthority.
  • 7. Beats Platform: Collect, Parse, and Ship Don't stop the Beat Packetbeat - the best way to understand the value of a network packet analytics system like Packetbeat is to try it on your own traffic. Topbeat - helps you monitor the availability of your website or service by providing system-wide and per-process statistics along with a disk usage overview. Filebeat - read data from log files 7
  • 8. LogStash Input config file. LogStash Input config file. 8 vim /etc/logstash/conf.d/logstash.conf input { beats { #plugins port => 9999 host => "cls.apico.net" ssl_certificate => "/etc/ssl/certs/rootCA.crt" ssl_key => "/etc/pki/tls/private/rootCA.key" } rabbitmq { exchange => "event-sms-in" queue => "logstash-queue-pp" } } filter { ... } output { file{ path => "/logstash/%{+YYYY-MM-dd}-input.log" } rabbitmq { exchange => "logstash-exchange" key => "logstash-routing-key" } }
  • 9. Get data from Rabbit. Get data from RabbitMq (Logstash plugin) https://www.elastic.co/guide/en/logstash/current/plugins-inputs-rabbitmq.html 9 Get data from RabbitMq.
  • 10. RabbitMq configuration. Output RabbitMq configuration. 10 Hostname IP cls.apico.net 127.0.0.1 Exchange logstash-exchange Exchange_type direct Routing Key logstash-routing-key User user
  • 11. LogStash Filter config file. LogStash Filters. Filter for “log_status”. WIKI: Добавление параметра message_sid в файла логирования для компонентов SmsController RadiusController. Filter messages from log file by STATUS: 11 log file message status error warning info log_status error warning info
  • 12. LogStash Filter config file. LogStash Filters. Filter for “account_sid”. Filter API request by User Auth Status/Role: 12 user auth status/role User unauthorized User:: ROLE_SYSTEM User::ROLE_ACCOUNT account_sid unknown system acc01fe181e-741b-3693-88bb-3847abfb6e86 sac01fe181e-741b-3693-88bb-3847abfb6e55
  • 13. LogStash Filter config file. LogStash Filters. Filter for “message_sid”. Filter SmsController RadiusController SmsSender by message_sid: 13 Source Consoler_app: [MessageSid:msgXXX] SmsSender_app:"message_sid":"msgXXX" message_sid msgXXX msgXXX
  • 14. LogStash Filter config file. LogStash Filters. Filter for “message_sid”. Filter SmsController RadiusController SmsSender by message_sid: 14 Source Consoler_app: [MessageSid:msgXXX] SmsSender_app:"message_sid":"msgXXX" message_sid msgXXX msgXXX
  • 15. LogStash List og plugins.. LogStash Plugins. 15 logstash-codec logstash-filter logstash-input logstash-output collectd dots edn edn_lines es_bulk fluent graphite json json_lines line msgpack multiline netflow oldlogstashjson plain rubydebug anonymize checksum clone csv date dns drop Fingerprint geoip grok json Kv metrics multiline mutate ruby sleep split syslog_pri throttle urldecode useragent uuid xm beats couchdb_changes elasticsearch eventlog exec file ganglia gelf generator graphite heartbeat http http_poller Imap irc Jdbc kafka log4j lumberjack pipe rabbitmq redis s3 snmptrap sqs stdin syslog tcp twitter udp unix xmpp zeromq cloudwatch csv elasticsearch email exec file ganglia gelf graphite hipchat http irc juggernaut kafka lumberjack nagios nagios_nsca null opentsdb pagerduty pipe rabbitmq redis s3 sns sqs statsd stdout tcp udp xmpp zeromq logstash-patterns-core
  • 16. Nginx Kibana: Authentication. Nginx-to-proxy Nginx Restricting Access Nginx Reverse Proxy 16 Nginx Kibana: Authentication. Nginx-to-proxy
  • 17. Kibana. Discover. Search. ElasticSearch Query. 17 Kibana: The Main Components. Discover.
  • 18. Kibana. Visualize. Visualization type. 18 Kibana: The Main Components. Visualize.
  • 19. Kibana. Dashboard. EL Query + Visualization types 19 Kibana: The Main Components.
  • 20. ElasticSearch Query DSL. ES Query DSL ES Query DSL (Webinar Video) 20 ElasticSearch Query DSL
  • 21. Debug. Troubleshooting. Filebeat: 1. filebeat -e -d "publish" -c /etc/filebeat/filebeat.yml -configtest 2. .(точка)(пробел) /etc/sysconfig/filebeat 3. filebeat -e -d "*" -c /etc/filebeat/filebeat.yml Logstash: 1. /opt/logstash/bin/logstash --config /etc/logstash/conf.d/logstash.conf --configtest 2. /opt/logstash/bin/logstash --verbose --config /etc/logstash/conf.d/logstash.conf 21 Debug. Troubleshooting.
  • 22. Inspiration manual. 1.Собираем и анализируем логи с помощью Lumberjack+Logstash+Elasticsearch+RabbitMQ (The Guardian ) 2. Wiki MTT.Innovations. АPICO.CentralLogStorage. 3. Import to CvS Excel . Read Comments https://habrahabr.ru/post/236341/ 4. Logstash alert. The throttle filter is for throttling the number of events received. https://www.elastic.co/guide/en/logstash/current/plugins-filters-throttle.html Plugins outputs email https://www.elastic.co/guide/en/logstash/current/plugins-outputs-email.html 22 Inspiration manual.
  • 23. End. No just the beginning. Elastic BackUp: Snapshot and restore. Backing-up-your-cluster File rotation linux BackUp & Restore(5). Elasticsearch Monitoring Java 23 Just the beginning.