How to setup an Elasticsearch remote clusters lab.
Notes:
- Adapt the
volumes
definition - Run with
docker-compose up
#!/bin/bash | |
# | |
# Bash `flock` example. | |
# Works on: Linux, BSD | |
# Doesn't work on: MacOS | |
# The file which represent the lock. | |
LOCKFILE="`basename $0`.lock" | |
# Timeout in seconds. |
for pvc in $(kubectl get pvc | tail -n+2 | awk '{print $1}'); do | |
kubectl patch pvc ${pvc} -p '{"metadata":{"finalizers": []}}' --type=merge | |
kubectl delete pvc ${pvc} | |
done |
import sys | |
import requests | |
from lxml import etree | |
def get_app_info(app_id, app_name, country='lu', lang='fr-fr'): | |
'''Fetches an application page and returns a set of contextual information. | |
:param str app_id: Application ID | |
:param str app_name: Application name |
Git uses a really nice command-oriented command line interface (doesn't know a better name). Bellow a script showing
how this can be reproduced in Python using argparse
.
Tested on Python3+.
The following commands and sub-commands are implemented:
foo
bar
complex
How to re-parse Office365 logs collected from the application splunk_ta_o365.
The add-on splunk_ta_o365 may sometimes produces multi-lines JSON events (ie. an event with several JSON objects separated by a new line). The following modification change the line breaker configuration.
Edit the file $SPLUNK_HOME/etc/apps/splunk_ta_o365/local/props.conf
(create it if it doesn't exists) and add the following lines: