This file contains 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
[win] | |
w101.sample.com | |
w102.sample.com | |
w103.sample.com | |
[wout] | |
w104.sample.com | |
[web:children] | |
win | |
wout |
This file contains 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
apache: | |
balancer: | |
password: xxxxx | |
url: https://www.xxxx.com/balancer-manager | |
username: apache |
This file contains 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
--- # apache_balancer_manager_role do.yml | |
- name: member_host | |
debug: | |
msg: "member_host {{ member_host }}" | |
- name: "Get the balancer_manager content" | |
uri: | |
url: "{{ apache.balancer.url }}" | |
follow_redirects: yes | |
return_content: yes |
This file contains 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
{ | |
"_index": "csv-log-16-0700", | |
"_type": "_doc", | |
"_id": "5vX2FXwBBxQZBII86oJ6", | |
"_version": 1, | |
"_score": 1, | |
"_source": { | |
"AppCode": "****", | |
"geoip": { | |
"continent_name": "Asia", |
This file contains 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
from multiprocessing import Pool | |
import time | |
import os | |
import pandas as pd | |
from elasticsearch import Elasticsearch, helpers | |
def csvToElastic(file): | |
client = Elasticsearch("localhost:9200", http_compress=True) | |
header_list = ["Time", "Url", "Uri", "RemoteIP"] |
This file contains 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
PUT _index_template/csv-log | |
{ | |
"index_patterns": ["csv-log-*"], | |
"template": { | |
"settings": { | |
"number_of_shards": 1 | |
}, | |
"mappings": { | |
"properties": { | |
"geoip": { |
This file contains 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
PUT _ingest/pipeline/geoip | |
{ | |
"description" : "Add geoip info", | |
"processors" : [ | |
{ | |
"geoip" : { | |
"field" : "RemoteIP" | |
} | |
} | |
] |
This file contains 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
version: '2.2' | |
services: | |
es01: | |
image: elasticsearch:7.14.1 | |
container_name: es01 | |
environment: | |
- node.name=es01 | |
- cluster.name=es-docker-cluster | |
- discovery.seed_hosts=es02,es03 | |
- cluster.initial_master_nodes=es01,es02,es03 |