title | author | date | source | notoc |
---|---|---|---|---|
LDAP Search Filter Cheatsheet |
Jon LaBelle |
January 4, 2021 |
true |
# To call from outside the cluster a service type `ClusterIP` | |
# We use `kubectl proxy` | |
kubectl proxy | |
# Then, the service can be accessed by calling: | |
curl http://localhost:8001/api/v1/namespaces/status/services/x01-kstatus-api:5000/proxy/api/jobs | |
# This is | |
# curl http://localhost:8001/api/v1/namespaces/[NAMESPACE]/services/[SERVICE:PORT]/proxy/[QUERY_STRING] |
# call this server using the following js command from the browser console: | |
# (await fetch('http://localhost:5000/', {method: "POST", body: '5'})).text() | |
# note: wsgiref is only good for development and in that case Werkzeug is | |
# usually preferred. See http://mitsuhiko.pocoo.org/wzdoc/wsgihowto.html | |
from wsgiref.simple_server import make_server | |
from flask import Flask, request, Response | |
app = Flask(__name__) |
- Implement the defined alerting conditions
- Set the following rule in the alerts:
vector(1) and on() business_hour
#!/bin/bash | |
logstash_version=8.1.3 | |
logstash_plugin_release=1 | |
logstash_plugin_pack_dir=/tmp/logstash | |
logstash_image=docker.elastic.co/logstash/logstash:${logstash_version} | |
logstash_input_plugin=$(echo ' | |
logstash-input-beats | |
logstash-integration-kafka |
package main | |
import ( | |
"flag" | |
"io" | |
"log" | |
"net" | |
"net/http" | |
"strings" | |
) |
The goal of this hook is to allow you catch when you're committing with an email you shouldn't on a public repositories. In some cases, certain companies need to seperate their internal coporate email accounts from those that might be used for committing to public repositories.
The UNWANTED_EMAIL_SUFFIX
should be the suffix (after the @
sign) of the email address you do not want to appear in the git logs. The DESIRED_AUTHOR_EMAIL
and DESIRED_AUTHOR_NAME
are the respective email and name you want to show up in the git logs.
In cases of advanced troubleshooting of Elasticsearch issues, it may be necessary at times to increase the verbosity of a specific logger within Elasticsearch. Unlike with Logstash, the loggers in Elasticsearch aren't specifically documented as there are far too many (thousands+).
Note: Running this tool will result in the cloning of the Elasticsearch repo locally if it doesn't already exist within the specified repo_dir
Syntax: es-logger-finder -r <PATH_TO_ELASTICSEARCH_GIT_DIR> -v <ES_MAJOR_MINOR_VERSION> -p '<LOGGER_PATTERN>' -c <CACHE_FILE_DIR> [-f|-d]
#!/bin/bash | |
show_help() | |
{ | |
SCRIPT_NAME=$(basename $0) | |
echo "Generate a diagnostics dump of Elasticsearch cluster running on ECK." | |
echo | |
echo "Syntax: $SCRIPT_NAME -n <K8S_NAMESPACE> -c <ES_CLUSTER> -s <NODESET> [-h|-d]" | |
echo "options:" | |
echo "-c | --cluster Specify the Elasticsearch cluster" |